# Structurely Direct v2

## Overview

The Structurely API allows integrators to provide automation for their accounts. It offers various functionalities to streamline lead management, messaging, lead qualification conversations, and retrieval of metadata.

The Structurely API simplifies the integration process and removes the necessity to track additional fields in your system. It is specifically designed to utilize **your system's IDs** as internal keys, enabling you to seamlessly use IDs from your CRM or database as parameters, such as externalLeadId, and externalMessageId.

By utilizing this API, integrators can streamline their workflows, activate enhanced AI qualification conversations, and gain valuable insights into their accounts, leads, and conversations.

### Security

The Structurely API provides secure authentication and authorization mechanisms to ensure controlled access to its endpoints. The authentication system utilizes API tokens to secure interactions with the API.

Types of tokens and keys:

  
- bearer-access-token: Bearer JWT; **valid until deactivated**

**Note:** It is essential to keep your bearer-access-tokens secure and avoid sharing them with unauthorized parties to maintain the integrity and security of your Structurely API integration.

Version: `v3.35.20`

## Calling

- [GET /api/direct/v2/calling/](/api/direct/v2/calling/get.md)
- [POST /api/direct/v2/calling/call](/api/direct/v2/calling/call/post.md)
- [POST /api/direct/v2/calling/{leadId}/call](/api/direct/v2/calling/{leadId}/call/post.md)
- [GET /api/direct/v2/calling/{leadId}/call/{callId}](/api/direct/v2/calling/{leadId}/call/{callId}/get.md)
- [PATCH /api/direct/v2/calling/{callId}/disposition](/api/direct/v2/calling/{callId}/disposition/patch.md)
- [POST /api/direct/v2/calling/track](/api/direct/v2/calling/track/post.md)
- [GET /api/direct/v2/calling/ai-agents](/api/direct/v2/calling/ai-agents/get.md)
- [GET /api/direct/v2/calling/scheduling](/api/direct/v2/calling/scheduling/get.md)
- [POST /api/direct/v2/calling/scheduling](/api/direct/v2/calling/scheduling/post.md)

### GET /api/direct/v2/calling/

[GET /api/direct/v2/calling/](/api/direct/v2/calling/get.md)

**Summary:** List calls

**Description:**

List calls using updatedAt and cursor pagination.

#### Parameters

- `updatedAt` (query, required: no)
  - Inclusive lower bound for call analyzedAt/finishedAt (ISO-8601). Required when cursor is not provided.
  - Schema:
    ```json
    {
      "type": "string"
    }
    ```
- `limit` (query, required: no)
  - Number of calls to return per page. Defaults to 50, between 10 and 100
  - Schema:
    ```json
    {
      "type": "integer"
    }
    ```
- `cursor` (query, required: no)
  - Cursor from a previous response.
  - Schema:
    ```json
    {
      "type": "string"
    }
    ```
- `leadId` (query, required: no)
  - Optional Structurely customer id or externalLeadId. First page only; mutually exclusive with cursor.
  - Schema:
    ```json
    {
      "type": "string"
    }
    ```

#### Responses

- `200`: Paginated call results
  - Schema: `CallList`
  ```json
  {
    "type": "object",
    "properties": {
      "items": {
        "type": "array",
        "description": "Paginated calls for incremental sync.",
        "items": {
          "$ref": "#/components/schemas/Call"
        }
      },
      "cursor": {
        "type": "string",
        "description": "Pagination cursor for the next page.",
        "nullable": true
      },
      "next": {
        "type": "string",
        "description": "Fully-qualified URL for the next page.",
        "nullable": true
      }
    },
    "required": [
      "items"
    ]
  }
  ```
- `400`: Invalid request, check response message
  - Schema: `InvalidRequest`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "The parameter leadId must be provided"
      },
      "statusCode": {
        "type": "number",
        "example": 400
      }
    }
  }
  ```
- `401`: Request is not authorized
  - Schema: `NotAuthorized`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Access Token is not authorized"
      },
      "statusCode": {
        "type": "number",
        "example": 401
      }
    }
  }
  ```
- `404`: Resource was not found, check response message
  - Schema: `NotFound`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Lead not found"
      },
      "statusCode": {
        "type": "number",
        "example": 404
      }
    }
  }
  ```
- `500`: Internal server error, check response message
  - Schema: `InternalServerError`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Internal server error"
      },
      "statusCode": {
        "type": "number",
        "example": 500
      }
    }
  }
  ```

#### Security

- `bearer-access-token`

#### Example request

```bash
curl -sS -X GET 'https://client.structurely.com/api/direct/v2/calling' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $STRUCTURELY_API_TOKEN"
```

### POST /api/direct/v2/calling/call

[POST /api/direct/v2/calling/call](/api/direct/v2/calling/call/post.md)

**Summary:** Create a lead and start a call, this will not start a Text Conversation

**Description:**

Create a new lead and immediately start a call with them

Optionally utilize your system's IDs as internal keys, pass IDs from your CRM or database as parameters for:
- externalLeadId: The Lead's ID from your CRM or database

#### Request body

The lead information and call metadata

Schema: `StartCall`

```json
{
  "type": "object",
  "properties": {
    "externalLeadId": {
      "type": "string",
      "description": "The ID for this lead in your CRM or database",
      "example": "b6726f23-1440-4206-962f-8c429f61714c",
      "nullable": true
    },
    "name": {
      "type": "string",
      "description": "Full name for this lead",
      "example": "Jane Doe"
    },
    "email": {
      "type": "string",
      "example": "jane.doe@example.com"
    },
    "phone": {
      "type": "string",
      "description": "Lead's phone number, E.164 or number with area code",
      "example": "(303) 555-5555"
    },
    "source": {
      "type": "string",
      "default": "Unknown",
      "description": "The vendor that sourced this lead (or website)",
      "example": "www.shiny-leads-vendor.com"
    },
    "properties": {
      "example": {},
      "description": "Properties that are known about the lead, may be used in responses, may be confirmed or skipped in scripting.",
      "allOf": [
        {
          "$ref": "#/components/schemas/Properties"
        }
      ]
    },
    "customProperties": {
      "type": "object",
      "description": "Optional top-level custom properties for this lead, represented as a dictionary with string keys. Value types: number|string|datetime|boolean|number[]|string[]|datetime[]|boolean[]. During normalization, datetimes are converted to UTC ISO-8601 strings and entries with blank keys, unsupported value types, or mixed-type arrays are dropped.",
      "example": {
        "birthday": "2026-01-01T00:00:00Z",
        "marketingOptIn": true,
        "preferredContactDays": [
          "monday",
          "friday"
        ]
      },
      "additionalProperties": {
        "oneOf": [
          {
            "type": "number"
          },
          {
            "type": "string"
          },
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "boolean"
          },
          {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "type": "array",
            "items": {
              "type": "boolean"
            }
          }
        ]
      },
      "nullable": true
    },
    "integrations": {
      "description": "Optional integration-specific metadata.",
      "example": {
        "salesforce": {
          "sfObjectId": "001XXXXXXXXXXXXXXX"
        }
      },
      "anyOf": [
        {
          "$ref": "#/components/schemas/IntegrationMetadata"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "assignAgent": {
      "description": "Optional agent assignment details for the lead",
      "example": {
        "agentId": "650ba6ced07cb5552a2467b0"
      },
      "anyOf": [
        {
          "$ref": "#/components/schemas/AssignAgent"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "callAiAgentId": {
      "type": "string",
      "description": "The ID of the Call AI Agent to use for the call (if not specified will make a direct call).",
      "nullable": true
    },
    "testPayloadClearDupeLeads": {
      "type": "boolean",
      "default": false,
      "description": "Only set this field during testing, it will automatically clear the phone, email, and externalLeadId for any lead enrolled with the same values.",
      "example": false,
      "nullable": true
    }
  }
}
```

#### Responses

- `200`: The call that was started
  - Schema: `Call`
  ```json
  {
    "type": "object",
    "properties": {
      "callId": {
        "description": "The ID of this call.",
        "type": "string",
        "format": "ObjectId"
      },
      "leadId": {
        "description": "The ID of the lead associated with this call.",
        "type": "string",
        "format": "ObjectId"
      },
      "externalLeadId": {
        "type": "string",
        "description": "Optional external ID for the lead.",
        "nullable": true
      },
      "callType": {
        "type": "string",
        "description": "The type of call."
      },
      "customerCallStatus": {
        "type": "string"
      },
      "agentCallStatus": {
        "type": "string"
      },
      "disposition": {
        "type": "string",
        "description": "Current disposition of the call."
      },
      "isOutboundCall": {
        "type": "boolean",
        "description": "Call direction."
      },
      "duration": {
        "type": "number",
        "description": "Duration of the call in seconds.",
        "nullable": true
      },
      "startedAt": {
        "type": "number",
        "description": "Timestamp when the call was initiated.",
        "nullable": true
      },
      "updatedAt": {
        "type": "number",
        "description": "Timestamp when the call was last updated.",
        "nullable": true
      },
      "finishedAt": {
        "type": "number",
        "description": "Timestamp when the call ended.",
        "nullable": true
      },
      "analyzedAt": {
        "type": "number",
        "description": "Timestamp when the call ended.",
        "nullable": true
      },
      "notes": {
        "type": "string",
        "nullable": true
      },
      "callAiAgent": {
        "description": "The AI agent used for the call.",
        "anyOf": [
          {
            "$ref": "#/components/schemas/CallAiAgent"
          },
          {
            "type": "object",
            "nullable": true
          }
        ]
      },
      "destinationNumber": {
        "type": "string",
        "description": "The phone number the call was made to.",
        "nullable": true
      },
      "sourceNumber": {
        "type": "string",
        "description": "The phone number the call was made from.",
        "nullable": true
      },
      "recordingUrl": {
        "type": "string",
        "description": "URL of the call recording.",
        "nullable": true
      },
      "slots": {
        "type": "object",
        "description": "Slot values extracted from the call.",
        "additionalProperties": {},
        "nullable": true
      },
      "transcript": {
        "type": "array",
        "description": "Transcript of the call conversation.",
        "items": {
          "$ref": "#/components/schemas/CallTranscript"
        },
        "nullable": true
      },
      "callMetadata": {
        "type": "object",
        "description": "Metadata associated with the call.",
        "additionalProperties": {},
        "nullable": true
      }
    },
    "required": [
      "callId",
      "callType",
      "leadId"
    ]
  }
  ```
- `400`: Invalid request, check response message
  - Schema: `InvalidRequest`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "The parameter leadId must be provided"
      },
      "statusCode": {
        "type": "number",
        "example": 400
      }
    }
  }
  ```
- `401`: Request is not authorized
  - Schema: `NotAuthorized`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Access Token is not authorized"
      },
      "statusCode": {
        "type": "number",
        "example": 401
      }
    }
  }
  ```
- `404`: Resource was not found, check response message
  - Schema: `NotFound`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Lead not found"
      },
      "statusCode": {
        "type": "number",
        "example": 404
      }
    }
  }
  ```
- `500`: Internal server error, check response message
  - Schema: `InternalServerError`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Internal server error"
      },
      "statusCode": {
        "type": "number",
        "example": 500
      }
    }
  }
  ```

#### Security

- `bearer-access-token`

#### Example request

```bash
curl -sS -X POST 'https://client.structurely.com/api/direct/v2/calling/call' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $STRUCTURELY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### POST /api/direct/v2/calling/{leadId}/call

[POST /api/direct/v2/calling/{leadId}/call](/api/direct/v2/calling/{leadId}/call/post.md)

**Summary:** Start a call for a lead that is already in the system

**Description:**

Start a call for a lead that is already in the system

Optionally utilize your system's IDs as internal keys, pass IDs from your CRM or database as parameters for:
- externalLeadId: The Lead's ID from your CRM or database

#### Parameters

- `leadId` (path, required: yes)
  - The Lead's ID, either the Structurely Lead ID, or the externalLeadId you used when creating the lead.
  - Schema:
    ```json
    {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "format": "ObjectId",
          "type": "string"
        }
      ]
    }
    ```

#### Request body

The metadata for calling a lead

Schema: `CallLead`

```json
{
  "type": "object",
  "properties": {
    "callAiAgentId": {
      "type": "string",
      "description": "The ID of the Call AI Agent to use for the call (if not specified will make a direct call).",
      "nullable": true
    },
    "properties": {
      "example": {
        "address": "12345 Deckawoo Dr, Denver, CO, 80132"
      },
      "description": "Properties that are known about the lead.",
      "anyOf": [
        {
          "$ref": "#/components/schemas/Properties"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    }
  }
}
```

#### Responses

- `200`: The call that was started
  - Schema: `Call`
  ```json
  {
    "type": "object",
    "properties": {
      "callId": {
        "description": "The ID of this call.",
        "type": "string",
        "format": "ObjectId"
      },
      "leadId": {
        "description": "The ID of the lead associated with this call.",
        "type": "string",
        "format": "ObjectId"
      },
      "externalLeadId": {
        "type": "string",
        "description": "Optional external ID for the lead.",
        "nullable": true
      },
      "callType": {
        "type": "string",
        "description": "The type of call."
      },
      "customerCallStatus": {
        "type": "string"
      },
      "agentCallStatus": {
        "type": "string"
      },
      "disposition": {
        "type": "string",
        "description": "Current disposition of the call."
      },
      "isOutboundCall": {
        "type": "boolean",
        "description": "Call direction."
      },
      "duration": {
        "type": "number",
        "description": "Duration of the call in seconds.",
        "nullable": true
      },
      "startedAt": {
        "type": "number",
        "description": "Timestamp when the call was initiated.",
        "nullable": true
      },
      "updatedAt": {
        "type": "number",
        "description": "Timestamp when the call was last updated.",
        "nullable": true
      },
      "finishedAt": {
        "type": "number",
        "description": "Timestamp when the call ended.",
        "nullable": true
      },
      "analyzedAt": {
        "type": "number",
        "description": "Timestamp when the call ended.",
        "nullable": true
      },
      "notes": {
        "type": "string",
        "nullable": true
      },
      "callAiAgent": {
        "description": "The AI agent used for the call.",
        "anyOf": [
          {
            "$ref": "#/components/schemas/CallAiAgent"
          },
          {
            "type": "object",
            "nullable": true
          }
        ]
      },
      "destinationNumber": {
        "type": "string",
        "description": "The phone number the call was made to.",
        "nullable": true
      },
      "sourceNumber": {
        "type": "string",
        "description": "The phone number the call was made from.",
        "nullable": true
      },
      "recordingUrl": {
        "type": "string",
        "description": "URL of the call recording.",
        "nullable": true
      },
      "slots": {
        "type": "object",
        "description": "Slot values extracted from the call.",
        "additionalProperties": {},
        "nullable": true
      },
      "transcript": {
        "type": "array",
        "description": "Transcript of the call conversation.",
        "items": {
          "$ref": "#/components/schemas/CallTranscript"
        },
        "nullable": true
      },
      "callMetadata": {
        "type": "object",
        "description": "Metadata associated with the call.",
        "additionalProperties": {},
        "nullable": true
      }
    },
    "required": [
      "callId",
      "callType",
      "leadId"
    ]
  }
  ```
- `400`: Invalid request, check response message
  - Schema: `InvalidRequest`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "The parameter leadId must be provided"
      },
      "statusCode": {
        "type": "number",
        "example": 400
      }
    }
  }
  ```
- `401`: Request is not authorized
  - Schema: `NotAuthorized`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Access Token is not authorized"
      },
      "statusCode": {
        "type": "number",
        "example": 401
      }
    }
  }
  ```
- `404`: Resource was not found, check response message
  - Schema: `NotFound`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Lead not found"
      },
      "statusCode": {
        "type": "number",
        "example": 404
      }
    }
  }
  ```
- `500`: Internal server error, check response message
  - Schema: `InternalServerError`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Internal server error"
      },
      "statusCode": {
        "type": "number",
        "example": 500
      }
    }
  }
  ```

#### Security

- `bearer-access-token`

#### Example request

```bash
curl -sS -X POST 'https://client.structurely.com/api/direct/v2/calling/{leadId}/call' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $STRUCTURELY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### GET /api/direct/v2/calling/{leadId}/call/{callId}

[GET /api/direct/v2/calling/{leadId}/call/{callId}](/api/direct/v2/calling/{leadId}/call/{callId}/get.md)

**Summary:** Get call details for a lead

**Description:**

Get details of a specific call for a lead

Optionally utilize your system's IDs as internal keys, pass IDs from your CRM or database as parameters for:
- leadId: The Lead's ID from your CRM or database

#### Parameters

- `leadId` (path, required: yes)
  - The Lead's ID, either the Structurely Lead ID, or the externalLeadId you used when creating the lead.
  - Schema:
    ```json
    {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "format": "ObjectId",
          "type": "string"
        }
      ]
    }
    ```
- `callId` (path, required: yes)
  - The Call's ID.
  - Schema:
    ```json
    {
      "oneOf": [
        {
          "format": "ObjectId",
          "type": "string"
        }
      ]
    }
    ```

#### Responses

- `200`: The call details
  - Schema: `Call`
  ```json
  {
    "type": "object",
    "properties": {
      "callId": {
        "description": "The ID of this call.",
        "type": "string",
        "format": "ObjectId"
      },
      "leadId": {
        "description": "The ID of the lead associated with this call.",
        "type": "string",
        "format": "ObjectId"
      },
      "externalLeadId": {
        "type": "string",
        "description": "Optional external ID for the lead.",
        "nullable": true
      },
      "callType": {
        "type": "string",
        "description": "The type of call."
      },
      "customerCallStatus": {
        "type": "string"
      },
      "agentCallStatus": {
        "type": "string"
      },
      "disposition": {
        "type": "string",
        "description": "Current disposition of the call."
      },
      "isOutboundCall": {
        "type": "boolean",
        "description": "Call direction."
      },
      "duration": {
        "type": "number",
        "description": "Duration of the call in seconds.",
        "nullable": true
      },
      "startedAt": {
        "type": "number",
        "description": "Timestamp when the call was initiated.",
        "nullable": true
      },
      "updatedAt": {
        "type": "number",
        "description": "Timestamp when the call was last updated.",
        "nullable": true
      },
      "finishedAt": {
        "type": "number",
        "description": "Timestamp when the call ended.",
        "nullable": true
      },
      "analyzedAt": {
        "type": "number",
        "description": "Timestamp when the call ended.",
        "nullable": true
      },
      "notes": {
        "type": "string",
        "nullable": true
      },
      "callAiAgent": {
        "description": "The AI agent used for the call.",
        "anyOf": [
          {
            "$ref": "#/components/schemas/CallAiAgent"
          },
          {
            "type": "object",
            "nullable": true
          }
        ]
      },
      "destinationNumber": {
        "type": "string",
        "description": "The phone number the call was made to.",
        "nullable": true
      },
      "sourceNumber": {
        "type": "string",
        "description": "The phone number the call was made from.",
        "nullable": true
      },
      "recordingUrl": {
        "type": "string",
        "description": "URL of the call recording.",
        "nullable": true
      },
      "slots": {
        "type": "object",
        "description": "Slot values extracted from the call.",
        "additionalProperties": {},
        "nullable": true
      },
      "transcript": {
        "type": "array",
        "description": "Transcript of the call conversation.",
        "items": {
          "$ref": "#/components/schemas/CallTranscript"
        },
        "nullable": true
      },
      "callMetadata": {
        "type": "object",
        "description": "Metadata associated with the call.",
        "additionalProperties": {},
        "nullable": true
      }
    },
    "required": [
      "callId",
      "callType",
      "leadId"
    ]
  }
  ```
- `400`: Invalid request, check response message
  - Schema: `InvalidRequest`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "The parameter leadId must be provided"
      },
      "statusCode": {
        "type": "number",
        "example": 400
      }
    }
  }
  ```
- `401`: Request is not authorized
  - Schema: `NotAuthorized`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Access Token is not authorized"
      },
      "statusCode": {
        "type": "number",
        "example": 401
      }
    }
  }
  ```
- `404`: Resource was not found, check response message
  - Schema: `NotFound`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Lead not found"
      },
      "statusCode": {
        "type": "number",
        "example": 404
      }
    }
  }
  ```
- `500`: Internal server error, check response message
  - Schema: `InternalServerError`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Internal server error"
      },
      "statusCode": {
        "type": "number",
        "example": 500
      }
    }
  }
  ```

#### Security

- `bearer-access-token`

#### Example request

```bash
curl -sS -X GET 'https://client.structurely.com/api/direct/v2/calling/{leadId}/call/{callId}' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $STRUCTURELY_API_TOKEN"
```

### PATCH /api/direct/v2/calling/{callId}/disposition

[PATCH /api/direct/v2/calling/{callId}/disposition](/api/direct/v2/calling/{callId}/disposition/patch.md)

**Summary:** Update a call disposition

**Description:**

Set call disposition for a specific call.

#### Parameters

- `callId` (path, required: yes)
  - The Call's ID.
  - Schema:
    ```json
    {
      "oneOf": [
        {
          "format": "ObjectId",
          "type": "string"
        }
      ]
    }
    ```

#### Request body

Payload for updating call disposition

Schema: `CallDispositionUpdate`

```json
{
  "type": "object",
  "properties": {
    "disposition": {
      "type": "string",
      "enum": [
        "Answering Machine",
        "Connected",
        "Appointment Set",
        "Live Transferred",
        "Live Transfer Failed",
        "Call Back Later",
        "Did Not Leave Voicemail",
        "Do Not Call",
        "Do Not Contact",
        "Left Voicemail",
        "Not Interested",
        "No Conversation",
        "Reconnect Later",
        "Wrong Number",
        "Call Blocked, Detected as Spam",
        "Door Visit",
        "Agent Voicemail"
      ],
      "description": "Disposition to set for the call.",
      "example": "Connected"
    }
  },
  "required": [
    "disposition"
  ]
}
```

#### Responses

- `200`: The updated call
  - Schema: `Call`
  ```json
  {
    "type": "object",
    "properties": {
      "callId": {
        "description": "The ID of this call.",
        "type": "string",
        "format": "ObjectId"
      },
      "leadId": {
        "description": "The ID of the lead associated with this call.",
        "type": "string",
        "format": "ObjectId"
      },
      "externalLeadId": {
        "type": "string",
        "description": "Optional external ID for the lead.",
        "nullable": true
      },
      "callType": {
        "type": "string",
        "description": "The type of call."
      },
      "customerCallStatus": {
        "type": "string"
      },
      "agentCallStatus": {
        "type": "string"
      },
      "disposition": {
        "type": "string",
        "description": "Current disposition of the call."
      },
      "isOutboundCall": {
        "type": "boolean",
        "description": "Call direction."
      },
      "duration": {
        "type": "number",
        "description": "Duration of the call in seconds.",
        "nullable": true
      },
      "startedAt": {
        "type": "number",
        "description": "Timestamp when the call was initiated.",
        "nullable": true
      },
      "updatedAt": {
        "type": "number",
        "description": "Timestamp when the call was last updated.",
        "nullable": true
      },
      "finishedAt": {
        "type": "number",
        "description": "Timestamp when the call ended.",
        "nullable": true
      },
      "analyzedAt": {
        "type": "number",
        "description": "Timestamp when the call ended.",
        "nullable": true
      },
      "notes": {
        "type": "string",
        "nullable": true
      },
      "callAiAgent": {
        "description": "The AI agent used for the call.",
        "anyOf": [
          {
            "$ref": "#/components/schemas/CallAiAgent"
          },
          {
            "type": "object",
            "nullable": true
          }
        ]
      },
      "destinationNumber": {
        "type": "string",
        "description": "The phone number the call was made to.",
        "nullable": true
      },
      "sourceNumber": {
        "type": "string",
        "description": "The phone number the call was made from.",
        "nullable": true
      },
      "recordingUrl": {
        "type": "string",
        "description": "URL of the call recording.",
        "nullable": true
      },
      "slots": {
        "type": "object",
        "description": "Slot values extracted from the call.",
        "additionalProperties": {},
        "nullable": true
      },
      "transcript": {
        "type": "array",
        "description": "Transcript of the call conversation.",
        "items": {
          "$ref": "#/components/schemas/CallTranscript"
        },
        "nullable": true
      },
      "callMetadata": {
        "type": "object",
        "description": "Metadata associated with the call.",
        "additionalProperties": {},
        "nullable": true
      }
    },
    "required": [
      "callId",
      "callType",
      "leadId"
    ]
  }
  ```
- `400`: Invalid request, check response message
  - Schema: `InvalidRequest`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "The parameter leadId must be provided"
      },
      "statusCode": {
        "type": "number",
        "example": 400
      }
    }
  }
  ```
- `401`: Request is not authorized
  - Schema: `NotAuthorized`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Access Token is not authorized"
      },
      "statusCode": {
        "type": "number",
        "example": 401
      }
    }
  }
  ```
- `404`: Resource was not found, check response message
  - Schema: `NotFound`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Lead not found"
      },
      "statusCode": {
        "type": "number",
        "example": 404
      }
    }
  }
  ```
- `500`: Internal server error, check response message
  - Schema: `InternalServerError`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Internal server error"
      },
      "statusCode": {
        "type": "number",
        "example": 500
      }
    }
  }
  ```

#### Security

- `bearer-access-token`

#### Example request

```bash
curl -sS -X PATCH 'https://client.structurely.com/api/direct/v2/calling/{callId}/disposition' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $STRUCTURELY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "disposition": "Connected"
}'
```

### POST /api/direct/v2/calling/track

[POST /api/direct/v2/calling/track](/api/direct/v2/calling/track/post.md)

**Summary:** Track vendor call ingestion

**Description:**

Ingest an externally completed call, dedupe by vendor call id, and return call details.

#### Request body

Vendor call tracking payload

Schema: `TrackCallRequest`

```json
{
  "type": "object",
  "properties": {
    "startedAt": {
      "type": "string",
      "format": "date-time"
    },
    "finishedAt": {
      "type": "string",
      "format": "date-time"
    },
    "vendorCallId": {
      "type": "string"
    },
    "vendorName": {
      "type": "string"
    },
    "callType": {
      "description": "The type of tracked call.",
      "example": "AgentStarted",
      "type": "string",
      "enum": [
        "CustomerStarted",
        "AgentStarted",
        "DialerStarted",
        "DoorVisit"
      ]
    },
    "recordingUrl": {
      "type": "string"
    },
    "callDisposition": {
      "description": "Optional disposition to set for the tracked call.",
      "example": "Connected",
      "type": "string",
      "enum": [
        "Busy",
        "Failed",
        "Answering Machine",
        "No Answer",
        "Connected",
        "Appointment Set",
        "Live Transferred",
        "Live Transfer Failed",
        "Call Back Later",
        "Did Not Leave Voicemail",
        "Do Not Call",
        "Do Not Contact",
        "Left Voicemail",
        "Not Interested",
        "No Conversation",
        "Reconnect Later",
        "Wrong Number",
        "Call Blocked, Detected as Spam",
        "Door Visit",
        "Agent Voicemail",
        null
      ],
      "nullable": true
    },
    "lead": {
      "anyOf": [
        {
          "type": "object",
          "nullable": true
        },
        {
          "$ref": "#/components/schemas/CreateLead"
        }
      ]
    }
  },
  "required": [
    "callType",
    "finishedAt",
    "recordingUrl",
    "startedAt",
    "vendorCallId",
    "vendorName"
  ]
}
```

#### Responses

- `200`: Tracked call payload
  - Schema: `Call`
  ```json
  {
    "type": "object",
    "properties": {
      "callId": {
        "description": "The ID of this call.",
        "type": "string",
        "format": "ObjectId"
      },
      "leadId": {
        "description": "The ID of the lead associated with this call.",
        "type": "string",
        "format": "ObjectId"
      },
      "externalLeadId": {
        "type": "string",
        "description": "Optional external ID for the lead.",
        "nullable": true
      },
      "callType": {
        "type": "string",
        "description": "The type of call."
      },
      "customerCallStatus": {
        "type": "string"
      },
      "agentCallStatus": {
        "type": "string"
      },
      "disposition": {
        "type": "string",
        "description": "Current disposition of the call."
      },
      "isOutboundCall": {
        "type": "boolean",
        "description": "Call direction."
      },
      "duration": {
        "type": "number",
        "description": "Duration of the call in seconds.",
        "nullable": true
      },
      "startedAt": {
        "type": "number",
        "description": "Timestamp when the call was initiated.",
        "nullable": true
      },
      "updatedAt": {
        "type": "number",
        "description": "Timestamp when the call was last updated.",
        "nullable": true
      },
      "finishedAt": {
        "type": "number",
        "description": "Timestamp when the call ended.",
        "nullable": true
      },
      "analyzedAt": {
        "type": "number",
        "description": "Timestamp when the call ended.",
        "nullable": true
      },
      "notes": {
        "type": "string",
        "nullable": true
      },
      "callAiAgent": {
        "description": "The AI agent used for the call.",
        "anyOf": [
          {
            "$ref": "#/components/schemas/CallAiAgent"
          },
          {
            "type": "object",
            "nullable": true
          }
        ]
      },
      "destinationNumber": {
        "type": "string",
        "description": "The phone number the call was made to.",
        "nullable": true
      },
      "sourceNumber": {
        "type": "string",
        "description": "The phone number the call was made from.",
        "nullable": true
      },
      "recordingUrl": {
        "type": "string",
        "description": "URL of the call recording.",
        "nullable": true
      },
      "slots": {
        "type": "object",
        "description": "Slot values extracted from the call.",
        "additionalProperties": {},
        "nullable": true
      },
      "transcript": {
        "type": "array",
        "description": "Transcript of the call conversation.",
        "items": {
          "$ref": "#/components/schemas/CallTranscript"
        },
        "nullable": true
      },
      "callMetadata": {
        "type": "object",
        "description": "Metadata associated with the call.",
        "additionalProperties": {},
        "nullable": true
      }
    },
    "required": [
      "callId",
      "callType",
      "leadId"
    ]
  }
  ```
- `400`: Invalid request, check response message
  - Schema: `InvalidRequest`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "The parameter leadId must be provided"
      },
      "statusCode": {
        "type": "number",
        "example": 400
      }
    }
  }
  ```
- `401`: Request is not authorized
  - Schema: `NotAuthorized`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Access Token is not authorized"
      },
      "statusCode": {
        "type": "number",
        "example": 401
      }
    }
  }
  ```
- `500`: Internal server error, check response message
  - Schema: `InternalServerError`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Internal server error"
      },
      "statusCode": {
        "type": "number",
        "example": 500
      }
    }
  }
  ```

#### Security

- `bearer-access-token`

#### Example request

```bash
curl -sS -X POST 'https://client.structurely.com/api/direct/v2/calling/track' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $STRUCTURELY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "callType": "AgentStarted",
  "finishedAt": "string",
  "recordingUrl": "string",
  "startedAt": "string",
  "vendorCallId": "string",
  "vendorName": "string"
}'
```

### GET /api/direct/v2/calling/ai-agents

[GET /api/direct/v2/calling/ai-agents](/api/direct/v2/calling/ai-agents/get.md)

**Summary:** List CallAI Agents

**Description:**

List all the CallAI Agents in your account

#### Responses

- `200`: A response containing all the active agents in your account
  - Schema: `CallAiAgentList`
  ```json
  {
    "type": "object",
    "properties": {
      "agents": {
        "type": "array",
        "description": "A list of available AI Call Agents.",
        "items": {
          "$ref": "#/components/schemas/CallAiAgent"
        }
      }
    },
    "required": [
      "agents"
    ]
  }
  ```
- `400`: Invalid request, check response message
  - Schema: `InvalidRequest`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "The parameter leadId must be provided"
      },
      "statusCode": {
        "type": "number",
        "example": 400
      }
    }
  }
  ```
- `401`: Request is not authorized
  - Schema: `NotAuthorized`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Access Token is not authorized"
      },
      "statusCode": {
        "type": "number",
        "example": 401
      }
    }
  }
  ```
- `404`: Resource was not found, check response message
  - Schema: `NotFound`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Lead not found"
      },
      "statusCode": {
        "type": "number",
        "example": 404
      }
    }
  }
  ```
- `500`: Internal server error, check response message
  - Schema: `InternalServerError`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Internal server error"
      },
      "statusCode": {
        "type": "number",
        "example": 500
      }
    }
  }
  ```

#### Security

- `bearer-access-token`

#### Example request

```bash
curl -sS -X GET 'https://client.structurely.com/api/direct/v2/calling/ai-agents' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $STRUCTURELY_API_TOKEN"
```

### GET /api/direct/v2/calling/scheduling

[GET /api/direct/v2/calling/scheduling](/api/direct/v2/calling/scheduling/get.md)

**Summary:** Get scheduled calling status

**Description:**

Get current scheduled calling status and configuration

#### Responses

- `200`: Scheduling status information
  - Schema: `SchedulingStatus`
  ```json
  {
    "type": "object",
    "properties": {
      "enabled": {
        "type": "boolean",
        "description": "Whether scheduled calling is enabled",
        "example": true
      },
      "current_status": {
        "type": "string",
        "enum": [
          "Active",
          "Disabled",
          "Sleeping"
        ],
        "description": "Current scheduling status",
        "example": "Active"
      }
    }
  }
  ```
- `400`: Invalid request, check response message
  - Schema: `InvalidRequest`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "The parameter leadId must be provided"
      },
      "statusCode": {
        "type": "number",
        "example": 400
      }
    }
  }
  ```
- `401`: Request is not authorized
  - Schema: `NotAuthorized`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Access Token is not authorized"
      },
      "statusCode": {
        "type": "number",
        "example": 401
      }
    }
  }
  ```
- `404`: Resource was not found, check response message
  - Schema: `NotFound`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Lead not found"
      },
      "statusCode": {
        "type": "number",
        "example": 404
      }
    }
  }
  ```
- `500`: Internal server error, check response message
  - Schema: `InternalServerError`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Internal server error"
      },
      "statusCode": {
        "type": "number",
        "example": 500
      }
    }
  }
  ```

#### Security

- `bearer-access-token`

#### Example request

```bash
curl -sS -X GET 'https://client.structurely.com/api/direct/v2/calling/scheduling' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $STRUCTURELY_API_TOKEN"
```

### POST /api/direct/v2/calling/scheduling

[POST /api/direct/v2/calling/scheduling](/api/direct/v2/calling/scheduling/post.md)

**Summary:** Enable or disable scheduled calling

**Description:**

Toggle scheduled calling on/off for the authenticated entity

#### Request body

Enable/disable scheduled calling

Schema: `SchedulingSettings`

```json
{
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean",
      "description": "Enable or disable scheduled calling",
      "example": true
    }
  },
  "required": [
    "enabled"
  ]
}
```

#### Responses

- `200`: Current scheduling status
  - Schema: `SchedulingStatus`
  ```json
  {
    "type": "object",
    "properties": {
      "enabled": {
        "type": "boolean",
        "description": "Whether scheduled calling is enabled",
        "example": true
      },
      "current_status": {
        "type": "string",
        "enum": [
          "Active",
          "Disabled",
          "Sleeping"
        ],
        "description": "Current scheduling status",
        "example": "Active"
      }
    }
  }
  ```
- `400`: Invalid request, check response message
  - Schema: `InvalidRequest`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "The parameter leadId must be provided"
      },
      "statusCode": {
        "type": "number",
        "example": 400
      }
    }
  }
  ```
- `401`: Request is not authorized
  - Schema: `NotAuthorized`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Access Token is not authorized"
      },
      "statusCode": {
        "type": "number",
        "example": 401
      }
    }
  }
  ```
- `404`: Resource was not found, check response message
  - Schema: `NotFound`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Lead not found"
      },
      "statusCode": {
        "type": "number",
        "example": 404
      }
    }
  }
  ```
- `500`: Internal server error, check response message
  - Schema: `InternalServerError`
  ```json
  {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "A message describing the error",
        "example": "Internal server error"
      },
      "statusCode": {
        "type": "number",
        "example": 500
      }
    }
  }
  ```

#### Security

- `bearer-access-token`

#### Example request

```bash
curl -sS -X POST 'https://client.structurely.com/api/direct/v2/calling/scheduling' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $STRUCTURELY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": true
}'
```

## Schemas

### `AcculynxIntegration`

```json
{
  "type": "object",
  "properties": {
    "contactId": {
      "type": "string",
      "description": "Acculynx Contact ID",
      "example": "12345"
    },
    "jobId": {
      "type": "string",
      "description": "Acculynx Job ID",
      "example": "67890"
    },
    "appointmentId": {
      "type": "string",
      "description": "Acculynx Appointment ID",
      "example": "54321",
      "nullable": true
    }
  },
  "required": [
    "contactId",
    "jobId"
  ]
}
```

### `AgentLegendIntegration`

```json
{
  "type": "object",
  "properties": {
    "prospectId": {
      "type": "integer",
      "description": "Agent Legend Prospect ID",
      "example": 12345
    }
  },
  "required": [
    "prospectId"
  ]
}
```

### `AssignAgent`

```json
{
  "type": "object",
  "properties": {
    "agentId": {
      "description": "The ID of the agent to assign in Structurely.",
      "example": "650ba6ced07cb5552a2467b0",
      "type": "string",
      "format": "ObjectId",
      "nullable": true
    },
    "name": {
      "type": "string",
      "description": "Full name of the agent to assign.",
      "example": "John Agent",
      "nullable": true
    },
    "email": {
      "type": "string",
      "description": "Email of the agent to assign.",
      "example": "john.agent@example.com",
      "nullable": true
    },
    "phone": {
      "type": "string",
      "description": "Phone number of the agent to assign (E.164 or number with area code).",
      "example": "+13035551234",
      "nullable": true
    }
  }
}
```

### `BonzoIntegration`

```json
{
  "type": "object",
  "properties": {
    "prospectId": {
      "type": "integer",
      "description": "Bonzo Prospect ID",
      "example": 12345
    }
  },
  "required": [
    "prospectId"
  ]
}
```

### `BoomTownIntegration`

```json
{
  "type": "object",
  "properties": {
    "contactId": {
      "type": "string",
      "description": "BoomTown Contact ID",
      "example": "12345"
    }
  },
  "required": [
    "contactId"
  ]
}
```

### `Call`

```json
{
  "type": "object",
  "properties": {
    "callId": {
      "description": "The ID of this call.",
      "type": "string",
      "format": "ObjectId"
    },
    "leadId": {
      "description": "The ID of the lead associated with this call.",
      "type": "string",
      "format": "ObjectId"
    },
    "externalLeadId": {
      "type": "string",
      "description": "Optional external ID for the lead.",
      "nullable": true
    },
    "callType": {
      "type": "string",
      "description": "The type of call."
    },
    "customerCallStatus": {
      "type": "string"
    },
    "agentCallStatus": {
      "type": "string"
    },
    "disposition": {
      "type": "string",
      "description": "Current disposition of the call."
    },
    "isOutboundCall": {
      "type": "boolean",
      "description": "Call direction."
    },
    "duration": {
      "type": "number",
      "description": "Duration of the call in seconds.",
      "nullable": true
    },
    "startedAt": {
      "type": "number",
      "description": "Timestamp when the call was initiated.",
      "nullable": true
    },
    "updatedAt": {
      "type": "number",
      "description": "Timestamp when the call was last updated.",
      "nullable": true
    },
    "finishedAt": {
      "type": "number",
      "description": "Timestamp when the call ended.",
      "nullable": true
    },
    "analyzedAt": {
      "type": "number",
      "description": "Timestamp when the call ended.",
      "nullable": true
    },
    "notes": {
      "type": "string",
      "nullable": true
    },
    "callAiAgent": {
      "description": "The AI agent used for the call.",
      "anyOf": [
        {
          "$ref": "#/components/schemas/CallAiAgent"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "destinationNumber": {
      "type": "string",
      "description": "The phone number the call was made to.",
      "nullable": true
    },
    "sourceNumber": {
      "type": "string",
      "description": "The phone number the call was made from.",
      "nullable": true
    },
    "recordingUrl": {
      "type": "string",
      "description": "URL of the call recording.",
      "nullable": true
    },
    "slots": {
      "type": "object",
      "description": "Slot values extracted from the call.",
      "additionalProperties": {},
      "nullable": true
    },
    "transcript": {
      "type": "array",
      "description": "Transcript of the call conversation.",
      "items": {
        "$ref": "#/components/schemas/CallTranscript"
      },
      "nullable": true
    },
    "callMetadata": {
      "type": "object",
      "description": "Metadata associated with the call.",
      "additionalProperties": {},
      "nullable": true
    }
  },
  "required": [
    "callId",
    "callType",
    "leadId"
  ]
}
```

### `CallAiAgent`

```json
{
  "type": "object",
  "properties": {
    "id": {
      "description": "ID of the Voice AI Agent.",
      "type": "string",
      "format": "ObjectId"
    },
    "name": {
      "type": "string",
      "description": "Name of the Voice AI Agent."
    }
  }
}
```

### `CallAiAgentList`

```json
{
  "type": "object",
  "properties": {
    "agents": {
      "type": "array",
      "description": "A list of available AI Call Agents.",
      "items": {
        "$ref": "#/components/schemas/CallAiAgent"
      }
    }
  },
  "required": [
    "agents"
  ]
}
```

### `CallDispositionUpdate`

```json
{
  "type": "object",
  "properties": {
    "disposition": {
      "type": "string",
      "enum": [
        "Answering Machine",
        "Connected",
        "Appointment Set",
        "Live Transferred",
        "Live Transfer Failed",
        "Call Back Later",
        "Did Not Leave Voicemail",
        "Do Not Call",
        "Do Not Contact",
        "Left Voicemail",
        "Not Interested",
        "No Conversation",
        "Reconnect Later",
        "Wrong Number",
        "Call Blocked, Detected as Spam",
        "Door Visit",
        "Agent Voicemail"
      ],
      "description": "Disposition to set for the call.",
      "example": "Connected"
    }
  },
  "required": [
    "disposition"
  ]
}
```

### `CallLead`

```json
{
  "type": "object",
  "properties": {
    "callAiAgentId": {
      "type": "string",
      "description": "The ID of the Call AI Agent to use for the call (if not specified will make a direct call).",
      "nullable": true
    },
    "properties": {
      "example": {
        "address": "12345 Deckawoo Dr, Denver, CO, 80132"
      },
      "description": "Properties that are known about the lead.",
      "anyOf": [
        {
          "$ref": "#/components/schemas/Properties"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    }
  }
}
```

### `CallList`

```json
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "description": "Paginated calls for incremental sync.",
      "items": {
        "$ref": "#/components/schemas/Call"
      }
    },
    "cursor": {
      "type": "string",
      "description": "Pagination cursor for the next page.",
      "nullable": true
    },
    "next": {
      "type": "string",
      "description": "Fully-qualified URL for the next page.",
      "nullable": true
    }
  },
  "required": [
    "items"
  ]
}
```

### `CallTranscript`

```json
{
  "type": "object",
  "properties": {
    "speaker": {
      "type": "string"
    },
    "occurred_at": {
      "type": "number"
    },
    "transcript": {
      "type": "string"
    },
    "confidence": {
      "type": "number",
      "nullable": true
    }
  },
  "required": [
    "occurred_at",
    "speaker",
    "transcript"
  ]
}
```

### `CreateLead`

```json
{
  "type": "object",
  "properties": {
    "externalLeadId": {
      "type": "string",
      "description": "The ID for this lead in your CRM or database",
      "example": "b6726f23-1440-4206-962f-8c429f61714c",
      "nullable": true
    },
    "name": {
      "type": "string",
      "description": "Full name for this lead",
      "example": "Jane Doe"
    },
    "email": {
      "type": "string",
      "example": "jane.doe@example.com"
    },
    "phone": {
      "type": "string",
      "description": "Lead's phone number, E.164 or number with area code",
      "example": "(303) 555-5555"
    },
    "source": {
      "type": "string",
      "default": "Unknown",
      "description": "The vendor that sourced this lead (or website)",
      "example": "www.shiny-leads-vendor.com"
    },
    "properties": {
      "example": {},
      "description": "Properties that are known about the lead, may be used in responses, may be confirmed or skipped in scripting.",
      "allOf": [
        {
          "$ref": "#/components/schemas/Properties"
        }
      ]
    },
    "customProperties": {
      "type": "object",
      "description": "Optional top-level custom properties for this lead, represented as a dictionary with string keys. Value types: number|string|datetime|boolean|number[]|string[]|datetime[]|boolean[]. During normalization, datetimes are converted to UTC ISO-8601 strings and entries with blank keys, unsupported value types, or mixed-type arrays are dropped.",
      "example": {
        "birthday": "2026-01-01T00:00:00Z",
        "marketingOptIn": true,
        "preferredContactDays": [
          "monday",
          "friday"
        ]
      },
      "additionalProperties": {
        "oneOf": [
          {
            "type": "number"
          },
          {
            "type": "string"
          },
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "boolean"
          },
          {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "type": "array",
            "items": {
              "type": "boolean"
            }
          }
        ]
      },
      "nullable": true
    },
    "integrations": {
      "description": "Optional integration-specific metadata.",
      "example": {
        "salesforce": {
          "sfObjectId": "001XXXXXXXXXXXXXXX"
        }
      },
      "anyOf": [
        {
          "$ref": "#/components/schemas/IntegrationMetadata"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "assignAgent": {
      "description": "Optional agent assignment details for the lead",
      "example": {
        "agentId": "650ba6ced07cb5552a2467b0"
      },
      "anyOf": [
        {
          "$ref": "#/components/schemas/AssignAgent"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    }
  }
}
```

### `FollowUpBossIntegration`

```json
{
  "type": "object",
  "properties": {
    "personId": {
      "type": "string",
      "description": "Follow Up Boss Person ID",
      "example": "12345"
    }
  },
  "required": [
    "personId"
  ]
}
```

### `GoHighLevelIntegration`

```json
{
  "type": "object",
  "properties": {
    "contactId": {
      "type": "string",
      "description": "GoHighLevel Contact ID",
      "example": "12345"
    },
    "locationId": {
      "type": "string",
      "description": "GoHighLevel Location ID",
      "example": "67890",
      "nullable": true
    }
  },
  "required": [
    "contactId"
  ]
}
```

### `HubSpotIntegration`

```json
{
  "type": "object",
  "properties": {
    "contactId": {
      "type": "string",
      "description": "HubSpot Contact ID",
      "example": "12345"
    }
  },
  "required": [
    "contactId"
  ]
}
```

### `IntegrationMetadata`

```json
{
  "type": "object",
  "properties": {
    "salesforce": {
      "description": "Salesforce integration metadata",
      "anyOf": [
        {
          "$ref": "#/components/schemas/SalesforceIntegration"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "bonzo": {
      "description": "Bonzo integration metadata",
      "anyOf": [
        {
          "$ref": "#/components/schemas/BonzoIntegration"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "hubspot": {
      "description": "HubSpot integration metadata",
      "anyOf": [
        {
          "$ref": "#/components/schemas/HubSpotIntegration"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "followupboss": {
      "description": "Follow Up Boss integration metadata",
      "anyOf": [
        {
          "$ref": "#/components/schemas/FollowUpBossIntegration"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "acculynx": {
      "description": "Acculynx integration metadata",
      "anyOf": [
        {
          "$ref": "#/components/schemas/AcculynxIntegration"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "boomtown": {
      "description": "BoomTown integration metadata",
      "anyOf": [
        {
          "$ref": "#/components/schemas/BoomTownIntegration"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "leadperfection": {
      "description": "LeadPerfection integration metadata",
      "anyOf": [
        {
          "$ref": "#/components/schemas/LeadPerfectionIntegration"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "marketsharp": {
      "description": "MarketSharp integration metadata",
      "anyOf": [
        {
          "$ref": "#/components/schemas/MarketSharpV2Integration"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "gohighlevel": {
      "description": "GoHighLevel integration metadata",
      "anyOf": [
        {
          "$ref": "#/components/schemas/GoHighLevelIntegration"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "leadconnectorhq": {
      "description": "LeadConnectorHq integration metadata",
      "anyOf": [
        {
          "$ref": "#/components/schemas/LeadConnectorHqIntegration"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "sierra": {
      "description": "Sierra integration metadata",
      "anyOf": [
        {
          "$ref": "#/components/schemas/SierraIntegration"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "agentLegend": {
      "description": "Agent Legend integration metadata",
      "anyOf": [
        {
          "$ref": "#/components/schemas/AgentLegendIntegration"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "leadMailbox": {
      "description": "Lead Mailbox integration metadata",
      "anyOf": [
        {
          "$ref": "#/components/schemas/LeadMailboxIntegration"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "velocify": {
      "description": "Velocify integration metadata",
      "anyOf": [
        {
          "$ref": "#/components/schemas/VelocifyIntegration"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    }
  }
}
```

### `InternalServerError`

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A message describing the error",
      "example": "Internal server error"
    },
    "statusCode": {
      "type": "number",
      "example": 500
    }
  }
}
```

### `InvalidRequest`

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A message describing the error",
      "example": "The parameter leadId must be provided"
    },
    "statusCode": {
      "type": "number",
      "example": 400
    }
  }
}
```

### `LeadConnectorHqIntegration`

```json
{
  "type": "object",
  "properties": {
    "contactId": {
      "type": "string",
      "description": "LeadConnectorHq Contact ID",
      "example": "12345"
    },
    "locationId": {
      "type": "string",
      "description": "LeadConnectorHq Location ID",
      "example": "67890",
      "nullable": true
    }
  },
  "required": [
    "contactId"
  ]
}
```

### `LeadMailboxIntegration`

```json
{
  "type": "object",
  "properties": {
    "leadId": {
      "type": "string",
      "description": "Lead Mailbox Lead ID",
      "example": "12345"
    }
  },
  "required": [
    "leadId"
  ]
}
```

### `LeadPerfectionIntegration`

```json
{
  "type": "object",
  "properties": {
    "prospectId": {
      "type": "string",
      "description": "LeadPerfection Prospect ID",
      "example": "12345"
    },
    "leadId": {
      "type": "string",
      "description": "LeadPerfection Lead ID",
      "example": "67890"
    },
    "appointmentId": {
      "type": "string",
      "description": "LeadPerfection Appointment ID",
      "example": "54321",
      "nullable": true
    }
  },
  "required": [
    "leadId",
    "prospectId"
  ]
}
```

### `MarketSharpV2Integration`

```json
{
  "type": "object",
  "properties": {
    "contactId": {
      "type": "string",
      "description": "MarketSharp Contact ID",
      "example": "12345"
    },
    "inquiryId": {
      "type": "string",
      "description": "MarketSharp Inquiry ID",
      "example": "67890"
    },
    "appointmentId": {
      "type": "string",
      "description": "MarketSharp Appointment ID",
      "example": "54321",
      "nullable": true
    }
  },
  "required": [
    "contactId",
    "inquiryId"
  ]
}
```

### `NotAuthorized`

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A message describing the error",
      "example": "Access Token is not authorized"
    },
    "statusCode": {
      "type": "number",
      "example": 401
    }
  }
}
```

### `NotFound`

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A message describing the error",
      "example": "Lead not found"
    },
    "statusCode": {
      "type": "number",
      "example": 404
    }
  }
}
```

### `Properties`

```json
{
  "type": "object",
  "properties": {
    "address": {
      "type": "string",
      "nullable": true
    },
    "agencyUrl": {
      "type": "string",
      "nullable": true
    },
    "agentExclusivity": {
      "type": "string",
      "nullable": true
    },
    "agentSatisfactionRating": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "agentStatus": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "alternatePlan": {
      "type": "string",
      "nullable": true
    },
    "anticipatedCloseDate": {
      "type": "string",
      "nullable": true
    },
    "autoCoverageType": {
      "type": "string",
      "enum": [
        "collision",
        "comprehensive",
        "full",
        "liability",
        null
      ],
      "nullable": true
    },
    "background": {
      "type": "string",
      "nullable": true
    },
    "baths": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "bathsMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "bathsMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "beds": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "bedsMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "bedsMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "benefit": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "businessLoanType": {
      "type": "string",
      "enum": [
        "business line of credit",
        "merchant cash advance",
        "sba loan",
        "term loan",
        null
      ],
      "nullable": true
    },
    "cancellationReason": {
      "type": "string",
      "nullable": true
    },
    "coBorrowerStatus": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "commercialProperty": {
      "type": "string",
      "enum": [
        "hotel",
        "industrial",
        "multi_family_housing",
        "office",
        "restaurant",
        "retail",
        null
      ],
      "nullable": true
    },
    "companyDepartments": {
      "type": "string",
      "enum": [
        "accounting",
        "business_development",
        "customer_support",
        "innovation",
        "inside_sales",
        "legal",
        "marketing",
        "product_management",
        null
      ],
      "nullable": true
    },
    "companyName": {
      "type": "string",
      "nullable": true
    },
    "constructionType": {
      "type": "string",
      "enum": [
        "addition",
        "new_build",
        "remodel",
        null
      ],
      "nullable": true
    },
    "consultantStatus": {
      "type": "string",
      "enum": [
        "interested",
        "not_interested",
        "postponed_interest",
        "somewhat_interested",
        null
      ],
      "nullable": true
    },
    "contactConfirmation": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "contactLocation": {
      "type": "string",
      "nullable": true
    },
    "contactOptIn": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "contactTime": {
      "type": "string",
      "nullable": true
    },
    "contentOffer": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "contingency": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "coverageAmount": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "coverageAmountMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "coverageAmountMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "credit": {
      "type": "string",
      "enum": [
        "excellent",
        "fair",
        "good",
        "very_good",
        "very_poor",
        null
      ],
      "nullable": true
    },
    "creditScore": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "crmDisposition": {
      "type": "string",
      "nullable": true
    },
    "crmNotes": {
      "type": "string",
      "nullable": true
    },
    "dateOfBirth": {
      "type": "string",
      "nullable": true
    },
    "debtToIncome": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "decisionMaker": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "decisionProcess": {
      "type": "string",
      "nullable": true
    },
    "decisionStakeholders": {
      "type": "string",
      "nullable": true
    },
    "demoConfirmation": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "downPayment": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "downPaymentMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "downPaymentMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "driversLicenseNumber": {
      "type": "string",
      "nullable": true
    },
    "driversLicenseStatus": {
      "type": "string",
      "enum": [
        "active",
        "expired",
        "permit",
        null
      ],
      "nullable": true
    },
    "education": {
      "type": "string",
      "enum": [
        "associates_degree",
        "bachelors_degree",
        "doctorate_phd",
        "high_school",
        "masters_degree",
        "other",
        null
      ],
      "nullable": true
    },
    "electricType": {
      "type": "string",
      "enum": [
        "circuit breaker box",
        "fuse box",
        null
      ],
      "nullable": true
    },
    "employees": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "employeesMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "employeesMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "employmentStatus": {
      "type": "string",
      "enum": [
        "employed",
        "employed_part_time",
        "not_employed",
        "retired",
        "self_employed",
        null
      ],
      "nullable": true
    },
    "equityStatus": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "equityStatusMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "equityStatusMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "existingCoverage": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "existingCoverageType": {
      "type": "string",
      "enum": [
        "auto_insurance",
        "home_insurance",
        "life_insurance",
        "long_term_disability_insurance",
        "pet_insurance",
        "renters_insurance",
        "umbrella_insurance",
        null
      ],
      "nullable": true
    },
    "exteriorMaterial": {
      "type": "string",
      "enum": [
        "brick",
        "fiber_cement_siding",
        "masonite_siding",
        "metal_siding",
        "siding",
        "stone",
        "stucco",
        "vinyl_siding",
        "wood",
        null
      ],
      "nullable": true
    },
    "externalCampaignId": {
      "type": "string",
      "nullable": true
    },
    "favoriteCity": {
      "type": "string",
      "nullable": true
    },
    "financialDefault": {
      "type": "string",
      "enum": [
        "bankruptcy",
        "declined_previously",
        "eviction",
        "foreclosure",
        "missed_payments",
        "short_sale",
        null
      ],
      "nullable": true
    },
    "financingStatus": {
      "type": "string",
      "enum": [
        "cash",
        "false",
        "housing_voucher",
        "owner_financing",
        "rent_to_own",
        "true",
        null
      ],
      "nullable": true
    },
    "firstTimeBuyer": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "firstTimeSeller": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "fsboReason": {
      "type": "string",
      "nullable": true
    },
    "furnaceAge": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "furnaceAgeMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "furnaceAgeMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "garageStalls": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "garageStallsMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "garageStallsMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "gender": {
      "type": "string",
      "enum": [
        "female",
        "male",
        "other",
        null
      ],
      "nullable": true
    },
    "healthHistory": {
      "type": "string",
      "nullable": true
    },
    "homeStyle": {
      "type": "string",
      "enum": [
        "a_frame",
        "art_deco",
        "barndominium",
        "bungalow",
        "cape_cod",
        "colonial",
        "condominium",
        "contemporary",
        "cottage",
        "craftsman",
        "creole",
        "dutch_colonial",
        "farmhouse",
        "federal",
        "french_provincial",
        "georgian",
        "gothic_revival",
        "greek_revival",
        "international",
        "italianate",
        "log_cabin",
        "manufactured_home",
        "mid_century_modern",
        "modern",
        "modular",
        "monterey",
        "national",
        "neoclassical",
        "other",
        "prairie",
        "pueblo",
        "queen_anne",
        "ranch",
        "regency",
        "saltbox",
        "second_empire",
        "shed",
        "shingle",
        "shotgun",
        "spanish_eclectic",
        "split_level",
        "stick",
        "tudor",
        "two_story",
        "victorian",
        null
      ],
      "nullable": true
    },
    "homeownersAssociation": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "ibuyerPartner": {
      "type": "string",
      "enum": [
        "moving_station",
        "offerpad",
        "opendoor",
        null
      ],
      "nullable": true
    },
    "impliedInsuranceType": {
      "type": "string",
      "enum": [
        "auto_insurance",
        "home_insurance",
        "life_insurance",
        "long_term_disability_insurance",
        "pet_insurance",
        "renters_insurance",
        "travel_insurance",
        "umbrella_insurance",
        null
      ],
      "nullable": true
    },
    "inHouseLender": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "income": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "incomeFrequency": {
      "type": "string",
      "enum": [
        "bi-weekly",
        "monthly",
        "semi-monthly",
        "weekly",
        null
      ],
      "nullable": true
    },
    "incomeSource": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "industry": {
      "type": "string",
      "enum": [
        "automotive",
        "commercial_real_estate",
        "ecommerce",
        "home_services",
        "insurance",
        "marketing",
        "mortgage",
        "property_management",
        "residential_real_estate",
        "retail",
        "software",
        null
      ],
      "nullable": true
    },
    "insureds": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "interest": {
      "type": "string",
      "enum": [
        "interested",
        "not_interested",
        "postponed_interest",
        "somewhat_interested",
        null
      ],
      "nullable": true
    },
    "interestRate": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "interestRateMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "interestRateMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "isAgent": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "isInvestor": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "isLocal": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "language": {
      "type": "string",
      "enum": [
        "arabic",
        "bengali",
        "english",
        "french",
        "hindi",
        "japanese",
        "mandarin",
        "portuguese",
        "punjabi",
        "russian",
        "spanish",
        null
      ],
      "nullable": true
    },
    "leadPriority": {
      "type": "string",
      "enum": [
        "distant",
        "later",
        "never",
        "now",
        "soon",
        null
      ],
      "nullable": true
    },
    "lenderName": {
      "type": "string",
      "nullable": true
    },
    "lenderStatus": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "liabilityCoverageAmount": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "liabilityCoverageAmountMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "liabilityCoverageAmountMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "lifeInsuranceType": {
      "type": "string",
      "enum": [
        "final_expense",
        "indexed_universal_life",
        "mortgage_protection",
        "term_life",
        "whole_life",
        null
      ],
      "nullable": true
    },
    "listingAge": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "listingProduct": {
      "type": "string",
      "enum": [
        "fsbo",
        "ibuyer",
        "network",
        null
      ],
      "nullable": true
    },
    "listingUrl": {
      "type": "string",
      "nullable": true
    },
    "livingSpace": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "livingSpaceMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "livingSpaceMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "loanBalance": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "loanBalanceMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "loanBalanceMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "loanPurpose": {
      "type": "string",
      "enum": [
        "cashout",
        "change_term",
        "rate_and_term",
        null
      ],
      "nullable": true
    },
    "loanTerm": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "loanType": {
      "type": "string",
      "enum": [
        "adjustable_rate_mortgage",
        "conventional",
        "fha",
        "heloc",
        "jumbo",
        "reverse_mortgage",
        "usda",
        "va",
        null
      ],
      "nullable": true
    },
    "location": {
      "type": "string",
      "nullable": true
    },
    "lotSize": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "lotSizeMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "lotSizeMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "maritalStatus": {
      "type": "string",
      "enum": [
        "divorced",
        "married",
        "separated",
        "single",
        null
      ],
      "nullable": true
    },
    "marketingSpend": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "marketingSpendMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "marketingSpendMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "militaryActiveDuty": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "militaryBranch": {
      "type": "string",
      "enum": [
        "air_force",
        "army",
        "coast_guard",
        "marines",
        "national_guard",
        "navy",
        "space_force",
        null
      ],
      "nullable": true
    },
    "militaryDischargeType": {
      "type": "string",
      "enum": [
        "bad_conduct_discharge",
        "dishonorable_discharge",
        "entry_level_separation",
        "general_discharge",
        "honorable_discharge",
        "medical_separation",
        "other_than_honorable_discharge",
        "separation_for_convenience_of_the_government",
        null
      ],
      "nullable": true
    },
    "militaryReservesService": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "militaryServiceTerm": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "monthlyPayments": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "monthlyPaymentsMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "monthlyPaymentsMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "mortgageEscrow": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "mortgageIntent": {
      "type": "string",
      "enum": [
        "preapproval",
        "rate_quote",
        null
      ],
      "nullable": true
    },
    "mortgageStatus": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "motivation": {
      "type": "string",
      "enum": [
        "closer_to_family",
        "closer_to_friends",
        "closer_to_school",
        "closer_to_work",
        "death",
        "debt",
        "divorce",
        "downsizing",
        "empty_nester",
        "environmental",
        "equity",
        "good_schools",
        "homeless",
        "investment",
        "job_transfer",
        "lease_expiry",
        "lifestyle",
        "location_proximity",
        "lost_job",
        "neighbor_sold_property",
        "new_children",
        "new_job",
        "privacy",
        "ready_to_move",
        "relocating",
        "retiring",
        "save_money",
        "sold_property",
        "space_for_animals",
        "tired_of_renting",
        "upsizing",
        "vacation_interest",
        "weather",
        null
      ],
      "nullable": true
    },
    "motivationPlans": {
      "type": "string",
      "nullable": true
    },
    "netWorth": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "netWorthMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "netWorthMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "objection": {
      "type": "string",
      "enum": [
        "company_rep",
        "compatibility",
        "other",
        "price",
        "quality",
        "timing",
        null
      ],
      "nullable": true
    },
    "occupation": {
      "type": "string",
      "nullable": true
    },
    "officeLocation": {
      "type": "string",
      "nullable": true
    },
    "ownership": {
      "type": "string",
      "enum": [
        "co_owner",
        "financed",
        "leased",
        "no_ownership",
        "purchasing",
        "sole_owner",
        "third_party_owner",
        null
      ],
      "nullable": true
    },
    "ownershipTimeline": {
      "type": "string",
      "nullable": true
    },
    "paintingType": {
      "type": "string",
      "enum": [
        "brick",
        "cabinetry",
        "commercial",
        "concrete_staining",
        "epoxy_floor_coating",
        "exterior",
        "garage_doors",
        "interior",
        "new_build",
        "other",
        "stucco",
        "wallpaper",
        "wood_staining",
        null
      ],
      "nullable": true
    },
    "paymentAmount": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "paymentAmountMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "paymentAmountMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "paymentType": {
      "type": "string",
      "enum": [
        "cash",
        "credit",
        "financing",
        "insurance",
        null
      ],
      "nullable": true
    },
    "personAge": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "petAge": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "petName": {
      "type": "string",
      "nullable": true
    },
    "petType": {
      "type": "string",
      "enum": [
        "cat",
        "dog",
        "other",
        null
      ],
      "nullable": true
    },
    "preferredChannel": {
      "type": "string",
      "enum": [
        "mailgun",
        "phone_call",
        "twilio",
        null
      ],
      "nullable": true
    },
    "prescriptions": {
      "type": "string",
      "nullable": true
    },
    "price": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "priceMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "priceMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "priorClaims": {
      "type": "string",
      "nullable": true
    },
    "priorLoanExperience": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "problem": {
      "type": "string",
      "nullable": true
    },
    "productType": {
      "type": "string",
      "enum": [
        "awning",
        "bath",
        "deck",
        "door",
        "flooring",
        "gutter_guard",
        "gutters",
        "hurricane_protection",
        "hvac",
        "interior",
        "kitchen",
        "patio",
        "roofing",
        "screened_porch_sunroom",
        "siding",
        "solar",
        "window",
        null
      ],
      "nullable": true
    },
    "projectDetails": {
      "type": "string",
      "nullable": true
    },
    "projectType": {
      "type": "string",
      "enum": [
        "cleaning",
        "new_install",
        "remodel",
        "repair",
        "replacement",
        null
      ],
      "nullable": true
    },
    "promotionalOffer": {
      "type": "string",
      "enum": [
        "interested",
        "not_interested",
        "postponed_interest",
        "somewhat_interested",
        null
      ],
      "nullable": true
    },
    "propertyAge": {
      "type": "string",
      "nullable": true
    },
    "propertyFeature": {
      "type": "string",
      "enum": [
        "access_to_water",
        "basement",
        "big_kitchen",
        "big_yard",
        "deck",
        "detached_garage",
        "driveway",
        "existing_tenants",
        "exposed_beams",
        "exposed_brick",
        "fenced_yard",
        "finished_basement",
        "fireplace",
        "garden",
        "handicap_accessible",
        "hardwood_floors",
        "home_office",
        "hot_tub",
        "in_law_suite",
        "main_floor_laundry",
        "main_floor_master",
        "other",
        "patio - porch",
        "pet_friendly",
        "pool",
        "rural",
        "rv_parking",
        "safe_neighborhood",
        "screened_porch",
        "shop",
        "solar",
        "space_to_entertain",
        "trampoline",
        "updated_baths",
        "updated_kitchen",
        "utilities_included",
        "vaulted_ceilings",
        "walkable_neighborhood",
        null
      ],
      "nullable": true
    },
    "propertyPreferences": {
      "type": "string",
      "nullable": true
    },
    "propertyRecords": {
      "type": "string",
      "enum": [
        "lien",
        "second_mortgage",
        null
      ],
      "nullable": true
    },
    "propertyStatus": {
      "type": "string",
      "enum": [
        "active",
        "pending",
        "sold",
        null
      ],
      "nullable": true
    },
    "propertyUse": {
      "type": "string",
      "enum": [
        "agriculture",
        "business",
        "investment",
        "personal",
        "primary_residence",
        "secondary_residence",
        "short_term_rental",
        "vacation",
        null
      ],
      "nullable": true
    },
    "propertyValue": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "propertyValueMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "propertyValueMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "propertyVisit": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "purchaseStatus": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "quantity": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "readiness": {
      "type": "string",
      "enum": [
        "active",
        "just_looking",
        "not_interested",
        "researching",
        null
      ],
      "nullable": true
    },
    "referralAgencyName": {
      "type": "string",
      "nullable": true
    },
    "referralAgentEmail": {
      "type": "string",
      "nullable": true
    },
    "referralAgentName": {
      "type": "string",
      "nullable": true
    },
    "referralAgentPhone": {
      "type": "string",
      "nullable": true
    },
    "referralInterest": {
      "type": "string",
      "enum": [
        "agent",
        "does_not_want_agent",
        "financing",
        null
      ],
      "nullable": true
    },
    "relocating": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "rentalPeriod": {
      "type": "string",
      "nullable": true
    },
    "replacementAmount": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "replacementAmountMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "replacementAmountMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "revenue": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "revenueMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "revenueMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "roofAge": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "roofAgeMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "roofAgeMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "roofType": {
      "type": "string",
      "enum": [
        "asphalt_shingles",
        "cedar_shake_shingles",
        "coating",
        "composite_shingles",
        "flat_roofing",
        "metal",
        "slate",
        "synthetic_shingles",
        null
      ],
      "nullable": true
    },
    "satisfactionRating": {
      "type": "string",
      "enum": [
        "excellent",
        "moderate",
        "poor",
        "very_poor",
        null
      ],
      "nullable": true
    },
    "schedulingLink": {
      "type": "string",
      "nullable": true
    },
    "scope": {
      "type": "string",
      "nullable": true
    },
    "sellingAddress": {
      "type": "string",
      "nullable": true
    },
    "startDate": {
      "type": "string",
      "nullable": true
    },
    "state": {
      "type": "string",
      "enum": [
        "alabama",
        "alaska",
        "arizona",
        "arkansas",
        "california",
        "colorado",
        "connecticut",
        "delaware",
        "florida",
        "georgia",
        "hawaii",
        "idaho",
        "illinois",
        "indiana",
        "iowa",
        "kansas",
        "kentucky",
        "louisiana",
        "maine",
        "maryland",
        "massachusetts",
        "michigan",
        "minnesota",
        "mississippi",
        "missouri",
        "montana",
        "nebraska",
        "nevada",
        "new_hampshire",
        "new_jersey",
        "new_mexico",
        "new_york",
        "north_carolina",
        "north_dakota",
        "ohio",
        "oklahoma",
        "oregon",
        "pennsylvania",
        "rhode_island",
        "south_carolina",
        "south_dakota",
        "tennessee",
        "texas",
        "utah",
        "vermont",
        "virginia",
        "washington",
        "west_virginia",
        "wisconsin",
        "wyoming",
        null
      ],
      "nullable": true
    },
    "technology": {
      "type": "string",
      "nullable": true
    },
    "tenure": {
      "type": "string",
      "nullable": true
    },
    "timeZone": {
      "type": "string",
      "enum": [
        "Africa/Abidjan",
        "Africa/Accra",
        "Africa/Addis_Ababa",
        "Africa/Algiers",
        "Africa/Asmara",
        "Africa/Bamako",
        "Africa/Bangui",
        "Africa/Banjul",
        "Africa/Bissau",
        "Africa/Blantyre",
        "Africa/Brazzaville",
        "Africa/Bujumbura",
        "Africa/Cairo",
        "Africa/Casablanca",
        "Africa/Ceuta",
        "Africa/Conakry",
        "Africa/Dakar",
        "Africa/Dar_es_Salaam",
        "Africa/Djibouti",
        "Africa/Douala",
        "Africa/El_Aaiun",
        "Africa/Freetown",
        "Africa/Gaborone",
        "Africa/Harare",
        "Africa/Johannesburg",
        "Africa/Juba",
        "Africa/Kampala",
        "Africa/Khartoum",
        "Africa/Kigali",
        "Africa/Kinshasa",
        "Africa/Lagos",
        "Africa/Libreville",
        "Africa/Lome",
        "Africa/Luanda",
        "Africa/Lubumbashi",
        "Africa/Lusaka",
        "Africa/Malabo",
        "Africa/Maputo",
        "Africa/Maseru",
        "Africa/Mbabane",
        "Africa/Mogadishu",
        "Africa/Monrovia",
        "Africa/Nairobi",
        "Africa/Ndjamena",
        "Africa/Niamey",
        "Africa/Nouakchott",
        "Africa/Ouagadougou",
        "Africa/Porto-Novo",
        "Africa/Sao_Tome",
        "Africa/Tripoli",
        "Africa/Tunis",
        "Africa/Windhoek",
        "America/Adak",
        "America/Anchorage",
        "America/Anguilla",
        "America/Antigua",
        "America/Araguaina",
        "America/Argentina/Buenos_Aires",
        "America/Argentina/Catamarca",
        "America/Argentina/Cordoba",
        "America/Argentina/Jujuy",
        "America/Argentina/La_Rioja",
        "America/Argentina/Mendoza",
        "America/Argentina/Rio_Gallegos",
        "America/Argentina/Salta",
        "America/Argentina/San_Juan",
        "America/Argentina/San_Luis",
        "America/Argentina/Tucuman",
        "America/Argentina/Ushuaia",
        "America/Aruba",
        "America/Asuncion",
        "America/Atikokan",
        "America/Bahia",
        "America/Bahia_Banderas",
        "America/Barbados",
        "America/Belem",
        "America/Belize",
        "America/Blanc-Sablon",
        "America/Boa_Vista",
        "America/Bogota",
        "America/Boise",
        "America/Cambridge_Bay",
        "America/Campo_Grande",
        "America/Cancun",
        "America/Caracas",
        "America/Cayenne",
        "America/Cayman",
        "America/Chicago",
        "America/Chihuahua",
        "America/Ciudad_Juarez",
        "America/Costa_Rica",
        "America/Creston",
        "America/Cuiaba",
        "America/Curacao",
        "America/Danmarkshavn",
        "America/Dawson",
        "America/Dawson_Creek",
        "America/Denver",
        "America/Detroit",
        "America/Dominica",
        "America/Edmonton",
        "America/Eirunepe",
        "America/El_Salvador",
        "America/Fort_Nelson",
        "America/Fortaleza",
        "America/Glace_Bay",
        "America/Goose_Bay",
        "America/Grand_Turk",
        "America/Grenada",
        "America/Guadeloupe",
        "America/Guatemala",
        "America/Guayaquil",
        "America/Guyana",
        "America/Halifax",
        "America/Havana",
        "America/Hermosillo",
        "America/Indiana/Indianapolis",
        "America/Indiana/Knox",
        "America/Indiana/Marengo",
        "America/Indiana/Petersburg",
        "America/Indiana/Tell_City",
        "America/Indiana/Vevay",
        "America/Indiana/Vincennes",
        "America/Indiana/Winamac",
        "America/Inuvik",
        "America/Iqaluit",
        "America/Jamaica",
        "America/Juneau",
        "America/Kentucky/Louisville",
        "America/Kentucky/Monticello",
        "America/Kralendijk",
        "America/La_Paz",
        "America/Lima",
        "America/Los_Angeles",
        "America/Lower_Princes",
        "America/Maceio",
        "America/Managua",
        "America/Manaus",
        "America/Marigot",
        "America/Martinique",
        "America/Matamoros",
        "America/Mazatlan",
        "America/Menominee",
        "America/Merida",
        "America/Metlakatla",
        "America/Mexico_City",
        "America/Miquelon",
        "America/Moncton",
        "America/Monterrey",
        "America/Montevideo",
        "America/Montserrat",
        "America/Nassau",
        "America/New_York",
        "America/Nome",
        "America/Noronha",
        "America/North_Dakota/Beulah",
        "America/North_Dakota/Center",
        "America/North_Dakota/New_Salem",
        "America/Nuuk",
        "America/Ojinaga",
        "America/Panama",
        "America/Paramaribo",
        "America/Phoenix",
        "America/Port-au-Prince",
        "America/Port_of_Spain",
        "America/Porto_Velho",
        "America/Puerto_Rico",
        "America/Punta_Arenas",
        "America/Rankin_Inlet",
        "America/Recife",
        "America/Regina",
        "America/Resolute",
        "America/Rio_Branco",
        "America/Santarem",
        "America/Santiago",
        "America/Santo_Domingo",
        "America/Sao_Paulo",
        "America/Scoresbysund",
        "America/Sitka",
        "America/St_Barthelemy",
        "America/St_Johns",
        "America/St_Kitts",
        "America/St_Lucia",
        "America/St_Thomas",
        "America/St_Vincent",
        "America/Swift_Current",
        "America/Tegucigalpa",
        "America/Thule",
        "America/Tijuana",
        "America/Toronto",
        "America/Tortola",
        "America/Vancouver",
        "America/Whitehorse",
        "America/Winnipeg",
        "America/Yakutat",
        "Antarctica/Casey",
        "Antarctica/Davis",
        "Antarctica/DumontDUrville",
        "Antarctica/Macquarie",
        "Antarctica/Mawson",
        "Antarctica/McMurdo",
        "Antarctica/Palmer",
        "Antarctica/Rothera",
        "Antarctica/Syowa",
        "Antarctica/Troll",
        "Antarctica/Vostok",
        "Arctic/Longyearbyen",
        "Asia/Aden",
        "Asia/Almaty",
        "Asia/Amman",
        "Asia/Anadyr",
        "Asia/Aqtau",
        "Asia/Aqtobe",
        "Asia/Ashgabat",
        "Asia/Atyrau",
        "Asia/Baghdad",
        "Asia/Bahrain",
        "Asia/Baku",
        "Asia/Bangkok",
        "Asia/Barnaul",
        "Asia/Beirut",
        "Asia/Bishkek",
        "Asia/Brunei",
        "Asia/Chita",
        "Asia/Choibalsan",
        "Asia/Colombo",
        "Asia/Damascus",
        "Asia/Dhaka",
        "Asia/Dili",
        "Asia/Dubai",
        "Asia/Dushanbe",
        "Asia/Famagusta",
        "Asia/Gaza",
        "Asia/Hebron",
        "Asia/Ho_Chi_Minh",
        "Asia/Hong_Kong",
        "Asia/Hovd",
        "Asia/Irkutsk",
        "Asia/Jakarta",
        "Asia/Jayapura",
        "Asia/Jerusalem",
        "Asia/Kabul",
        "Asia/Kamchatka",
        "Asia/Karachi",
        "Asia/Kathmandu",
        "Asia/Khandyga",
        "Asia/Kolkata",
        "Asia/Krasnoyarsk",
        "Asia/Kuala_Lumpur",
        "Asia/Kuching",
        "Asia/Kuwait",
        "Asia/Macau",
        "Asia/Magadan",
        "Asia/Makassar",
        "Asia/Manila",
        "Asia/Muscat",
        "Asia/Nicosia",
        "Asia/Novokuznetsk",
        "Asia/Novosibirsk",
        "Asia/Omsk",
        "Asia/Oral",
        "Asia/Phnom_Penh",
        "Asia/Pontianak",
        "Asia/Pyongyang",
        "Asia/Qatar",
        "Asia/Qostanay",
        "Asia/Qyzylorda",
        "Asia/Riyadh",
        "Asia/Sakhalin",
        "Asia/Samarkand",
        "Asia/Seoul",
        "Asia/Shanghai",
        "Asia/Singapore",
        "Asia/Srednekolymsk",
        "Asia/Taipei",
        "Asia/Tashkent",
        "Asia/Tbilisi",
        "Asia/Tehran",
        "Asia/Thimphu",
        "Asia/Tokyo",
        "Asia/Tomsk",
        "Asia/Ulaanbaatar",
        "Asia/Urumqi",
        "Asia/Ust-Nera",
        "Asia/Vientiane",
        "Asia/Vladivostok",
        "Asia/Yakutsk",
        "Asia/Yangon",
        "Asia/Yekaterinburg",
        "Asia/Yerevan",
        "Atlantic/Azores",
        "Atlantic/Bermuda",
        "Atlantic/Canary",
        "Atlantic/Cape_Verde",
        "Atlantic/Faroe",
        "Atlantic/Madeira",
        "Atlantic/Reykjavik",
        "Atlantic/South_Georgia",
        "Atlantic/St_Helena",
        "Atlantic/Stanley",
        "Australia/Adelaide",
        "Australia/Brisbane",
        "Australia/Broken_Hill",
        "Australia/Darwin",
        "Australia/Eucla",
        "Australia/Hobart",
        "Australia/Lindeman",
        "Australia/Lord_Howe",
        "Australia/Melbourne",
        "Australia/Perth",
        "Australia/Sydney",
        "Canada/Atlantic",
        "Canada/Central",
        "Canada/Eastern",
        "Canada/Mountain",
        "Canada/Newfoundland",
        "Canada/Pacific",
        "Europe/Amsterdam",
        "Europe/Andorra",
        "Europe/Astrakhan",
        "Europe/Athens",
        "Europe/Belgrade",
        "Europe/Berlin",
        "Europe/Bratislava",
        "Europe/Brussels",
        "Europe/Bucharest",
        "Europe/Budapest",
        "Europe/Busingen",
        "Europe/Chisinau",
        "Europe/Copenhagen",
        "Europe/Dublin",
        "Europe/Gibraltar",
        "Europe/Guernsey",
        "Europe/Helsinki",
        "Europe/Isle_of_Man",
        "Europe/Istanbul",
        "Europe/Jersey",
        "Europe/Kaliningrad",
        "Europe/Kirov",
        "Europe/Kyiv",
        "Europe/Lisbon",
        "Europe/Ljubljana",
        "Europe/London",
        "Europe/Luxembourg",
        "Europe/Madrid",
        "Europe/Malta",
        "Europe/Mariehamn",
        "Europe/Minsk",
        "Europe/Monaco",
        "Europe/Moscow",
        "Europe/Oslo",
        "Europe/Paris",
        "Europe/Podgorica",
        "Europe/Prague",
        "Europe/Riga",
        "Europe/Rome",
        "Europe/Samara",
        "Europe/San_Marino",
        "Europe/Sarajevo",
        "Europe/Saratov",
        "Europe/Simferopol",
        "Europe/Skopje",
        "Europe/Sofia",
        "Europe/Stockholm",
        "Europe/Tallinn",
        "Europe/Tirane",
        "Europe/Ulyanovsk",
        "Europe/Vaduz",
        "Europe/Vatican",
        "Europe/Vienna",
        "Europe/Vilnius",
        "Europe/Volgograd",
        "Europe/Warsaw",
        "Europe/Zagreb",
        "Europe/Zurich",
        "GMT",
        "Indian/Antananarivo",
        "Indian/Chagos",
        "Indian/Christmas",
        "Indian/Cocos",
        "Indian/Comoro",
        "Indian/Kerguelen",
        "Indian/Mahe",
        "Indian/Maldives",
        "Indian/Mauritius",
        "Indian/Mayotte",
        "Indian/Reunion",
        "Pacific/Apia",
        "Pacific/Auckland",
        "Pacific/Bougainville",
        "Pacific/Chatham",
        "Pacific/Chuuk",
        "Pacific/Easter",
        "Pacific/Efate",
        "Pacific/Fakaofo",
        "Pacific/Fiji",
        "Pacific/Funafuti",
        "Pacific/Galapagos",
        "Pacific/Gambier",
        "Pacific/Guadalcanal",
        "Pacific/Guam",
        "Pacific/Honolulu",
        "Pacific/Kanton",
        "Pacific/Kiritimati",
        "Pacific/Kosrae",
        "Pacific/Kwajalein",
        "Pacific/Majuro",
        "Pacific/Marquesas",
        "Pacific/Midway",
        "Pacific/Nauru",
        "Pacific/Niue",
        "Pacific/Norfolk",
        "Pacific/Noumea",
        "Pacific/Pago_Pago",
        "Pacific/Palau",
        "Pacific/Pitcairn",
        "Pacific/Pohnpei",
        "Pacific/Port_Moresby",
        "Pacific/Rarotonga",
        "Pacific/Saipan",
        "Pacific/Tahiti",
        "Pacific/Tarawa",
        "Pacific/Tongatapu",
        "Pacific/Wake",
        "Pacific/Wallis",
        "US/Alaska",
        "US/Arizona",
        "US/Central",
        "US/Eastern",
        "US/Hawaii",
        "US/Mountain",
        "US/Pacific",
        "UTC",
        null
      ],
      "nullable": true
    },
    "timeframe": {
      "type": "string",
      "nullable": true
    },
    "tobaccoUsage": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "totalDebt": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "totalDebtMax": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "totalDebtMin": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "url": {
      "type": "string",
      "nullable": true
    },
    "useCase": {
      "type": "string",
      "enum": [
        "customer_support",
        "lead_conversion",
        "lead_generation",
        "workflow_improvement",
        null
      ],
      "nullable": true
    },
    "usingProfanity": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "vehicleId": {
      "type": "string",
      "nullable": true
    },
    "vehicleMake": {
      "type": "string",
      "nullable": true
    },
    "vehicleMileage": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "vehicleModel": {
      "type": "string",
      "nullable": true
    },
    "vehicleYear": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "veteran": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "veteranServiceDisability": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "viewedProperties": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "webinarOptIn": {
      "type": "string",
      "enum": [
        "no",
        "yes",
        null
      ],
      "nullable": true
    },
    "windowType": {
      "type": "string",
      "enum": [
        "architectural_windows",
        "awning_windows",
        "bay_windows",
        "bow_windows",
        "casement_windows",
        "coastal_windows",
        "double_hung_windows",
        "double_sliding_windows",
        "horizontal_sliding_windows",
        "other",
        "picture_windows",
        "single_hung_windows",
        "single_sliding_windows",
        "sliding_patio_door",
        "vinyl",
        "wood",
        null
      ],
      "nullable": true
    },
    "workHistory": {
      "type": "string",
      "nullable": true
    },
    "workingWithColleague": {
      "enum": [
        true,
        false,
        "true",
        "false",
        null
      ],
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "nullable": true
    },
    "zipCode": {
      "type": "string",
      "nullable": true
    }
  }
}
```

### `SalesforceIntegration`

```json
{
  "type": "object",
  "properties": {
    "sfObjectId": {
      "type": "string",
      "description": "Salesforce Object ID for the Contact, Lead, or Opportunity this lead is tied to",
      "example": "001XXXXXXXXXXXXXXX"
    },
    "contactObjectId": {
      "type": "string",
      "description": "Salesforce Contact Object ID, must be set if Lead or Opportunity are not set",
      "example": "003XXXXXXXXXXXXXXX",
      "nullable": true
    },
    "leadObjectId": {
      "type": "string",
      "description": "Salesforce Lead Object ID, must be set if Contact or Opportunity are not set",
      "example": "00QXXXXXXXXXXXXXXX",
      "nullable": true
    },
    "opportunityObjectId": {
      "type": "string",
      "description": "Salesforce Opportunity Object ID, Must be set if Lead or Contact are not set",
      "example": "006XXXXXXXXXXXXXXX",
      "nullable": true
    },
    "ownerObjectId": {
      "type": "string",
      "description": "Salesforce Owner Object ID",
      "example": "005XXXXXXXXXXXXXXX",
      "nullable": true
    }
  },
  "required": [
    "sfObjectId"
  ]
}
```

### `SchedulingSettings`

```json
{
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean",
      "description": "Enable or disable scheduled calling",
      "example": true
    }
  },
  "required": [
    "enabled"
  ]
}
```

### `SchedulingStatus`

```json
{
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean",
      "description": "Whether scheduled calling is enabled",
      "example": true
    },
    "current_status": {
      "type": "string",
      "enum": [
        "Active",
        "Disabled",
        "Sleeping"
      ],
      "description": "Current scheduling status",
      "example": "Active"
    }
  }
}
```

### `SierraIntegration`

```json
{
  "type": "object",
  "properties": {
    "leadId": {
      "type": "string",
      "description": "Sierra Lead ID",
      "example": "12345"
    }
  },
  "required": [
    "leadId"
  ]
}
```

### `StartCall`

```json
{
  "type": "object",
  "properties": {
    "externalLeadId": {
      "type": "string",
      "description": "The ID for this lead in your CRM or database",
      "example": "b6726f23-1440-4206-962f-8c429f61714c",
      "nullable": true
    },
    "name": {
      "type": "string",
      "description": "Full name for this lead",
      "example": "Jane Doe"
    },
    "email": {
      "type": "string",
      "example": "jane.doe@example.com"
    },
    "phone": {
      "type": "string",
      "description": "Lead's phone number, E.164 or number with area code",
      "example": "(303) 555-5555"
    },
    "source": {
      "type": "string",
      "default": "Unknown",
      "description": "The vendor that sourced this lead (or website)",
      "example": "www.shiny-leads-vendor.com"
    },
    "properties": {
      "example": {},
      "description": "Properties that are known about the lead, may be used in responses, may be confirmed or skipped in scripting.",
      "allOf": [
        {
          "$ref": "#/components/schemas/Properties"
        }
      ]
    },
    "customProperties": {
      "type": "object",
      "description": "Optional top-level custom properties for this lead, represented as a dictionary with string keys. Value types: number|string|datetime|boolean|number[]|string[]|datetime[]|boolean[]. During normalization, datetimes are converted to UTC ISO-8601 strings and entries with blank keys, unsupported value types, or mixed-type arrays are dropped.",
      "example": {
        "birthday": "2026-01-01T00:00:00Z",
        "marketingOptIn": true,
        "preferredContactDays": [
          "monday",
          "friday"
        ]
      },
      "additionalProperties": {
        "oneOf": [
          {
            "type": "number"
          },
          {
            "type": "string"
          },
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "boolean"
          },
          {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "type": "array",
            "items": {
              "type": "boolean"
            }
          }
        ]
      },
      "nullable": true
    },
    "integrations": {
      "description": "Optional integration-specific metadata.",
      "example": {
        "salesforce": {
          "sfObjectId": "001XXXXXXXXXXXXXXX"
        }
      },
      "anyOf": [
        {
          "$ref": "#/components/schemas/IntegrationMetadata"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "assignAgent": {
      "description": "Optional agent assignment details for the lead",
      "example": {
        "agentId": "650ba6ced07cb5552a2467b0"
      },
      "anyOf": [
        {
          "$ref": "#/components/schemas/AssignAgent"
        },
        {
          "type": "object",
          "nullable": true
        }
      ]
    },
    "callAiAgentId": {
      "type": "string",
      "description": "The ID of the Call AI Agent to use for the call (if not specified will make a direct call).",
      "nullable": true
    },
    "testPayloadClearDupeLeads": {
      "type": "boolean",
      "default": false,
      "description": "Only set this field during testing, it will automatically clear the phone, email, and externalLeadId for any lead enrolled with the same values.",
      "example": false,
      "nullable": true
    }
  }
}
```

### `TrackCallRequest`

```json
{
  "type": "object",
  "properties": {
    "startedAt": {
      "type": "string",
      "format": "date-time"
    },
    "finishedAt": {
      "type": "string",
      "format": "date-time"
    },
    "vendorCallId": {
      "type": "string"
    },
    "vendorName": {
      "type": "string"
    },
    "callType": {
      "description": "The type of tracked call.",
      "example": "AgentStarted",
      "type": "string",
      "enum": [
        "CustomerStarted",
        "AgentStarted",
        "DialerStarted",
        "DoorVisit"
      ]
    },
    "recordingUrl": {
      "type": "string"
    },
    "callDisposition": {
      "description": "Optional disposition to set for the tracked call.",
      "example": "Connected",
      "type": "string",
      "enum": [
        "Busy",
        "Failed",
        "Answering Machine",
        "No Answer",
        "Connected",
        "Appointment Set",
        "Live Transferred",
        "Live Transfer Failed",
        "Call Back Later",
        "Did Not Leave Voicemail",
        "Do Not Call",
        "Do Not Contact",
        "Left Voicemail",
        "Not Interested",
        "No Conversation",
        "Reconnect Later",
        "Wrong Number",
        "Call Blocked, Detected as Spam",
        "Door Visit",
        "Agent Voicemail",
        null
      ],
      "nullable": true
    },
    "lead": {
      "anyOf": [
        {
          "type": "object",
          "nullable": true
        },
        {
          "$ref": "#/components/schemas/CreateLead"
        }
      ]
    }
  },
  "required": [
    "callType",
    "finishedAt",
    "recordingUrl",
    "startedAt",
    "vendorCallId",
    "vendorName"
  ]
}
```

### `VelocifyIntegration`

```json
{
  "type": "object",
  "properties": {
    "leadId": {
      "type": "string",
      "description": "Velocify Lead ID",
      "example": "12345"
    }
  },
  "required": [
    "leadId"
  ]
}
```

## Security

### `bearer-access-token`

```json
{
  "type": "http",
  "scheme": "bearer",
  "bearerFormat": "JWT"
}
```
