# 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.35`

## Webhooks

- [GET /api/direct/v2/webhooks](/api/direct/v2/webhooks/get.md)
- [POST /api/direct/v2/webhooks](/api/direct/v2/webhooks/post.md)
- [PATCH /api/direct/v2/webhooks/{webhook_id}](/api/direct/v2/webhooks/{webhook_id}/patch.md)
- [DELETE /api/direct/v2/webhooks/{webhook_id}](/api/direct/v2/webhooks/{webhook_id}/delete.md)
- [GET /api/direct/v2/webhooks/events](/api/direct/v2/webhooks/events/get.md)

### GET /api/direct/v2/webhooks

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

**Summary:** List webhook subscriptions

**Description:**

List webhook subscriptions for the authenticated account.

#### Responses

- `200`: Webhook subscriptions for the authenticated account
  - Schema: `WebhookListResponse`
  ```json
  {
    "type": "object",
    "properties": {
      "webhooks": {
        "type": "array",
        "description": "Webhook resources for the authenticated account.",
        "items": {
          "$ref": "#/components/schemas/WebhookCreateResponse"
        }
      }
    },
    "required": [
      "webhooks"
    ]
  }
  ```
- `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 GET 'https://client.structurely.com/api/direct/v2/webhooks' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $STRUCTURELY_API_TOKEN"
```

### POST /api/direct/v2/webhooks

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

**Summary:** Create a new webhook

**Description:**

Create a webhook subscription for lead, call, and message events.

#### Request body

Webhook configuration payload

Schema: `WebhookCreateRequest`

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Human-readable webhook name.",
      "example": "my webhook"
    },
    "target": {
      "type": "string",
      "description": "HTTPS URL where webhook events will be delivered.",
      "example": "https://example.com/webhooks"
    },
    "triggers": {
      "type": "array",
      "description": "List of events that should trigger this webhook.",
      "example": [
        "lead:created",
        "message"
      ],
      "items": {
        "type": "string",
        "enum": [
          "lead:created",
          "lead:updated",
          "call:created",
          "call:updated",
          "message",
          "custom-tool"
        ]
      }
    }
  },
  "required": [
    "name",
    "target",
    "triggers"
  ]
}
```

#### Responses

- `200`: The created webhook resource
  - Schema: `WebhookCreateResponse`
  ```json
  {
    "type": "object",
    "properties": {
      "id": {
        "description": "Webhook ID.",
        "example": "650ba6ced07cb5552a2467b0",
        "type": "string",
        "format": "ObjectId"
      },
      "name": {
        "type": "string",
        "description": "Human-readable webhook name.",
        "example": "my webhook"
      },
      "target": {
        "type": "string",
        "description": "HTTPS URL where webhook events are delivered."
      },
      "secret": {
        "type": "string",
        "description": "Webhook signing secret.",
        "example": "A4h5Q8Y3y9D7s2P4n6V1k3R0t8W2x5Z7b9C1d4F6g8H0j2K4"
      },
      "triggers": {
        "type": "array",
        "description": "Events that trigger this webhook.",
        "example": [
          "message"
        ],
        "items": {
          "type": "string",
          "enum": [
            "lead:created",
            "lead:updated",
            "call:created",
            "call:updated",
            "message",
            "custom-tool"
          ]
        }
      },
      "status": {
        "description": "Current webhook status.",
        "example": "active",
        "type": "string",
        "enum": [
          "active",
          "disabled",
          "failed"
        ]
      },
      "consecutiveFailures": {
        "type": "integer",
        "description": "Number of consecutive failed delivery attempts.",
        "example": 0
      },
      "totalSuccessfulRequests": {
        "type": "integer",
        "description": "Total successful webhook delivery attempts.",
        "example": 0
      },
      "totalFailedRequests": {
        "type": "integer",
        "description": "Total failed webhook delivery attempts.",
        "example": 0
      },
      "createdAt": {
        "type": "string",
        "format": "date-time",
        "description": "Webhook creation timestamp."
      },
      "updatedAt": {
        "type": "string",
        "format": "date-time",
        "description": "Webhook last update timestamp."
      }
    },
    "required": [
      "consecutiveFailures",
      "createdAt",
      "id",
      "name",
      "secret",
      "status",
      "target",
      "totalFailedRequests",
      "totalSuccessfulRequests",
      "triggers",
      "updatedAt"
    ]
  }
  ```
- `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/webhooks' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $STRUCTURELY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "my webhook",
  "target": "https://example.com/webhooks",
  "triggers": [
    "lead:created",
    "message"
  ]
}'
```

### PATCH /api/direct/v2/webhooks/{webhook_id}

[PATCH /api/direct/v2/webhooks/{webhook_id}](/api/direct/v2/webhooks/{webhook_id}/patch.md)

**Summary:** Update an existing webhook

**Description:**

Update mutable webhook fields. This endpoint currently supports status updates only.

#### Parameters

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

#### Request body

Webhook update payload.

Schema: `WebhookPatchRequest`

```json
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "disabled"
      ],
      "description": "Webhook status to apply.",
      "example": "active"
    }
  },
  "required": [
    "status"
  ]
}
```

#### Responses

- `200`: The updated webhook resource
  - Schema: `WebhookCreateResponse`
  ```json
  {
    "type": "object",
    "properties": {
      "id": {
        "description": "Webhook ID.",
        "example": "650ba6ced07cb5552a2467b0",
        "type": "string",
        "format": "ObjectId"
      },
      "name": {
        "type": "string",
        "description": "Human-readable webhook name.",
        "example": "my webhook"
      },
      "target": {
        "type": "string",
        "description": "HTTPS URL where webhook events are delivered."
      },
      "secret": {
        "type": "string",
        "description": "Webhook signing secret.",
        "example": "A4h5Q8Y3y9D7s2P4n6V1k3R0t8W2x5Z7b9C1d4F6g8H0j2K4"
      },
      "triggers": {
        "type": "array",
        "description": "Events that trigger this webhook.",
        "example": [
          "message"
        ],
        "items": {
          "type": "string",
          "enum": [
            "lead:created",
            "lead:updated",
            "call:created",
            "call:updated",
            "message",
            "custom-tool"
          ]
        }
      },
      "status": {
        "description": "Current webhook status.",
        "example": "active",
        "type": "string",
        "enum": [
          "active",
          "disabled",
          "failed"
        ]
      },
      "consecutiveFailures": {
        "type": "integer",
        "description": "Number of consecutive failed delivery attempts.",
        "example": 0
      },
      "totalSuccessfulRequests": {
        "type": "integer",
        "description": "Total successful webhook delivery attempts.",
        "example": 0
      },
      "totalFailedRequests": {
        "type": "integer",
        "description": "Total failed webhook delivery attempts.",
        "example": 0
      },
      "createdAt": {
        "type": "string",
        "format": "date-time",
        "description": "Webhook creation timestamp."
      },
      "updatedAt": {
        "type": "string",
        "format": "date-time",
        "description": "Webhook last update timestamp."
      }
    },
    "required": [
      "consecutiveFailures",
      "createdAt",
      "id",
      "name",
      "secret",
      "status",
      "target",
      "totalFailedRequests",
      "totalSuccessfulRequests",
      "triggers",
      "updatedAt"
    ]
  }
  ```
- `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 PATCH 'https://client.structurely.com/api/direct/v2/webhooks/{webhook_id}' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $STRUCTURELY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "active"
}'
```

### DELETE /api/direct/v2/webhooks/{webhook_id}

[DELETE /api/direct/v2/webhooks/{webhook_id}](/api/direct/v2/webhooks/{webhook_id}/delete.md)

**Summary:** Delete an existing webhook

**Description:**

Delete a webhook subscription.

#### Parameters

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

#### Responses

- `200`: Webhook deletion result
  ```json
  {
    "example": "OK",
    "type": "string"
  }
  ```
- `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 DELETE 'https://client.structurely.com/api/direct/v2/webhooks/{webhook_id}' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $STRUCTURELY_API_TOKEN"
```

### GET /api/direct/v2/webhooks/events

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

**Summary:** Preview webhook events

**Description:**

Preview recent webhook event envelopes for a single public Event Type.

#### Parameters

- `triggers` (query, required: yes)
  - Public webhook Event Type to preview.
  - Schema:
    ```json
    {
      "enum": [
        "lead:created",
        "lead:updated",
        "call:created",
        "call:updated",
        "message",
        "custom-tool"
      ],
      "type": "string"
    }
    ```

#### Responses

- `200`: Preview webhook event envelopes for the requested Event Type.
  ```json
  {
    "items": {
      "$ref": "#/components/schemas/WebhookEvent"
    },
    "type": "array"
  }
  ```
- `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 GET 'https://client.structurely.com/api/direct/v2/webhooks/events?triggers={triggers}' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $STRUCTURELY_API_TOKEN"
```

## Schemas

### `CallCreatedWebhookEvent`

```json
{
  "type": "object",
  "properties": {
    "eventId": {
      "description": "Webhook event ID.",
      "example": "650ba6ced07cb5552a2467b0",
      "type": "string",
      "format": "ObjectId"
    },
    "leadId": {
      "type": "string",
      "description": "Lead ID."
    },
    "externalLeadId": {
      "type": "string",
      "description": "Optional external ID for the lead.",
      "nullable": true
    },
    "eventMetadata": {
      "type": "object",
      "description": "Event metadata. Keys vary by event type.",
      "additionalProperties": {}
    },
    "eventPayload": {
      "$ref": "#/components/schemas/WebhookCallPayload"
    },
    "eventType": {
      "type": "string",
      "enum": [
        "call:created"
      ]
    }
  },
  "required": [
    "eventId",
    "eventMetadata",
    "eventPayload",
    "eventType",
    "externalLeadId",
    "leadId"
  ]
}
```

### `CallUpdatedWebhookEvent`

```json
{
  "type": "object",
  "properties": {
    "eventId": {
      "description": "Webhook event ID.",
      "example": "650ba6ced07cb5552a2467b0",
      "type": "string",
      "format": "ObjectId"
    },
    "leadId": {
      "type": "string",
      "description": "Lead ID."
    },
    "externalLeadId": {
      "type": "string",
      "description": "Optional external ID for the lead.",
      "nullable": true
    },
    "eventMetadata": {
      "type": "object",
      "description": "Event metadata. Keys vary by event type.",
      "additionalProperties": {}
    },
    "eventPayload": {
      "$ref": "#/components/schemas/WebhookCallPayload"
    },
    "eventType": {
      "type": "string",
      "enum": [
        "call:updated"
      ]
    }
  },
  "required": [
    "eventId",
    "eventMetadata",
    "eventPayload",
    "eventType",
    "externalLeadId",
    "leadId"
  ]
}
```

### `CustomToolWebhookEvent`

```json
{
  "type": "object",
  "properties": {
    "eventId": {
      "description": "Webhook event ID.",
      "example": "650ba6ced07cb5552a2467b0",
      "type": "string",
      "format": "ObjectId"
    },
    "leadId": {
      "type": "string",
      "description": "Lead ID."
    },
    "externalLeadId": {
      "type": "string",
      "description": "Optional external ID for the lead.",
      "nullable": true
    },
    "eventMetadata": {
      "type": "object",
      "description": "Event metadata. Keys vary by event type.",
      "additionalProperties": {}
    },
    "eventType": {
      "type": "string",
      "enum": [
        "custom-tool"
      ]
    },
    "eventPayload": {
      "$ref": "#/components/schemas/WebhookCustomToolPayload"
    }
  },
  "required": [
    "eventId",
    "eventMetadata",
    "eventPayload",
    "eventType",
    "externalLeadId",
    "leadId"
  ]
}
```

### `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
    }
  }
}
```

### `LeadCreatedWebhookEvent`

```json
{
  "type": "object",
  "properties": {
    "eventId": {
      "description": "Webhook event ID.",
      "example": "650ba6ced07cb5552a2467b0",
      "type": "string",
      "format": "ObjectId"
    },
    "leadId": {
      "type": "string",
      "description": "Lead ID."
    },
    "externalLeadId": {
      "type": "string",
      "description": "Optional external ID for the lead.",
      "nullable": true
    },
    "eventMetadata": {
      "type": "object",
      "description": "Event metadata. Keys vary by event type.",
      "additionalProperties": {}
    },
    "eventPayload": {
      "$ref": "#/components/schemas/WebhookLeadPayload"
    },
    "eventType": {
      "type": "string",
      "enum": [
        "lead:created"
      ]
    }
  },
  "required": [
    "eventId",
    "eventMetadata",
    "eventPayload",
    "eventType",
    "externalLeadId",
    "leadId"
  ]
}
```

### `LeadUpdatedWebhookEvent`

```json
{
  "type": "object",
  "properties": {
    "eventId": {
      "description": "Webhook event ID.",
      "example": "650ba6ced07cb5552a2467b0",
      "type": "string",
      "format": "ObjectId"
    },
    "leadId": {
      "type": "string",
      "description": "Lead ID."
    },
    "externalLeadId": {
      "type": "string",
      "description": "Optional external ID for the lead.",
      "nullable": true
    },
    "eventMetadata": {
      "type": "object",
      "description": "Event metadata. Keys vary by event type.",
      "additionalProperties": {}
    },
    "eventPayload": {
      "$ref": "#/components/schemas/WebhookLeadPayload"
    },
    "eventType": {
      "type": "string",
      "enum": [
        "lead:updated"
      ]
    }
  },
  "required": [
    "eventId",
    "eventMetadata",
    "eventPayload",
    "eventType",
    "externalLeadId",
    "leadId"
  ]
}
```

### `MessageWebhookEvent`

```json
{
  "type": "object",
  "properties": {
    "eventId": {
      "description": "Webhook event ID.",
      "example": "650ba6ced07cb5552a2467b0",
      "type": "string",
      "format": "ObjectId"
    },
    "leadId": {
      "type": "string",
      "description": "Lead ID."
    },
    "externalLeadId": {
      "type": "string",
      "description": "Optional external ID for the lead.",
      "nullable": true
    },
    "eventMetadata": {
      "type": "object",
      "description": "Event metadata. Keys vary by event type.",
      "additionalProperties": {}
    },
    "eventType": {
      "type": "string",
      "enum": [
        "message"
      ]
    },
    "eventPayload": {
      "$ref": "#/components/schemas/WebhookMessagePayload"
    }
  },
  "required": [
    "eventId",
    "eventMetadata",
    "eventPayload",
    "eventType",
    "externalLeadId",
    "leadId"
  ]
}
```

### `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
    }
  }
}
```

### `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
    }
  }
}
```

### `WebhookCallPayload`

```json
{
  "type": "object",
  "properties": {
    "callId": {
      "type": "string"
    },
    "callType": {
      "type": "string"
    },
    "customerCallStatus": {
      "type": "string"
    },
    "agentCallStatus": {
      "type": "string"
    },
    "isOutboundCall": {
      "type": "boolean"
    },
    "sourceNumber": {
      "type": "string"
    },
    "destinationNumber": {
      "type": "string"
    },
    "startedAt": {
      "type": "number"
    },
    "updatedAt": {
      "type": "number",
      "nullable": true
    },
    "finishedAt": {
      "type": "number",
      "nullable": true
    },
    "analyzedAt": {
      "type": "number",
      "nullable": true
    },
    "disposition": {
      "type": "string",
      "nullable": true
    },
    "notes": {
      "type": "string",
      "nullable": true
    },
    "slots": {
      "type": "object",
      "additionalProperties": {},
      "nullable": true
    },
    "customStages": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "nullable": true
    },
    "transcript": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/WebhookCallTranscript"
      },
      "nullable": true
    },
    "recordingUrl": {
      "type": "string",
      "nullable": true
    }
  },
  "required": [
    "agentCallStatus",
    "analyzedAt",
    "callId",
    "callType",
    "customStages",
    "customerCallStatus",
    "destinationNumber",
    "disposition",
    "finishedAt",
    "isOutboundCall",
    "notes",
    "recordingUrl",
    "slots",
    "sourceNumber",
    "startedAt",
    "transcript",
    "updatedAt"
  ]
}
```

### `WebhookCallTranscript`

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

### `WebhookCreateRequest`

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Human-readable webhook name.",
      "example": "my webhook"
    },
    "target": {
      "type": "string",
      "description": "HTTPS URL where webhook events will be delivered.",
      "example": "https://example.com/webhooks"
    },
    "triggers": {
      "type": "array",
      "description": "List of events that should trigger this webhook.",
      "example": [
        "lead:created",
        "message"
      ],
      "items": {
        "type": "string",
        "enum": [
          "lead:created",
          "lead:updated",
          "call:created",
          "call:updated",
          "message",
          "custom-tool"
        ]
      }
    }
  },
  "required": [
    "name",
    "target",
    "triggers"
  ]
}
```

### `WebhookCreateResponse`

```json
{
  "type": "object",
  "properties": {
    "id": {
      "description": "Webhook ID.",
      "example": "650ba6ced07cb5552a2467b0",
      "type": "string",
      "format": "ObjectId"
    },
    "name": {
      "type": "string",
      "description": "Human-readable webhook name.",
      "example": "my webhook"
    },
    "target": {
      "type": "string",
      "description": "HTTPS URL where webhook events are delivered."
    },
    "secret": {
      "type": "string",
      "description": "Webhook signing secret.",
      "example": "A4h5Q8Y3y9D7s2P4n6V1k3R0t8W2x5Z7b9C1d4F6g8H0j2K4"
    },
    "triggers": {
      "type": "array",
      "description": "Events that trigger this webhook.",
      "example": [
        "message"
      ],
      "items": {
        "type": "string",
        "enum": [
          "lead:created",
          "lead:updated",
          "call:created",
          "call:updated",
          "message",
          "custom-tool"
        ]
      }
    },
    "status": {
      "description": "Current webhook status.",
      "example": "active",
      "type": "string",
      "enum": [
        "active",
        "disabled",
        "failed"
      ]
    },
    "consecutiveFailures": {
      "type": "integer",
      "description": "Number of consecutive failed delivery attempts.",
      "example": 0
    },
    "totalSuccessfulRequests": {
      "type": "integer",
      "description": "Total successful webhook delivery attempts.",
      "example": 0
    },
    "totalFailedRequests": {
      "type": "integer",
      "description": "Total failed webhook delivery attempts.",
      "example": 0
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Webhook creation timestamp."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Webhook last update timestamp."
    }
  },
  "required": [
    "consecutiveFailures",
    "createdAt",
    "id",
    "name",
    "secret",
    "status",
    "target",
    "totalFailedRequests",
    "totalSuccessfulRequests",
    "triggers",
    "updatedAt"
  ]
}
```

### `WebhookCustomToolPayload`

```json
{
  "type": "object",
  "properties": {
    "toolName": {
      "type": "string"
    },
    "toolCallId": {
      "type": "string",
      "nullable": true
    },
    "channel": {
      "type": "string"
    },
    "lifecycle": {
      "type": "string"
    },
    "successful": {
      "type": "boolean"
    },
    "latencyMs": {
      "type": "number"
    },
    "requestUri": {
      "type": "string"
    },
    "requestMethod": {
      "type": "string"
    },
    "requestStatusCode": {
      "type": "integer",
      "nullable": true
    },
    "functionArgs": {
      "type": "object",
      "additionalProperties": {}
    },
    "normalizedResponse": {
      "nullable": true
    }
  },
  "required": [
    "channel",
    "functionArgs",
    "latencyMs",
    "lifecycle",
    "normalizedResponse",
    "requestMethod",
    "requestStatusCode",
    "requestUri",
    "successful",
    "toolCallId",
    "toolName"
  ]
}
```

### `WebhookEvent`

```json
{
  "oneOf": [
    {
      "$ref": "#/components/schemas/LeadCreatedWebhookEvent"
    },
    {
      "$ref": "#/components/schemas/LeadUpdatedWebhookEvent"
    },
    {
      "$ref": "#/components/schemas/CallCreatedWebhookEvent"
    },
    {
      "$ref": "#/components/schemas/CallUpdatedWebhookEvent"
    },
    {
      "$ref": "#/components/schemas/MessageWebhookEvent"
    },
    {
      "$ref": "#/components/schemas/CustomToolWebhookEvent"
    }
  ],
  "discriminator": {
    "propertyName": "eventType",
    "mapping": {
      "lead:created": "#/components/schemas/LeadCreatedWebhookEvent",
      "lead:updated": "#/components/schemas/LeadUpdatedWebhookEvent",
      "call:created": "#/components/schemas/CallCreatedWebhookEvent",
      "call:updated": "#/components/schemas/CallUpdatedWebhookEvent",
      "message": "#/components/schemas/MessageWebhookEvent",
      "custom-tool": "#/components/schemas/CustomToolWebhookEvent"
    }
  }
}
```

### `WebhookLeadPayload`

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "phone": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "nullable": true
    },
    "properties": {
      "$ref": "#/components/schemas/Properties"
    },
    "customProperties": {
      "type": "object",
      "additionalProperties": {},
      "nullable": true
    },
    "leadSource": {
      "type": "string",
      "nullable": true
    },
    "muted": {
      "type": "boolean"
    },
    "voiceMuted": {
      "type": "boolean"
    },
    "doNotCall": {
      "type": "boolean"
    },
    "firstContact": {
      "type": "number",
      "nullable": true
    },
    "lastContact": {
      "type": "number",
      "nullable": true
    },
    "stage": {
      "$ref": "#/components/schemas/WebhookLeadStage"
    },
    "currentCampaign": {
      "type": "string",
      "nullable": true
    },
    "lastCallDisposition": {
      "type": "string",
      "nullable": true
    },
    "customReport": {
      "type": "object",
      "additionalProperties": {},
      "nullable": true
    },
    "customStages": {
      "type": "object",
      "additionalProperties": {},
      "nullable": true
    }
  },
  "required": [
    "currentCampaign",
    "customProperties",
    "customReport",
    "customStages",
    "doNotCall",
    "email",
    "firstContact",
    "lastCallDisposition",
    "lastContact",
    "leadSource",
    "muted",
    "name",
    "phone",
    "properties",
    "stage",
    "tags",
    "voiceMuted"
  ]
}
```

### `WebhookLeadStage`

```json
{
  "type": "object",
  "properties": {
    "has_responded": {
      "type": "boolean"
    },
    "needs_agent_followup": {
      "type": "boolean"
    },
    "is_interested": {
      "type": "string",
      "enum": [
        "Yes",
        "No",
        "Unknown"
      ]
    },
    "stages": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "nullable": true
    }
  },
  "required": [
    "has_responded",
    "is_interested",
    "needs_agent_followup",
    "stages"
  ]
}
```

### `WebhookListResponse`

```json
{
  "type": "object",
  "properties": {
    "webhooks": {
      "type": "array",
      "description": "Webhook resources for the authenticated account.",
      "items": {
        "$ref": "#/components/schemas/WebhookCreateResponse"
      }
    }
  },
  "required": [
    "webhooks"
  ]
}
```

### `WebhookMessagePayload`

```json
{
  "type": "object",
  "properties": {
    "messageId": {
      "type": "string"
    },
    "messageType": {
      "type": "string",
      "enum": [
        "API",
        "SMS",
        "EMAIL"
      ]
    },
    "isOutboundMessage": {
      "type": "boolean"
    },
    "properties": {
      "$ref": "#/components/schemas/WebhookMessageProperties"
    },
    "sendersName": {
      "type": "string",
      "nullable": true
    },
    "text": {
      "type": "string",
      "nullable": true
    },
    "receivedAt": {
      "type": "number",
      "nullable": true
    }
  },
  "required": [
    "isOutboundMessage",
    "messageId",
    "messageType",
    "properties",
    "receivedAt",
    "sendersName",
    "text"
  ]
}
```

### `WebhookMessageProperties`

```json
{
  "type": "object",
  "properties": {
    "leadName": {
      "type": "string"
    },
    "emailSubject": {
      "type": "string",
      "nullable": true
    },
    "userPhoneNumber": {
      "type": "string",
      "nullable": true
    },
    "systemPhoneNumber": {
      "type": "string",
      "nullable": true
    },
    "userEmailAddress": {
      "type": "string",
      "nullable": true
    },
    "systemEmailAddress": {
      "type": "string",
      "nullable": true
    }
  },
  "required": [
    "emailSubject",
    "leadName",
    "systemEmailAddress",
    "systemPhoneNumber",
    "userEmailAddress",
    "userPhoneNumber"
  ]
}
```

### `WebhookPatchRequest`

```json
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "disabled"
      ],
      "description": "Webhook status to apply.",
      "example": "active"
    }
  },
  "required": [
    "status"
  ]
}
```

## Security

### `bearer-access-token`

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