{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asap-cool/json-schema/asap-cool-create-deal-request-schema.json",
  "title": "CreateDealRequest",
  "description": "Body of `POST /v1/crm/deals`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asap-cool-crm-api-openapi.yml#/components/schemas/CreateDealRequest",
  "type": "object",
  "required": [
    "contact_id",
    "title"
  ],
  "properties": {
    "amount_cents": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int64",
      "description": "Expected amount **in cents**. Never a float: this is money."
    },
    "contact_id": {
      "type": "string",
      "format": "uuid",
      "description": "Contact the deal belongs to."
    },
    "currency": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO 4217 currency; defaults to `EUR`."
    },
    "expected_close_on": {
      "type": [
        "string",
        "null"
      ],
      "description": "Day the deal is expected to close on, `YYYY-MM-DD`."
    },
    "probability": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int32",
      "description": "Probability override in `0..=100`; omit to take the stage's default."
    },
    "source": {
      "type": [
        "string",
        "null"
      ],
      "description": "Where the deal came from (`manual`, `sourcing`, `outreach`, `chat`)."
    },
    "stage": {
      "type": [
        "string",
        "null"
      ],
      "description": "Starting stage; defaults to `nouveau`. A terminal stage is refused — a\ndeal is not born won."
    },
    "title": {
      "type": "string",
      "description": "Short human title (1..=200 characters)."
    }
  }
}