Close Leads API

The leads API from Close — 3 operation(s) for leads.

Operations 6

GET /lead/ List Leads #
POST /lead/ Create a new lead #
POST /lead/merge/ Merge two leads #
GET /lead/{id}/ Get a single Lead #
PUT /lead/{id}/ Update an existing lead #
DELETE /lead/{id}/ Delete a lead #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/close-leads-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

close-leads-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: Close CRM REST API
  title: Close Leads API
  version: 1.0.0
servers:
- url: https://api.close.com/api/v1
security:
- ApiKeyAuth: []
- OAuth2: []
tags:
- name: leads
  externalDocs:
    url: https://developer.close.com/api/resources/leads
paths:
  /lead/:
    get:
      operationId: leads_list
      tags:
      - leads
      summary: List Leads
      parameters:
      - $ref: '#/components/parameters/LimitParam'
      - $ref: '#/components/parameters/SkipParam'
      - $ref: '#/components/parameters/FieldsParam'
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                - addresses: []
                  contact_ids:
                  - cont_o0kP3Nqyq0wxr5DLWIEm8mVr6ZpI0AhonKLDG0V5Qjh
                  contacts:
                  - created_by: null
                    custom.cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj: CEO
                    date_created: '2013-02-01T00:54:51.331000+00:00'
                    date_updated: '2013-02-06T20:53:01.954000+00:00'
                    display_name: Bruce Wayne
                    emails:
                    - email: thedarkknight@close.com
                      is_unsubscribed: false
                      type: office
                    id: cont_o0kP3Nqyq0wxr5DLWIEm8mVr6ZpI0AhonKLDG0V5Qjh
                    name: Bruce Wayne
                    organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH
                    phones:
                    - phone: '+16503334444'
                      phone_formatted: +1 650-333-4444
                      type: office
                    title: The Dark Knight
                    updated_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA
                  created_by: null
                  custom.cf_ORxgoOQ5YH1p7lDQzFJ88b4z0j7PLLTRaG66m8bmcKv: Website contact form
                  custom.cf_nenE344jkwrjyRRezwsf8b4V1MCoXWIDHIStmFavZks:
                  - Choice 1
                  - Choice 2
                  date_created: '2013-02-01T00:54:51.333000+00:00'
                  date_updated: '2013-02-06T20:53:01.977000+00:00'
                  description: ''
                  display_name: Wayne Enterprises (Sample Lead)
                  html_url: https://app.close.com/lead/lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O/
                  id: lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O
                  name: Wayne Enterprises (Sample Lead)
                  opportunities:
                  - annualized_expected_value: 37500
                    annualized_value: 50000
                    confidence: 75
                    contact_id: null
                    created_by: null
                    date_created: '2013-02-01T00:54:51.337000+00:00'
                    date_lost: null
                    date_updated: '2013-02-01T00:54:51.337000+00:00'
                    date_won: null
                    expected_value: 37500
                    id: oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt
                    lead_id: lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O
                    lead_name: Wayne Enterprises (Sample Lead)
                    note: Bruce needs new software for the Bat Cave.
                    note_html: <body><p>Bruce needs new software for the Bat Cave.</p></body>
                    organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH
                    pipeline_id: pipe_04fC628PVB0HjK2Qq5EqEf
                    pipeline_name: Sales
                    status_id: stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk
                    status_label: Active
                    status_type: active
                    updated_by: null
                    user_id: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA
                    user_name: John Doe
                    value: 50000
                    value_currency: USD
                    value_formatted: $500
                    value_period: one_time
                  - annualized_expected_value: 45000
                    annualized_value: 60000
                    confidence: 75
                    contact_id: null
                    created_by: null
                    date_created: '2013-02-01T00:54:51.337000+00:00'
                    date_lost: null
                    date_updated: '2013-02-01T00:54:51.337000+00:00'
                    date_won: null
                    expected_value: 3750
                    id: oppo_klajsdflf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt
                    lead_id: lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O
                    lead_name: Wayne Enterprises (Sample Lead)
                    note: Bat Cave monthly maintenance cost
                    note_html: <body><p>Bat Cave monthly maintenance cost</p></body>
                    organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH
                    pipeline_id: pipe_04fC628PVB0HjK2Qq5EqEf
                    pipeline_name: Sales
                    status_id: stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk
                    status_label: Active
                    status_type: active
                    updated_by: null
                    user_id: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA
                    user_name: John Doe
                    value: 5000
                    value_currency: USD
                    value_formatted: $50 monthly
                    value_period: monthly
                  organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH
                  status_id: stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk
                  status_label: Potential
                  tasks: []
                  updated_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA
                  url: null
                has_more: false
                total_results: 1
              schema:
                type: object
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/Lead'
                    type: array
                  has_more:
                    type: boolean
                required:
                - data
                - has_more
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
    post:
      operationId: leads_create
      tags:
      - leads
      summary: Create a new lead
      description: 'Contacts, addresses, and custom fields can all be nested in the lead. Activities, tasks, and opportunities must be posted separately.


        **status / status_id** (optional): Post either `status` or `status_id` (but not both). If neither is provided, the organization''s default (first) status will be used. Using `status_id` is recommended so that users can rename statuses in the UI without breaking your implementation.


        **custom.FIELD_ID** (optional): Set custom fields by setting `custom.FIELD_ID` to the field value, where FIELD_ID is the ID of the custom field, e.g.:


        ```json

        { "custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c": "value", "custom.cf_8wtBWsdRU2Fur7GDnEeXQ7ra2Vu7R4hG1SNYdiEhh0F": "other value" }

        ```


        If a custom field has `accepts_multiple_values: true`, the entire value will be replaced. For example, given a Lead has a Custom Choice Field with value `["A", "B"]`, adding choice `"C"` would mean setting the value to `["A", "B", "C"]`.


        Note that using the `custom` field dict or the `custom.FIELD_NAME` syntax (instead of custom field IDs) is deprecated and will be removed from the API. See [Custom Fields](https://developer.close.com/api/resources/custom-fields) for more details.'
      requestBody:
        content:
          application/json:
            example:
              addresses:
              - address_1: 747 Howard St
                address_2: Room 3
                city: San Francisco
                country: US
                label: business
                state: CA
                zipcode: '94103'
              contacts:
              - emails:
                - email: gob@example.com
                  type: office
                name: Gob
                phones:
                - phone: '8004445555'
                  type: office
                title: Sr. Vice President
              custom.cf_FSYEbxYJFsnY9tN1OTAPIF33j7Sw5Lb7Eawll7JzoNh: Segway
              custom.cf_ORxgoOQ5YH1p7lDQzFJ88b4z0j7PLLTRaG66m8bmcKv: Website contact form
              custom.cf_bA7SU4vqaefQLuK5UjZMVpbfHK4SVujTJ9unKCIlTvI: Real Estate
              custom.cf_nenE344jkwrjyRRezwsf8b4V1MCoXWIDHIStmFavZks:
              - Choice 1
              - Choice 2
              description: Best. Show. Ever.
              name: Bluth Company
              status_id: stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk
              url: http://thebluthcompany.tumblr.com/
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                addresses:
                - address_1: 747 Howard St
                  address_2: Room 3
                  city: San Francisco
                  country: US
                  label: business
                  state: CA
                  zipcode: '94103'
                contact_ids:
                - cont_qpjDKxbN3WWsuhaJjg2Qr9pkqHqe1yviZ5BS0dEyz05
                contacts:
                - created_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA
                  date_created: '2013-02-20T05:30:24.844000+00:00'
                  date_updated: '2013-02-20T05:30:24.844000+00:00'
                  display_name: Gob
                  emails:
                  - email: gob@example.com
                    is_unsubscribed: false
                    type: office
                  id: cont_qpjDKxbN3WWsuhaJjg2Qr9pkqHqe1yviZ5BS0dEyz05
                  name: Gob
                  organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH
                  phones:
                  - phone: '+18004445555'
                    phone_formatted: +1 800-444-5555
                    type: office
                  title: sr. vice president
                  updated_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA
                created_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA
                custom.cf_FSYEbxYJFsnY9tN1OTAPIF33j7Sw5Lb7Eawll7JzoNh: Segway
                custom.cf_ORxgoOQ5YH1p7lDQzFJ88b4z0j7PLLTRaG66m8bmcKv: Website contact form
                custom.cf_bA7SU4vqaefQLuK5UjZMVpbfHK4SVujTJ9unKCIlTvI: Real Estate
                custom.cf_nenE344jkwrjyRRezwsf8b4V1MCoXWIDHIStmFavZks:
                - Choice 1
                - Choice 2
                date_created: '2013-02-20T05:30:24.854000+00:00'
                date_updated: '2013-02-20T05:30:24.854000+00:00'
                description: Best. Show. Ever.
                display_name: Bluth Company
                html_url: https://app.close.com/lead/lead_70jZ5hiVt5X31MZ3vJ0R0GJMqJEihkoF7TtSVFbN2ty/
                id: lead_70jZ5hiVt5X31MZ3vJ0R0GJMqJEihkoF7TtSVFbN2ty
                name: Bluth Company
                opportunities: []
                organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH
                status_id: stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk
                status_label: Potential
                tasks: []
                updated_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA
                url: http://thebluthcompany.tumblr.com/
              schema:
                $ref: '#/components/schemas/Lead'
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
  /lead/merge/:
    post:
      operationId: leads_merge
      tags:
      - leads
      summary: Merge two leads
      description: For details and definitions of 'source' and 'destination', see the Merge Leads feature in the UI.
      requestBody:
        content:
          application/json:
            example:
              destination: lead_6ivpsIOFYDEwCUz8sdftdoWqlKpLSNOAg9glZSLvZEG
              source: lead_JCTqyXSXD42eGO6PlWOe5ase8VRDCpE7ITYti8Th2Ei
        required: true
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
  /lead/{id}/:
    get:
      operationId: leads_get
      tags:
      - leads
      summary: Get a single Lead
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/FieldsParam'
      responses:
        '200':
          content:
            application/json:
              example:
                addresses: []
                contact_ids:
                - cont_o0kP3Nqyq0wxr5DLWIEm8mVr6ZpI0AhonKLDG0V5Qjh
                contacts:
                - created_by: null
                  custom.cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj: CEO
                  date_created: '2013-02-01T00:54:51.331000+00:00'
                  date_updated: '2013-02-06T20:53:01.954000+00:00'
                  display_name: Bruce Wayne
                  emails:
                  - email: thedarkknight@close.com
                    is_unsubscribed: false
                    type: office
                  id: cont_o0kP3Nqyq0wxr5DLWIEm8mVr6ZpI0AhonKLDG0V5Qjh
                  name: Bruce Wayne
                  organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH
                  phones:
                  - phone: '+16503334444'
                    phone_formatted: +1 650-333-4444
                    type: office
                  title: The Dark Knight
                  updated_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA
                created_by: null
                custom.cf_ORxgoOQ5YH1p7lDQzFJ88b4z0j7PLLTRaG66m8bmcKv: Website contact form
                custom.cf_nenE344jkwrjyRRezwsf8b4V1MCoXWIDHIStmFavZks:
                - Choice 1
                - Choice 2
                date_created: '2013-02-01T00:54:51.333000+00:00'
                date_updated: '2013-02-06T20:53:01.977000+00:00'
                description: ''
                display_name: Wayne Enterprises (Sample Lead)
                html_url: https://app.close.com/lead/lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O/
                id: lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O
                name: Wayne Enterprises (Sample Lead)
                opportunities:
                - annualized_expected_value: 37500
                  annualized_value: 50000
                  confidence: 75
                  contact_id: null
                  created_by: null
                  date_created: '2013-02-01T00:54:51.337000+00:00'
                  date_lost: null
                  date_updated: '2013-02-01T00:54:51.337000+00:00'
                  date_won: null
                  expected_value: 37500
                  id: oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt
                  lead_id: lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O
                  lead_name: Wayne Enterprises (Sample Lead)
                  note: Bruce needs new software for the Bat Cave.
                  note_html: <body><p>Bruce needs new software for the Bat Cave.</p></body>
                  organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH
                  pipeline_id: pipe_04fC628PVB0HjK2Qq5EqEf
                  pipeline_name: Sales
                  status_id: stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk
                  status_label: Active
                  status_type: active
                  updated_by: null
                  user_id: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA
                  user_name: John Doe
                  value: 50000
                  value_currency: USD
                  value_formatted: $500
                  value_period: one_time
                - annualized_expected_value: 45000
                  annualized_value: 60000
                  confidence: 75
                  contact_id: null
                  created_by: null
                  date_created: '2013-02-01T00:54:51.337000+00:00'
                  date_lost: null
                  date_updated: '2013-02-01T00:54:51.337000+00:00'
                  date_won: null
                  expected_value: 3750
                  id: oppo_klajsdflf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt
                  lead_id: lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O
                  lead_name: Wayne Enterprises (Sample Lead)
                  note: Bat Cave monthly maintenance cost
                  note_html: <body><p>Bat Cave monthly maintenance cost</p></body>
                  organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH
                  pipeline_id: pipe_04fC628PVB0HjK2Qq5EqEf
                  pipeline_name: Sales
                  status_id: stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk
                  status_label: Active
                  status_type: active
                  updated_by: null
                  user_id: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA
                  user_name: John Doe
                  value: 5000
                  value_currency: USD
                  value_formatted: $50 monthly
                  value_period: monthly
                organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH
                status_id: stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk
                status_label: Potential
                tasks: []
                updated_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA
                url: null
              schema:
                $ref: '#/components/schemas/Lead'
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
    put:
      operationId: leads_update
      tags:
      - leads
      summary: Update an existing lead
      description: 'Supports non-destructive patches. Nested `contacts` cannot be updated through this endpoint -- use the Contacts API instead.


        **status**: See `status` and `status_id` guidance on the create endpoint.


        **custom.FIELD_ID** (optional): See `custom.FIELD_ID` guidance on the create endpoint. You can also unset a single field, e.g.:


        ```json

        { "custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c": null }

        ```


        If the custom field accepts multiple values, you can specify `.add` or `.remove` as part of the field key to add/remove a single value to/from a list of values, e.g.:


        ```json

        { "custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c.add": "Wednesday" }

        ```


        adds "Wednesday" to the list of values which already exist on the given lead.'
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            example:
              description: Best show ever canceled.  Sad.
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                addresses: []
                contact_ids:
                - cont_qpjDKxbN3WWsuhaJjg2Qr9pkqHqe1yviZ5BS0dEyz05
                contacts:
                - created_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA
                  date_created: '2013-02-20T05:30:24.844000+00:00'
                  date_updated: '2013-02-20T05:43:41.611000+00:00'
                  display_name: Gob
                  emails:
                  - email: gob@example.com
                    is_unsubscribed: false
                    type: office
                  id: cont_qpjDKxbN3WWsuhaJjg2Qr9pkqHqe1yviZ5BS0dEyz05
                  name: Gob
                  organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH
                  phones:
                  - phone: '+18004445555'
                    phone_formatted: +1 800-444-5555
                    type: office
                  title: sr. vice president
                  updated_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA
                created_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA
                date_created: '2013-02-20T05:30:24.854000+00:00'
                date_updated: '2013-02-20T05:43:41.622000+00:00'
                description: Best show ever canceled.  Sad.
                display_name: Bluth Company
                html_url: https://app.close.com/lead/lead_70jZ5hiVt5X31MZ3vJ0R0GJMqJEihkoF7TtSVFbN2ty/
                id: lead_70jZ5hiVt5X31MZ3vJ0R0GJMqJEihkoF7TtSVFbN2ty
                name: Bluth Company
                opportunities: []
                organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH
                status_id: stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk
                status_label: Potential
                tasks: []
                updated_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA
                url: http://thebluthcompany.tumblr.com/
              schema:
                $ref: '#/components/schemas/Lead'
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
    delete:
      operationId: leads_delete
      tags:
      - leads
      summary: Delete a lead
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
components:
  schemas:
    StalledOpportunityActionTypeV1:
      title: StalledOpportunityActionTypeV1
      type: string
      enum:
      - mark_as_lost
      - change_status
      - follow_up
      - adjust_close_date
      - ask_someone_else_to_reach_out
      - change_communication_method
    BasicSubscriptionInfoForContact:
      title: BasicSubscriptionInfoForContact
      type: object
      properties:
        contact_email:
          title: Contact Email
          anyOf:
          - type: string
          - type: 'null'
        date_created:
          title: Date Created
          type: string
          format: date-time
        initial_email_id:
          title: Initial Email ID
          anyOf:
          - type: string
          - type: 'null'
        sequence_id:
          title: Sequence ID
          type: string
        sequence_name:
          title: Sequence Name
          type: string
        sequence_status:
          $ref: '#/components/schemas/WorkflowStatus'
        start_date:
          title: Start Date
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
        subscription_id:
          title: Subscription ID
          type: string
        subscription_status:
          $ref: '#/components/schemas/WorkflowRunStatus'
        subscription_status_reason:
          anyOf:
          - $ref: '#/components/schemas/StatusReason'
          - type: 'null'
      required:
      - contact_email
      - date_created
      - initial_email_id
      - sequence_id
      - sequence_name
      - sequence_status
      - start_date
      - subscription_id
      - subscription_status
      - subscription_status_reason
    Opportunity:
      title: Opportunity
      type: object
      properties:
        annualized_expected_value:
          title: Annualized Expected Value
          anyOf:
          - type: integer
          - type: 'null'
        annualized_value:
          title: Annualized Value
          anyOf:
          - type: integer
          - type: 'null'
        attachments:
          title: Attachments
          type: array
          items:
            $ref: '#/components/schemas/Attachment'
        comment_summary:
          title: Comment Summary
          anyOf:
          - $ref: '#/components/schemas/CommentSummary'
          - type: 'null'
        confidence:
          title: Confidence
          type: integer
        contact_id:
          title: Contact ID
          anyOf:
          - type: string
          - type: 'null'
        contact_name:
          title: Contact Name
          anyOf:
          - type: string
          - type: 'null'
        created_by:
          title: Created By
          anyOf:
          - type: string
          - type: 'null'
        created_by_name:
          title: Created By Name
          anyOf:
          - type: string
          - type: 'null'
        date_created:
          title: Date Created
          type: string
          format: date-time
        date_lost:
          title: Date Lost
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
        date_updated:
          title: Date Updated
          type: string
          format: date-time
        date_won:
          title: Date Won
          anyOf:
          - type: string
            format: date
          - type: 'null'
        expected_value:
          title: Expected Value
          anyOf:
          - type: integer
          - type: 'null'
        id:
          title: ID
          type: string
        integration_links:
          title: Integration Links
          type: array
          items:
            $ref: '#/components/schemas/RenderedIntegrationLink'
        is_stalled:
          title: Is Stalled
          type: boolean
        lead_id:
          title: Lead ID
          type: string
        lead_name:
          title: Lead Name
          anyOf:
          - type: string
          - type: 'null'
        lead_primary_email:
          title: Lead Primary Email
          anyOf:
          - $ref: '#/components/schemas/ContactEmail'
          - type: 'null'
        lead_primary_phone:
          title: Lead Primary Phone
          anyOf:
          - type: array
            items:
              $ref: '#/components/schemas/ContactPhone'
          - type: 'null'
        note:
          title: Note
          anyOf:
          - type: string
          - type: 'null'
        note_html:
          title: Note Html
          anyOf:
          - type: string
          - type: 'null'
        organization_id:
          title: Organization ID
          type: string
        pipeline_id:
          title: Pipeline ID
          anyOf:
          - type: string
          - type: 'null'
        pipeline_name:
          title: Pipeline Name
          anyOf:
          - type: string
          - type: 'null'
        stall_status:
          title: Stall Status
          anyOf:
          - $ref: '#/components/schemas/StalledOpportunityActionItems'
          - type: 'null'
        status_display_name:
          title: Status Display Name
          type: string
        status_id:
          title: Status ID
          type: string
        status_label:
          title: Status Label
          type: string
        status_type:
          title: Status Type
          $ref: '#/components/schemas/OpportunityStatusType'
        suggested_action:
          title: Suggested Action
          anyOf:
          - $ref: '#/components/schemas/OpportunitySuggestedAction'
          - type: 'null'
        updated_by:
          title: Updated By
          anyOf:
          - type: string
          - type: 'null'
        updated_by_name:
          title: Updated By Name
          anyOf:
          - type: string
          - type: 'null'
        user_id:
          title: User ID
          type: string
        user_name:
          title: User Name
          anyOf:
          - type: string
          - type: 'null'
        value:
          title: Value
          anyOf:
          - type: integer
          - type: 'null'
        value_currency:
          title: Value Currency
          anyOf:
          - type: string
          - type: 'null'
        value_formatted:
          title: Value Formatted
          anyOf:
          - type: string
          - type: 'null'
        value_period:
          $ref: '#/components/schemas/OpportunityValuePeriod'
      required:
      - annualized_expected_value
      - annualized_value
      - confidence
      - contact_id
      - created_by
      - date_created
      - date_lost
      - date_updated
      - date_won
      - expected_value
      - id
      - lead_id
      - note
      - note_html
      - organization_id
      - status_id
      - updated_by
      - user_id
      - value
      - value_period
    OpportunityStatusType:
      title: OpportunityStatusType
      type: string
      enum:
      - won
      - lost
      - active
    Lead:
      title: Lead
      type: object
      properties:
        addresses:
          title: Addresses
          type: array
          items:
            $ref: '#/components/schemas/LeadAddress'
        contact_ids:
          title: Contact IDs
          type: array
          items:
            type: string
        contacts:
          title: Contacts
          deprecated: true
          type: array
          items:
            $ref: '#/components/schemas/Contact'
        contacts_summary:
          title: Contacts Summary
          type: string
        created_by:
          title: Created By
          anyOf:
          - type: string
          - type: 'null'
        created_by_name:
          title: Created By Name
          anyOf:
          - type: string
          - type: 'null'
        date_created:
          title: Date Created
          type: string
          format: date-time
        date_updated:
          title: Date Updated
          type: string
          format: date-time
        description:
          title: Description
          anyOf:
          - type: string
          - type: 'null'
        display_name:
          title: Display Name
          type: string
        html_url:
          title: HTML URL
          type: string
        id:
          title: ID
          type: string
        integration_links:
          title: Integration Links
          type: array
          items:
            $ref: '#/components/schemas/RenderedIntegrationLink'
        localtime:
          title: Localtime
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
        name:
          title: Name
          anyOf:
          - type: string
          - type: 'null'
        opportunities:
          title: Opportunities
          deprecated: true
          type: array
          items:
            $ref: '#/components/schemas/Opportunity'
        organization_id:
          title: Organization ID
          type: string
        primary_address_full:
          title: Primary Address Full
          anyOf:
          - type: string
          - type: 'null'
        primary_address_summary:
          title: Primary Address Summary
          anyOf:
          - type: string
          - type: 'null'
        primary_email:
          title: Primary Email
          anyOf:
          - $ref: '#/components/schemas/ContactEmail'
          - type: 'null'
        primary_phone:
          title: Primary Phone
          anyOf:
          - $ref: '#/components/schemas/ContactPhone'
          - type: 'null'
        recent_calls:
          title: Recent Calls
          type: array
          items:
            type: object
            additionalProperties: true
        source:
          title: Source
          anyOf:
          - type: string
          - type: 'null'
        status_id:
          title: Status ID
          type: string
        status_label:
          title: Status Label
          type: string
        summaries:
          title: Summaries
          type: array
          items:
            type: object
            additionalProperties: true
        tasks:
          title: Tasks
          type: array
          items:
            type: object
            additionalProperties: true
        updated_by:
          title: Updated By
          anyOf:
          - type: string
          - type: 'null'
        updated_by_name:
          title: Updated By Name
          anyOf:
          - type: string
          - type: 'null'
        url:
          title: URL
          anyOf:
   

# --- truncated at 32 KB (45 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/close/refs/heads/main/openapi/close-leads-api-openapi.yml