{
  "openapi": "3.0.0",
  "info": {
    "version": "2.0.0",
    "title": "Nimbata API",
    "description": "Reference for the Nimbata Web API. Resources are scoped to an organization and, where applicable, a project. Start with GET /users/me and use the returned `org_id` as `{orgId}` in organization- and project-scoped URLs. All requests require authentication, and each operation documents any additional permission it requires. Missing or invalid credentials return HTTP 401. A valid token disallowed by route exposure or authentication-method restrictions receives HTTP 403 with a Problem body. Code 406000104 means the operation is unavailable using an ordinary API token; code 406000048 means stateless authentication is explicitly rejected. Send request bodies as JSON encoded in UTF-8. A body that cannot be parsed returns HTTP 400 with a ValidationProblem at pointer `/`: code 400000141 (`InvalidUtf8Value`) when it is not valid UTF-8, for example accented letters sent as Latin-1, and code 400000008 (`InvalidJsonValue`) for any other JSON error. A body with a NUL character (`\\u0000`) in a string returns code 400000151 (`InvalidNullCharacterValue`) at pointer `/`. Endpoints that support sample data use real data when `dummy` is omitted. Set `dummy=on` to request sample data or `dummy=auto` to let the endpoint choose according to setup eligibility.",
    "contact": {
      "name": "Nimbata Support",
      "email": "support@nimbata.com",
      "url": "https://help.nimbata.com"
    }
  },
  "x-tagGroups": [
    {
      "name": "Account",
      "tags": [
        "Authenticated user",
        "Organizations",
        "Projects"
      ]
    },
    {
      "name": "Tracking",
      "tags": [
        "Tracking Numbers",
        "Tracking Code",
        "Destinations",
        "Call Flows",
        "Forms"
      ]
    },
    {
      "name": "Data Tools",
      "tags": [
        "Tags",
        "Tag Categories",
        "Fields",
        "Tracking Sources",
        "Blocked callers"
      ]
    },
    {
      "name": "Integrations",
      "tags": [
        "Email Alerts",
        "Slack Alerts",
        "Webhooks",
        "Workflows",
        "Integration Events"
      ]
    },
    {
      "name": "Activity",
      "tags": [
        "Calls",
        "Call analytics",
        "Leads",
        "Form submissions",
        "SMS messages"
      ]
    },
    {
      "name": "Resources",
      "tags": [
        "Identities",
        "Media Library",
        "Reference data"
      ]
    }
  ],
  "tags": [
    {
      "name": "Authenticated user",
      "description": "Endpoints for the authenticated user. GET /users/me returns the user profile and the ID of the user’s primary organization."
    },
    {
      "name": "Organizations",
      "description": "Organization resources addressed by ID (UUIDv7). For the authenticated user’s primary organization, pass the `org_id` returned by GET /users/me as `{orgId}`."
    },
    {
      "name": "Projects",
      "description": "Projects belonging to an organization: list, create, read, update and delete."
    },
    {
      "name": "Destinations",
      "description": "Destinations are the phone numbers a call flow can route to. Item reads and deletes use the destination ID (UUIDv7); updates accept either that ID or the destination phone number. The default response contains identity, number, and verification fields. Use include for capabilities, summary counts, capping, and rates."
    },
    {
      "name": "Tracking Numbers",
      "description": "Tracking numbers are the phone numbers that route inbound calls into a project. Every row carries `id`, its ID (UUIDv7), alongside `number`, the phone number itself. Item operations accept either form. Collection reads use cursor pagination."
    },
    {
      "name": "Tracking Sources",
      "description": "Tracking sources describe where a call came from and drive dynamic number insertion. A project sees the shared base catalogue plus its own configured sources, and both kinds are addressed by an ID (UUIDv7). Only project-owned sources can be modified or deleted."
    },
    {
      "name": "Tracking Code",
      "description": "The website script that swaps a project’s tracking numbers onto its pages (dynamic number insertion) and captures form submissions. Read and change every setting of the Tracking Code page, publish the script and remove it.\n\nTo publish a client site: create the project, its tracking sources and its numbers, then `PUT` the tracking code with `website_url` and the `call_tracking.swap_groups` (each group lists the phone numbers shown on the site as `targets` and, optionally, which `tracking_number_ids` replace them). Every successful `PUT` publishes; embed each URL in `script.embed_srcs` on the site with a `<script src>` tag. After adding or changing numbers or sources, `POST ...:publish` rebuilds the script and keeps visitors’ stored attribution.\n\nEach update `PUT`, `:publish` and `:unpublish` refreshes the CDN, so API token and MCP requests share a limit per script: the project’s, or under group tracking the organization’s shared script’s (by default 5 a minute, 30 an hour and 100 a day). Only requests that go through count; a refused request does not. Over the limit the response is 429 with `Retry-After`. The Tracking Code page, which signs in with a session, is not limited."
    },
    {
      "name": "Call Flows",
      "description": "Call flows define how an inbound call is routed: by caller geography, keypad selection, weekday and time window, to one or more destinations. Flows are addressed by an ID (UUIDv7)."
    },
    {
      "name": "Tag Categories",
      "description": "Project tag-category CRUD addressed by ID (UUIDv7). Shared default categories are readable but immutable."
    },
    {
      "name": "Tags",
      "description": "Project tag CRUD nested under a tag category and addressed by ID (UUIDv7). Shared default tags are readable but immutable."
    },
    {
      "name": "Calls",
      "description": "Reading call detail, recordings, transcriptions and summaries, and editing the fields a user can change on a call. A call is addressed by its switch-generated leg ids (`uu_id_a`, plus `uu_id_b` when a specific destination leg is meant). Use these call-leg IDs exactly as returned by the API."
    },
    {
      "name": "Call analytics",
      "description": "The aggregated call reports behind the dashboard: summary metrics, trends, calls by hour, weekday, duration and dimension, destinations, caller journeys and visit conversion, plus the field metadata the reports filter and group by. Each report is available for one project or across the organization, where it covers only the projects the caller may read."
    },
    {
      "name": "Leads",
      "description": "Caller and form leads and their visitor timelines. List a project’s leads, then read a lead’s timeline of pages, calls, form submissions and visitor information, using the lead `id` returned by the leads list as `leadId`."
    },
    {
      "name": "Forms",
      "description": "The forms being tracked in a project: what they are, what fields they capture, and what they are called. This is the catalogue to read before requesting submissions; a form’s `id` (UUIDv7) is what the Form submissions endpoints take in `form_ids`. Submissions themselves live under Form submissions."
    },
    {
      "name": "Form submissions",
      "description": "Form activity under /form-submissions: one list and one count of the submissions of one, several or every tracked form, selected through `form_ids`, plus the edit and delete of a single submission. A submission is addressed by its submission id inside the project’s form-tracking groups."
    },
    {
      "name": "SMS messages",
      "description": "SMS messages sent and received by a project’s tracking numbers, newest first. Each message carries `from` and `to`, its sender and recipient, and a `tracking_number` object naming the Nimbata number on either side. Each message has a stable ID."
    },
    {
      "name": "Blocked callers",
      "description": "Callers whose calls should be filtered out of a project. A block is the pairing of a caller number with a scope — this project, or the whole organization — so the number itself is the identifier and there is no separate id."
    },
    {
      "name": "Fields",
      "description": "Project-defined custom fields that can be set on a call. `id` is the field’s ID (UUIDv7) and addresses the resource; `key` is the immutable server-generated key under which its value is stored."
    },
    {
      "name": "Email Alerts",
      "description": "Email alerts of a project. An email alert emails call, form or SMS event details to its recipients when a workflow step points at it; a step names an email alert by its ID in `configurations`. The subject and body can name event fields as `%field%`, with the `field` values GET /orgs/{orgId}/projects/{projectId}/email-alerts:fields lists for the alert’s event type; a call alert’s body can also place the recording link, the transcription and the activity link with the section tokens that route lists."
    },
    {
      "name": "Slack Alerts",
      "description": "Slack alerts of a project. A Slack alert posts call details to a channel of the project’s connected Slack workspace when a workflow step points at it; a step names a Slack alert by its ID in `configurations`. A message is the alert’s optional `text` (Slack mrkdwn that can name call fields as `%field%`) followed by its field rows, one section or two columns. Connect the workspace in the app; GET /orgs/{orgId}/projects/{projectId}/slack-alerts:channels lists its channels and GET /orgs/{orgId}/projects/{projectId}/slack-alerts:fields the fields."
    },
    {
      "name": "Webhooks",
      "description": "Outbound webhooks of a project. A webhook sends call, form or SMS event data to an https endpoint when a workflow step points at it; a step names a webhook by its ID in `configurations`. Secrets (bearer tokens, API key values, basic auth passwords and extra parameter values) are write-only: responses only say whether one is saved."
    },
    {
      "name": "Workflows",
      "description": "Workflows of a project. A workflow waits for its `triggering_event`, checks its condition stages and runs the task stages they lead to: field actions, such as tagging a call, and integration steps, such as a webhook or an email alert. GET /orgs/{orgId}/projects/{projectId}/workflows:describe lists everything a definition can hold and the project’s values it can name, so read it before writing one. A new workflow is off: :publish turns it on, and it runs only while `is_active` and `is_valid` are both true. An update needs the `etag` of the read it is based on in `If-Match`. A step for an integration the caller cannot read appears as `{ \"id\": \"restricted\", \"ref\": \"…\" }`; send it back unchanged."
    },
    {
      "name": "Integration Events",
      "description": "The delivery log of a project’s integrations, read-only: every attempt Nimbata made to send a call, form submission or SMS message to an integration (Meta, Google Ads, HubSpot, webhooks and the rest), the Google Ads conversions still waiting for upload, and project-level integration events such as a missing conversion setting. Events are kept for 365 days. Use `filter[result]=failed` with `date_range` to read the failures of given days, or read every attempt made for one call or form submission from its own path. Requires the AuditLogRead permission and the Integration Events plan feature."
    },
    {
      "name": "Identities",
      "description": "Identities are the people or companies a regulator checks before tracking numbers in some countries can be activated. To register numbers:\n1. Order them with `numbers:order`; they start as `awaiting_registration`.\n2. Read what a number needs from its registration read, or before ordering from GET /orgs/{orgId}/options/registration-requirements.\n3. Create the identity and set its address.\n4. Upload the documents, with a `type_id` from the requirements.\n5. Check the identity: the registration read with `identity_id` lists what is `missing`.\n6. Submit the numbers with `numbers:register`.\nThe identity may belong to any project of the organization where you hold IdentityRead. Ids are opaque: pass them back as returned."
    },
    {
      "name": "Media Library",
      "description": "The audio a project plays on a call: greetings heard by the caller, survey prompts played to the agent after the call, voicemail greetings, and whispers played to the agent before the call connects. For a greeting, survey, or voicemail, `id` is the storage key that call flows reference and that playback and delete operations accept. A whisper belongs to a tracking number instead of being a standalone file. Greetings and surveys may be shared across every project in the organization, in which case `project_id` is null."
    },
    {
      "name": "Reference data",
      "description": "Read-only reference data for ordering and registering numbers: the countries served, their states or cities, the proof documents known for a given kind of registrant, what registering a number of a type in a country requires, and the public keys identity documents are encrypted with. The contents are the same for every organization, so these are scoped to the organization only."
    }
  ],
  "paths": {
    "/users/me": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Authenticated user"
        ],
        "summary": "Get the current user",
        "description": "Returns the authenticated user’s profile and primary organization ID. Use the `org_id` value as `{orgId}` in organization- and project-scoped endpoints. The response identifies only the primary organization; it does not include child organizations. Security and meta are omitted by default. Include an object name to return the whole object, or a field path to return only that field.",
        "operationId": "getCurrentUserPrimaryOrg",
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all timestamps.\n• `meta.email_verified_at` — includes the email verification timestamp.\n• `meta.invitation_expires_at` — includes the invitation expiry timestamp.\n• `meta.last_seen_at` — includes the last-seen timestamp.\n• `meta.onboarded_at` — includes the onboarding completion timestamp.\n• `projects` — includes the projects accessible to the authenticated user.\n• `security` — includes all security flags.\n• `security.has_email_2fa` — includes whether email two-factor authentication is active.\n• `security.has_totp_2fa` — includes whether authenticator-app two-factor authentication is active.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nSecurity and meta are omitted unless requested.\n\nExample: `security,meta.email_verified_at`",
            "x-placeholder": "Example: security,meta.email_verified_at",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.email_verified_at",
                      "description": "includes the email verification timestamp."
                    },
                    {
                      "value": "meta.invitation_expires_at",
                      "description": "includes the invitation expiry timestamp."
                    },
                    {
                      "value": "meta.last_seen_at",
                      "description": "includes the last-seen timestamp."
                    },
                    {
                      "value": "meta.onboarded_at",
                      "description": "includes the onboarding completion timestamp."
                    },
                    {
                      "value": "projects",
                      "description": "includes the projects accessible to the authenticated user."
                    },
                    {
                      "value": "security",
                      "description": "includes all security flags."
                    },
                    {
                      "value": "security.has_email_2fa",
                      "description": "includes whether email two-factor authentication is active."
                    },
                    {
                      "value": "security.has_totp_2fa",
                      "description": "includes whether authenticator-app two-factor authentication is active."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Security and meta are omitted unless requested."
              ],
              "example": "security,meta.email_verified_at"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The authenticated user profile, including the ID (UUIDv7) of the primary organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentUser"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Organizations"
        ],
        "summary": "Get an organization",
        "description": "Returns an organization’s identity and profile (industry, description, and address), billing details, display preferences, tracking settings, compliance settings, and summary. Use include to request additional counts or child organizations. Profile fields and some details require organization-read or organization-manager permission.",
        "operationId": "getOrg",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7). For the authenticated user’s primary organization, use the `org_id` returned by GET /users/me.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `billing` — includes the billing summary (plan id and subscription status).; sensitive billing fields still require billing-read permission.\n• `children` — includes accessible child organizations; organization-manager permission is required.\n• `compliance` — includes compliance settings (HIPAA).\n• `features` — includes tracking features (multi-location setup and caller-ID masking).\n• `meta` — includes all timestamps.; organization-read permission is required.\n• `meta.updated_at` — includes the last update timestamp in UTC.; organization-read permission is required.\n• `meta.updated_by` — includes the user ID of the last updater, or null for a system change.; organization-read permission is required.\n• `summary` — includes the organization summary (user presence and tracking-number count).\n• `summary.project_count` — includes the number of accessible projects.\n• `summary.user_count` — includes the number of accessible users.\n\nbilling, compliance, features, summary and meta are opt-in: request them to receive those sections. Each value adds only the documented field or collection; use the listed dotted paths for organization counts and meta timestamps.\n\nExample: `billing,compliance,features,summary`",
            "x-placeholder": "Example: billing,compliance,features,summary",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "billing",
                      "description": "includes the billing summary (plan id and subscription status).",
                      "permission": "sensitive billing fields still require billing-read permission."
                    },
                    {
                      "value": "children",
                      "description": "includes accessible child organizations",
                      "permission": "organization-manager permission is required."
                    },
                    {
                      "value": "compliance",
                      "description": "includes compliance settings (HIPAA)."
                    },
                    {
                      "value": "features",
                      "description": "includes tracking features (multi-location setup and caller-ID masking)."
                    },
                    {
                      "value": "meta",
                      "description": "includes all timestamps.",
                      "permission": "organization-read permission is required."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC.",
                      "permission": "organization-read permission is required."
                    },
                    {
                      "value": "meta.updated_by",
                      "description": "includes the user ID of the last updater, or null for a system change.",
                      "permission": "organization-read permission is required."
                    },
                    {
                      "value": "summary",
                      "description": "includes the organization summary (user presence and tracking-number count)."
                    },
                    {
                      "value": "summary.project_count",
                      "description": "includes the number of accessible projects."
                    },
                    {
                      "value": "summary.user_count",
                      "description": "includes the number of accessible users."
                    }
                  ]
                }
              ],
              "notes": [
                "billing, compliance, features, summary and meta are opt-in: request them to receive those sections. Each value adds only the documented field or collection; use the listed dotted paths for organization counts and meta timestamps."
              ],
              "example": "billing,compliance,features,summary"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Organization details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The user cannot access the organization or requested child expansion.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Organizations"
        ],
        "summary": "Update an organization",
        "description": "Updates an organization’s name, profile (industry, description, address), display preferences and tracking features. Partial update: only the fields present in the body are changed. Returns the organization’s identity, preferences and profile fields; opt-in sections (billing, compliance, features, summary) and meta timestamps are omitted. Requires organization-core-update permission.",
        "operationId": "updateOrg",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrgRequest"
              }
            }
          },
          "description": "Fields to update. Only the fields present in the body are changed.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated organization. Returns identity, preferences and profile fields; opt-in sections and meta timestamps are omitted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "OrgCoreUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Nothing to update.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Projects"
        ],
        "summary": "List projects",
        "description": "Returns one cursor-paginated page of projects the authenticated user can access. Follow `page.next` exactly to continue. Each item has the same structure as GET /orgs/{orgId}/projects/{projectId}: identity, descriptive fields, and preferences by default. Features, capabilities, summary counts, and meta timestamps require include.",
        "operationId": "getProjectsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `capabilities` — includes all allowed actions.\n• `capabilities.can_add_tracking_numbers` — includes whether tracking numbers can be added. (whitelabel accounts only)\n• `capabilities.can_receive_sms` — includes whether inbound SMS is enabled.\n• `meta` — includes all timestamps.\n• `meta.created_at` — includes the creation timestamp.\n• `meta.test_call_completed_at` — includes the test-call completion timestamp.\n• `meta.test_call_skipped_at` — includes the test-call skip timestamp.\n• `meta.updated_at` — includes the last update timestamp.\n• `role-claims` — includes project roles with their permissions (claims); implies `roles`.; organization-authorization-read permission is required (super admins qualify, and so does project-authorization-read on the project when getting a single project), or the include is left out.\n• `roles` — includes project roles.; organization-authorization-read permission is required (super admins qualify, and so does project-authorization-read on the project when getting a single project), or the include is left out.\n• `summary` — includes all project counts.\n• `summary.active_tracking_number_count` — includes the active tracking-number count.\n• `summary.call_flow_count` — includes the call-flow count.\n• `summary.destination_count` — includes the destination count.\n• `summary.tracking_number_count` — includes the tracking-number count.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nIf `properties` is supplied, it filters the fields enabled by `include`.\n\nExample: `summary,meta.updated_at`",
            "x-placeholder": "Example: summary,meta.updated_at",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "capabilities",
                      "description": "includes all allowed actions."
                    },
                    {
                      "value": "capabilities.can_add_tracking_numbers",
                      "description": "includes whether tracking numbers can be added.",
                      "badge": "Whitelabel accounts only"
                    },
                    {
                      "value": "capabilities.can_receive_sms",
                      "description": "includes whether inbound SMS is enabled."
                    },
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.created_at",
                      "description": "includes the creation timestamp."
                    },
                    {
                      "value": "meta.test_call_completed_at",
                      "description": "includes the test-call completion timestamp."
                    },
                    {
                      "value": "meta.test_call_skipped_at",
                      "description": "includes the test-call skip timestamp."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp."
                    },
                    {
                      "value": "role-claims",
                      "description": "includes project roles with their permissions (claims); implies `roles`.",
                      "permission": "organization-authorization-read permission is required (super admins qualify, and so does project-authorization-read on the project when getting a single project), or the include is left out."
                    },
                    {
                      "value": "roles",
                      "description": "includes project roles.",
                      "permission": "organization-authorization-read permission is required (super admins qualify, and so does project-authorization-read on the project when getting a single project), or the include is left out."
                    },
                    {
                      "value": "summary",
                      "description": "includes all project counts."
                    },
                    {
                      "value": "summary.active_tracking_number_count",
                      "description": "includes the active tracking-number count."
                    },
                    {
                      "value": "summary.call_flow_count",
                      "description": "includes the call-flow count."
                    },
                    {
                      "value": "summary.destination_count",
                      "description": "includes the destination count."
                    },
                    {
                      "value": "summary.tracking_number_count",
                      "description": "includes the tracking-number count."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "If `properties` is supplied, it filters the fields enabled by `include`."
              ],
              "example": "summary,meta.updated_at"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "properties",
            "in": "query",
            "description": "Return only the project fields you name, separated by commas. Leave this empty to return all default fields plus any requested includes.\n\nExamples:\n\n• `properties=id,name` — returns only the project ID and name.\n• `properties=id,preferences.timezone` — returns the ID and timezone, with timezone nested inside preferences.\n• `properties=id,preferences` — returns the ID and all preference fields.\n\nOptional fields still need include: `include=summary.tracking_number_count&properties=id,summary.tracking_number_count` returns only the ID and tracking number count.\n\nUse include to add optional fields; use properties to choose which fields to keep. On the list endpoint, this applies to each project in items; pagination stays the same.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Set to name to sort projects by name.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum projects to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Accessible projects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Projects"
        ],
        "summary": "Create a project",
        "description": "Creates a project in the organization. Requires ProjectCoreCreate permission and an available project allowance on the plan.",
        "operationId": "createProjectWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectRequest"
              }
            }
          },
          "description": "Project to create.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Project created. Returns its basic fields and preferences. The Location header contains its Web API URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Project creation is not permitted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "A project with the same name exists or the plan limit would be exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Projects"
        ],
        "summary": "Get a project",
        "description": "Returns project identity, descriptive fields, and preferences. Features, capabilities, summary counts, and meta timestamps are omitted by default. Include an object name for all its fields, or a field path for an individual field.",
        "operationId": "getProjectWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `capabilities` — includes all allowed actions.\n• `capabilities.can_add_tracking_numbers` — includes whether tracking numbers can be added. (whitelabel accounts only)\n• `capabilities.can_receive_sms` — includes whether inbound SMS is enabled.\n• `meta` — includes all timestamps.\n• `meta.created_at` — includes the creation timestamp.\n• `meta.test_call_completed_at` — includes the test-call completion timestamp.\n• `meta.test_call_skipped_at` — includes the test-call skip timestamp.\n• `meta.updated_at` — includes the last update timestamp.\n• `role-claims` — includes project roles with their permissions (claims); implies `roles`.; organization-authorization-read permission is required (super admins qualify, and so does project-authorization-read on the project when getting a single project), or the include is left out.\n• `roles` — includes project roles.; organization-authorization-read permission is required (super admins qualify, and so does project-authorization-read on the project when getting a single project), or the include is left out.\n• `summary` — includes all project counts.\n• `summary.active_tracking_number_count` — includes the active tracking-number count.\n• `summary.call_flow_count` — includes the call-flow count.\n• `summary.destination_count` — includes the destination count.\n• `summary.tracking_number_count` — includes the tracking-number count.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nIf `properties` is supplied, it filters the fields enabled by `include`.\n\nExample: `summary,meta.updated_at`",
            "x-placeholder": "Example: summary,meta.updated_at",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "capabilities",
                      "description": "includes all allowed actions."
                    },
                    {
                      "value": "capabilities.can_add_tracking_numbers",
                      "description": "includes whether tracking numbers can be added.",
                      "badge": "Whitelabel accounts only"
                    },
                    {
                      "value": "capabilities.can_receive_sms",
                      "description": "includes whether inbound SMS is enabled."
                    },
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.created_at",
                      "description": "includes the creation timestamp."
                    },
                    {
                      "value": "meta.test_call_completed_at",
                      "description": "includes the test-call completion timestamp."
                    },
                    {
                      "value": "meta.test_call_skipped_at",
                      "description": "includes the test-call skip timestamp."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp."
                    },
                    {
                      "value": "role-claims",
                      "description": "includes project roles with their permissions (claims); implies `roles`.",
                      "permission": "organization-authorization-read permission is required (super admins qualify, and so does project-authorization-read on the project when getting a single project), or the include is left out."
                    },
                    {
                      "value": "roles",
                      "description": "includes project roles.",
                      "permission": "organization-authorization-read permission is required (super admins qualify, and so does project-authorization-read on the project when getting a single project), or the include is left out."
                    },
                    {
                      "value": "summary",
                      "description": "includes all project counts."
                    },
                    {
                      "value": "summary.active_tracking_number_count",
                      "description": "includes the active tracking-number count."
                    },
                    {
                      "value": "summary.call_flow_count",
                      "description": "includes the call-flow count."
                    },
                    {
                      "value": "summary.destination_count",
                      "description": "includes the destination count."
                    },
                    {
                      "value": "summary.tracking_number_count",
                      "description": "includes the tracking-number count."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "If `properties` is supplied, it filters the fields enabled by `include`."
              ],
              "example": "summary,meta.updated_at"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "properties",
            "in": "query",
            "description": "Return only the project fields you name, separated by commas. Leave this empty to return all default fields plus any requested includes.\n\nExamples:\n\n• `properties=id,name` — returns only the project ID and name.\n• `properties=id,preferences.timezone` — returns the ID and timezone, with timezone nested inside preferences.\n• `properties=id,preferences` — returns the ID and all preference fields.\n\nOptional fields still need include: `include=summary.tracking_number_count&properties=id,summary.tracking_number_count` returns only the ID and tracking number count.\n\nUse include to add optional fields; use properties to choose which fields to keep. On the list endpoint, this applies to each project in items; pagination stays the same.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Project details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDetail"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ProjectCoreRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Projects"
        ],
        "summary": "Update a project",
        "description": "Updates a project. Only the fields present in the body are changed; omitted fields are left untouched. Requires ProjectCoreUpdate permission.",
        "operationId": "updateProjectWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectRequest"
              }
            }
          },
          "description": "Fields to update.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated project. Returns its basic fields and preferences. capabilities.can_receive_sms and capabilities.can_add_tracking_numbers are returned only when their corresponding fields were present in the request body; read-only summary, meta and role data are omitted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectUpdateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ProjectCoreUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Nothing changed or a project with the same name exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Projects"
        ],
        "summary": "Delete a project",
        "description": "Deletes a project and returns 204 with no body. The organization must retain at least one project, so deleting the last one is refused. Requires ProjectCoreDelete permission.",
        "operationId": "deleteProjectWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Project deleted successfully. No response body."
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ProjectCoreDelete permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The organization must retain at least one project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/destinations": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Destinations"
        ],
        "summary": "List organization destinations",
        "description": "Returns one cursor-paginated page of destinations across projects where the caller has DestinationRead permission. Filtering by project permissions happens before search, totals, and pagination. Follow `page.next` exactly. Each row contains the same default fields as the detail endpoint. Use include for capabilities, summary counts, capping, or rates. Add page.total_count to include the matching total before pagination; it is omitted by default. Optional search matches destination names and phone numbers. Rate values remain null when the caller lacks DestinationRateRead permission.",
        "operationId": "getOrgDestinationsWebApi",
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `capabilities` — includes all allowed actions.\n• `capabilities.can_delete` — includes whether the destination can be deleted.\n• `capping` — includes all call-capping settings and usage.\n• `capping.call_count` — includes calls counted toward the cap.\n• `capping.limit` — includes the call cap.\n• `capping.starts_on` — includes when the current cap period starts.\n• `page.total_count` — includes the total number of authorized destinations matching the search, before pagination.\n• `rates` — includes all per-answered-call rates, subject to existing permissions.\n• `rates.eu_per_answered_call` — includes the EU rate.\n• `rates.is_eea` — includes whether the destination is in the EEA.\n• `rates.non_eu_per_answered_call` — includes the non-EU rate.\n• `summary` — includes all usage counts.\n• `summary.call_flow_count` — includes the call-flow count.\n• `summary.tracking_number_count` — includes the tracking-number count.\n\nCollection-only expansions:\n\n• `projects` — includes the ID and name of each project the destinations on this page belong to in `projects`.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nExample: `summary.call_flow_count,capping.limit`",
            "x-placeholder": "Example: summary.call_flow_count,capping.limit",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "capabilities",
                      "description": "includes all allowed actions."
                    },
                    {
                      "value": "capabilities.can_delete",
                      "description": "includes whether the destination can be deleted."
                    },
                    {
                      "value": "capping",
                      "description": "includes all call-capping settings and usage."
                    },
                    {
                      "value": "capping.call_count",
                      "description": "includes calls counted toward the cap."
                    },
                    {
                      "value": "capping.limit",
                      "description": "includes the call cap."
                    },
                    {
                      "value": "capping.starts_on",
                      "description": "includes when the current cap period starts."
                    },
                    {
                      "value": "page.total_count",
                      "description": "includes the total number of authorized destinations matching the search, before pagination."
                    },
                    {
                      "value": "rates",
                      "description": "includes all per-answered-call rates, subject to existing permissions."
                    },
                    {
                      "value": "rates.eu_per_answered_call",
                      "description": "includes the EU rate."
                    },
                    {
                      "value": "rates.is_eea",
                      "description": "includes whether the destination is in the EEA."
                    },
                    {
                      "value": "rates.non_eu_per_answered_call",
                      "description": "includes the non-EU rate."
                    },
                    {
                      "value": "summary",
                      "description": "includes all usage counts."
                    },
                    {
                      "value": "summary.call_flow_count",
                      "description": "includes the call-flow count."
                    },
                    {
                      "value": "summary.tracking_number_count",
                      "description": "includes the tracking-number count."
                    }
                  ]
                },
                {
                  "title": "Collection-only expansions",
                  "options": [
                    {
                      "value": "projects",
                      "description": "includes the ID and name of each project the destinations on this page belong to in `projects`."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field."
              ],
              "example": "summary.call_flow_count,capping.limit"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum destinations to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Optional case-insensitive substring search on destination names and numbers. Phone searches ignore spaces and formatting. The term is trimmed; empty terms are invalid. Omit for no search filtering. Keep it unchanged when following a cursor.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not construct or modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Accessible organization destinations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Organization access is required. Projects without DestinationRead permission are omitted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid search or pagination input, or the cursor belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/destinations": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Destinations"
        ],
        "summary": "List project destinations",
        "description": "Returns one cursor-paginated page of destinations configured in the project. Follow `page.next` exactly. Each row contains the same default fields as the detail endpoint. Use include for capabilities, summary counts, capping, or rates. Add page.total_count to include the matching total before pagination; it is omitted by default. Optional search matches destination names and phone numbers. Rate values remain null when the caller lacks DestinationRateRead permission.",
        "operationId": "getProjectDestinationsWebApi",
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `capabilities` — includes all allowed actions.\n• `capabilities.can_delete` — includes whether the destination can be deleted.\n• `capping` — includes all call-capping settings and usage.\n• `capping.call_count` — includes calls counted toward the cap.\n• `capping.limit` — includes the call cap.\n• `capping.starts_on` — includes when the current cap period starts.\n• `page.total_count` — includes the total number of authorized destinations matching the search, before pagination.\n• `rates` — includes all per-answered-call rates, subject to existing permissions.\n• `rates.eu_per_answered_call` — includes the EU rate.\n• `rates.is_eea` — includes whether the destination is in the EEA.\n• `rates.non_eu_per_answered_call` — includes the non-EU rate.\n• `summary` — includes all usage counts.\n• `summary.call_flow_count` — includes the call-flow count.\n• `summary.tracking_number_count` — includes the tracking-number count.\n\nCollection-only expansions:\n\n• `projects` — includes the ID and name of each project the destinations on this page belong to in `projects`.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nExample: `summary.call_flow_count,capping.limit`",
            "x-placeholder": "Example: summary.call_flow_count,capping.limit",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "capabilities",
                      "description": "includes all allowed actions."
                    },
                    {
                      "value": "capabilities.can_delete",
                      "description": "includes whether the destination can be deleted."
                    },
                    {
                      "value": "capping",
                      "description": "includes all call-capping settings and usage."
                    },
                    {
                      "value": "capping.call_count",
                      "description": "includes calls counted toward the cap."
                    },
                    {
                      "value": "capping.limit",
                      "description": "includes the call cap."
                    },
                    {
                      "value": "capping.starts_on",
                      "description": "includes when the current cap period starts."
                    },
                    {
                      "value": "page.total_count",
                      "description": "includes the total number of authorized destinations matching the search, before pagination."
                    },
                    {
                      "value": "rates",
                      "description": "includes all per-answered-call rates, subject to existing permissions."
                    },
                    {
                      "value": "rates.eu_per_answered_call",
                      "description": "includes the EU rate."
                    },
                    {
                      "value": "rates.is_eea",
                      "description": "includes whether the destination is in the EEA."
                    },
                    {
                      "value": "rates.non_eu_per_answered_call",
                      "description": "includes the non-EU rate."
                    },
                    {
                      "value": "summary",
                      "description": "includes all usage counts."
                    },
                    {
                      "value": "summary.call_flow_count",
                      "description": "includes the call-flow count."
                    },
                    {
                      "value": "summary.tracking_number_count",
                      "description": "includes the tracking-number count."
                    }
                  ]
                },
                {
                  "title": "Collection-only expansions",
                  "options": [
                    {
                      "value": "projects",
                      "description": "includes the ID and name of each project the destinations on this page belong to in `projects`."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field."
              ],
              "example": "summary.call_flow_count,capping.limit"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum destinations to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Optional case-insensitive substring search on destination names and numbers. Phone searches ignore spaces and formatting. The term is trimmed; empty terms are invalid. Omit for no search filtering. Keep it unchanged when following a cursor.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not construct or modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Project destinations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "DestinationRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Destinations"
        ],
        "summary": "Create a project destination",
        "description": "Adds a destination to the project and returns the created destination. Requires DestinationCreate permission. If the number carries an unusually high per-call charge the response may instead be `confirmation_required=true` with the rate details; repeat the request with `confirm_high_rate=true` to proceed. Callers holding DestinationHighRateCreate without DestinationRateRead skip the confirmation step.",
        "operationId": "createProjectDestinationWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDestinationRequest"
              }
            }
          },
          "description": "Destination to create.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Destination created, or high-rate confirmation is required. Inspect confirmation_required before reading destination.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateDestinationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "DestinationCreate permission is required or high-rate creation is forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The destination already exists, is invalid for the organization, or could not be created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Destinations"
        ],
        "summary": "Remove destinations",
        "description": "Removes multiple destinations from the project. Each `destinations` entry identifies the destination by its phone number in `number` and includes the owning project’s ID (UUIDv7) in `project_id`.",
        "operationId": "removeProjectDestinations",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveDestinationsRequest"
              }
            }
          },
          "description": "The destinations to remove and whether to detach them from valid call flows.",
          "required": true
        },
        "responses": {
          "204": {
            "description": "Destinations removed."
          },
          "400": {
            "description": "Validation problem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The required permission is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Coded domain problem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/destinations/{destinationId}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Destinations"
        ],
        "summary": "Get one destination",
        "description": "Returns one destination by ID (UUIDv7). The response has the same shape and include rules as an item in the destination list. Usage counts, capabilities, capping, and rates are optional.",
        "operationId": "getProjectDestination",
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `capabilities` — includes all allowed actions.\n• `capabilities.can_delete` — includes whether the destination can be deleted.\n• `capping` — includes all call-capping settings and usage.\n• `capping.call_count` — includes calls counted toward the cap.\n• `capping.limit` — includes the call cap.\n• `capping.starts_on` — includes when the current cap period starts.\n• `rates` — includes all per-answered-call rates, subject to existing permissions.\n• `rates.eu_per_answered_call` — includes the EU rate.\n• `rates.is_eea` — includes whether the destination is in the EEA.\n• `rates.non_eu_per_answered_call` — includes the non-EU rate.\n• `summary` — includes all usage counts.\n• `summary.call_flow_count` — includes the call-flow count.\n• `summary.tracking_number_count` — includes the tracking-number count.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nExample: `summary.call_flow_count,capping.limit`",
            "x-placeholder": "Example: summary.call_flow_count,capping.limit",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "capabilities",
                      "description": "includes all allowed actions."
                    },
                    {
                      "value": "capabilities.can_delete",
                      "description": "includes whether the destination can be deleted."
                    },
                    {
                      "value": "capping",
                      "description": "includes all call-capping settings and usage."
                    },
                    {
                      "value": "capping.call_count",
                      "description": "includes calls counted toward the cap."
                    },
                    {
                      "value": "capping.limit",
                      "description": "includes the call cap."
                    },
                    {
                      "value": "capping.starts_on",
                      "description": "includes when the current cap period starts."
                    },
                    {
                      "value": "rates",
                      "description": "includes all per-answered-call rates, subject to existing permissions."
                    },
                    {
                      "value": "rates.eu_per_answered_call",
                      "description": "includes the EU rate."
                    },
                    {
                      "value": "rates.is_eea",
                      "description": "includes whether the destination is in the EEA."
                    },
                    {
                      "value": "rates.non_eu_per_answered_call",
                      "description": "includes the non-EU rate."
                    },
                    {
                      "value": "summary",
                      "description": "includes all usage counts."
                    },
                    {
                      "value": "summary.call_flow_count",
                      "description": "includes the call-flow count."
                    },
                    {
                      "value": "summary.tracking_number_count",
                      "description": "includes the tracking-number count."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field."
              ],
              "example": "summary.call_flow_count,capping.limit"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "destinationId",
            "in": "path",
            "description": "Destination ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The destination.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Destination"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "DestinationRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "DestinationNotFound when no destination with this UUIDv7 exists inside the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Destinations"
        ],
        "summary": "Update one destination",
        "description": "Updates one destination identified by either its ID (UUIDv7) or its phone number. The destination must belong to the project in the URL. When `project_id` is supplied in the request body, it must contain the same project ID (UUIDv7) as `{projectId}`.",
        "operationId": "updateProjectDestinationDetails",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "destinationId",
            "in": "path",
            "description": "Destination ID (UUIDv7), or its phone number in E.164 digits.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDestinationRequest"
              }
            }
          },
          "description": "The destination fields to update.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated destination. Returns the same default destination representation as GET without optional include expansions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Destination"
                }
              }
            }
          },
          "400": {
            "description": "Validation problem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The required permission is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Coded domain problem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Destinations"
        ],
        "summary": "Delete one destination",
        "description": "Deletes one destination by ID (UUIDv7). Set `remove_from_valid_callflows=true` to detach it from every call flow that uses it; doing so also requires call-flow delete permission.",
        "operationId": "deleteProjectDestination",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "destinationId",
            "in": "path",
            "description": "Destination ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "remove_from_valid_callflows",
            "in": "query",
            "description": "Detach the destination from call flows that use it. Requires the call-flow delete permission in addition to DestinationDelete.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Destination deleted."
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "DestinationDelete permission is required, or the call-flow delete permission when remove_from_valid_callflows is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "DestinationNotFound, or DestinationInUse when the destination is still used by a call flow.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/numbers": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Numbers"
        ],
        "summary": "List organization tracking numbers",
        "description": "Returns the complete tracking inventory under `a_num_list`, limited to projects where the caller has TrackingNumberRead permission. This organization endpoint retains its unpaginated contract; search, page_size, cursor, and page.total_count are not supported. Use include to add grouped rows and lookup catalogues for the same authorized scope. Each number uses the shared TrackingNumber representation, including public resource IDs and optional source, feature, capability, and messaging fields.",
        "operationId": "getOrgTrackingData",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `capabilities` — includes all allowed actions.\n• `capabilities.can_delete` — includes whether the tracking number can be deleted.\n• `features` — includes all configured feature flags.\n• `features.has_whisper` — includes whether a call whisper is configured.\n• `messaging` — includes all SMS capabilities.\n• `messaging.sms` — includes all SMS direction and destination capabilities.\n• `messaging.sms.domestic` — includes whether domestic SMS is supported.\n• `messaging.sms.inbound` — includes whether inbound SMS is supported.\n• `messaging.sms.international` — includes whether international SMS is supported.\n• `messaging.sms.outbound` — includes whether outbound SMS is supported.\n• `source` — includes the source ID and all dynamic-number-insertion settings.\n• `source.dni_group_id` — includes the dynamic-number-insertion group ID.\n• `source.id` — includes the tracking-source ID, which is also returned by default.\n• `source.swap_group_index` — includes the swap-group position.\n\nCollection-only expansions:\n\n• `flows` — includes call flows available for number assignment in `flows`.\n• `groups` — includes numbers arranged by dynamic-number-insertion swap group in `grouped_a_num_list`.\n• `number-formatting` — includes country and phone-formatting rules in `number_formatting`.\n• `projects` — includes the ID and name of each project the returned numbers belong to in `projects`.\n• `sources` — includes available tracking sources in the authorized scope in `tracking_sources`.\n• `swap-groups` — includes swap-group configuration in `swap_groups`.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nExample: `source.swap_group_index,features.has_whisper,groups`",
            "x-placeholder": "Example: source.swap_group_index,features.has_whisper,groups",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "capabilities",
                      "description": "includes all allowed actions."
                    },
                    {
                      "value": "capabilities.can_delete",
                      "description": "includes whether the tracking number can be deleted."
                    },
                    {
                      "value": "features",
                      "description": "includes all configured feature flags."
                    },
                    {
                      "value": "features.has_whisper",
                      "description": "includes whether a call whisper is configured."
                    },
                    {
                      "value": "messaging",
                      "description": "includes all SMS capabilities."
                    },
                    {
                      "value": "messaging.sms",
                      "description": "includes all SMS direction and destination capabilities."
                    },
                    {
                      "value": "messaging.sms.domestic",
                      "description": "includes whether domestic SMS is supported."
                    },
                    {
                      "value": "messaging.sms.inbound",
                      "description": "includes whether inbound SMS is supported."
                    },
                    {
                      "value": "messaging.sms.international",
                      "description": "includes whether international SMS is supported."
                    },
                    {
                      "value": "messaging.sms.outbound",
                      "description": "includes whether outbound SMS is supported."
                    },
                    {
                      "value": "source",
                      "description": "includes the source ID and all dynamic-number-insertion settings."
                    },
                    {
                      "value": "source.dni_group_id",
                      "description": "includes the dynamic-number-insertion group ID."
                    },
                    {
                      "value": "source.id",
                      "description": "includes the tracking-source ID, which is also returned by default."
                    },
                    {
                      "value": "source.swap_group_index",
                      "description": "includes the swap-group position."
                    }
                  ]
                },
                {
                  "title": "Collection-only expansions",
                  "options": [
                    {
                      "value": "flows",
                      "description": "includes call flows available for number assignment in `flows`."
                    },
                    {
                      "value": "groups",
                      "description": "includes numbers arranged by dynamic-number-insertion swap group in `grouped_a_num_list`."
                    },
                    {
                      "value": "number-formatting",
                      "description": "includes country and phone-formatting rules in `number_formatting`."
                    },
                    {
                      "value": "projects",
                      "description": "includes the ID and name of each project the returned numbers belong to in `projects`."
                    },
                    {
                      "value": "sources",
                      "description": "includes available tracking sources in the authorized scope in `tracking_sources`."
                    },
                    {
                      "value": "swap-groups",
                      "description": "includes swap-group configuration in `swap_groups`."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field."
              ],
              "example": "source.swap_group_index,features.has_whisper,groups"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tracking payload for the authorized organization projects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationTrackingDataResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Organization access is required. Projects without TrackingNumberRead permission are omitted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Coded domain problem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/numbers": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Numbers"
        ],
        "summary": "Get the project tracking payload",
        "description": "Returns one cursor-paginated page of tracking numbers under `items`. Follow `page.next` exactly. Use `include` to add grouped rows and the lookup catalogues needed by the tracking-management screen. Every tracking number includes both `id`, its ID (UUIDv7), and `number`, its E.164 phone number. call_flow_id and source.id reference the assigned resources by ID (UUIDv7). Features, capabilities, messaging, and source DNI settings require include. Optional search matches number names and phone numbers, ignoring common phone formatting for numeric searches. Add include=page.total_count for the matching total; no total or search filtering is applied by default. Included groups and lookup catalogues describe the complete authorized scope and are unaffected by primary-list search or pagination.",
        "operationId": "getProjectTrackingData",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `capabilities` — includes all allowed actions.\n• `capabilities.can_delete` — includes whether the tracking number can be deleted.\n• `features` — includes all configured feature flags.\n• `features.has_whisper` — includes whether a call whisper is configured.\n• `messaging` — includes all SMS capabilities.\n• `messaging.sms` — includes all SMS direction and destination capabilities.\n• `messaging.sms.domestic` — includes whether domestic SMS is supported.\n• `messaging.sms.inbound` — includes whether inbound SMS is supported.\n• `messaging.sms.international` — includes whether international SMS is supported.\n• `messaging.sms.outbound` — includes whether outbound SMS is supported.\n• `source` — includes the source ID and all dynamic-number-insertion settings.\n• `source.dni_group_id` — includes the dynamic-number-insertion group ID.\n• `source.id` — includes the tracking-source ID, which is also returned by default.\n• `source.swap_group_index` — includes the swap-group position.\n\nCollection-only expansions:\n\n• `flows` — includes call flows available for number assignment in `flows`.\n• `groups` — includes numbers arranged by dynamic-number-insertion swap group in `grouped_a_num_list`.\n• `number-formatting` — includes country and phone-formatting rules in `number_formatting`.\n• `page.total_count` — includes all authorized matching tracking numbers before pagination. Omitted by default.\n• `projects` — includes the ID and name of each project the returned numbers belong to in `projects`.\n• `sources` — includes available tracking sources in the authorized scope in `tracking_sources`.\n• `swap-groups` — includes swap-group configuration in `swap_groups`.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nExample: `source.swap_group_index,features.has_whisper,groups`",
            "x-placeholder": "Example: source.swap_group_index,features.has_whisper,groups",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "capabilities",
                      "description": "includes all allowed actions."
                    },
                    {
                      "value": "capabilities.can_delete",
                      "description": "includes whether the tracking number can be deleted."
                    },
                    {
                      "value": "features",
                      "description": "includes all configured feature flags."
                    },
                    {
                      "value": "features.has_whisper",
                      "description": "includes whether a call whisper is configured."
                    },
                    {
                      "value": "messaging",
                      "description": "includes all SMS capabilities."
                    },
                    {
                      "value": "messaging.sms",
                      "description": "includes all SMS direction and destination capabilities."
                    },
                    {
                      "value": "messaging.sms.domestic",
                      "description": "includes whether domestic SMS is supported."
                    },
                    {
                      "value": "messaging.sms.inbound",
                      "description": "includes whether inbound SMS is supported."
                    },
                    {
                      "value": "messaging.sms.international",
                      "description": "includes whether international SMS is supported."
                    },
                    {
                      "value": "messaging.sms.outbound",
                      "description": "includes whether outbound SMS is supported."
                    },
                    {
                      "value": "source",
                      "description": "includes the source ID and all dynamic-number-insertion settings."
                    },
                    {
                      "value": "source.dni_group_id",
                      "description": "includes the dynamic-number-insertion group ID."
                    },
                    {
                      "value": "source.id",
                      "description": "includes the tracking-source ID, which is also returned by default."
                    },
                    {
                      "value": "source.swap_group_index",
                      "description": "includes the swap-group position."
                    }
                  ]
                },
                {
                  "title": "Collection-only expansions",
                  "options": [
                    {
                      "value": "flows",
                      "description": "includes call flows available for number assignment in `flows`."
                    },
                    {
                      "value": "groups",
                      "description": "includes numbers arranged by dynamic-number-insertion swap group in `grouped_a_num_list`."
                    },
                    {
                      "value": "number-formatting",
                      "description": "includes country and phone-formatting rules in `number_formatting`."
                    },
                    {
                      "value": "page.total_count",
                      "description": "includes all authorized matching tracking numbers before pagination. Omitted by default."
                    },
                    {
                      "value": "projects",
                      "description": "includes the ID and name of each project the returned numbers belong to in `projects`."
                    },
                    {
                      "value": "sources",
                      "description": "includes available tracking sources in the authorized scope in `tracking_sources`."
                    },
                    {
                      "value": "swap-groups",
                      "description": "includes swap-group configuration in `swap_groups`."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field."
              ],
              "example": "source.swap_group_index,features.has_whisper,groups"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum tracking numbers to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Optional case-insensitive literal name/number substring. The term is trimmed; blank or over-200-character terms are invalid. Keep search unchanged with a cursor.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not construct or modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tracking payload for the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrackingDataResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingNumberRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Coded domain problem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid search or pagination input, or the cursor belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Numbers"
        ],
        "summary": "Remove tracking numbers",
        "description": "Bulk removal. Numbers are identified by their phone number in `numbers`.",
        "operationId": "removeProjectTrackingNumbers",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveTrackingNumbersRequest"
              }
            }
          },
          "description": "The tracking-number phone numbers to remove.",
          "required": true
        },
        "responses": {
          "204": {
            "description": "Tracking numbers removed."
          },
          "400": {
            "description": "Validation problem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingNumberDelete permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Coded domain problem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Numbers"
        ],
        "summary": "Update several tracking numbers",
        "description": "Atomically applies the supplied `changes` to every selected number. Omitted fields remain unchanged. Send at least one change; null values and unknown fields are rejected. Numbers accept digits with an optional leading +, are normalized, and duplicates count once. Any invalid, missing or out-of-project number, unavailable source, or incompatible display format rejects the entire request without changing any number. Display formatting applies only to numbers matching `country_iso`; every selected number must match.",
        "operationId": "updateProjectTrackingNumbers",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTrackingNumbersRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "All selected numbers were updated. Duplicate normalized numbers count once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateTrackingNumbersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Malformed or non-object JSON body. Returns an InvalidJsonValue validation issue.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingNumberUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must be application/json. Returns an InvalidValue validation issue pointing to the Content-Type header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "The request is invalid; no numbers were changed. Validation issues use JSON pointers such as /numbers/1 or /changes/source_id and may include a problem_code extension for the domain reason.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/numbers:move": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Numbers"
        ],
        "summary": "Move tracking numbers to another project",
        "description": "Atomically moves every selected number from the route project to target_project_id in the same organization. The caller must have TrackingNumberUpdate permission on both projects. The destination must differ from the source. Numbers accept digits with an optional leading +, are normalized, and duplicates count once. Every moved number has its source reset to OTHER (dni_source=OTHER, dni_group_id=null, swap_group=0). Any validation failure or active porting request rejects the whole move; no numbers are moved.",
        "operationId": "moveProjectTrackingNumbers",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Source project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveTrackingNumbersRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "All selected numbers were moved. Duplicate normalized numbers count once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateTrackingNumbersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Malformed or non-object JSON body (InvalidJsonValue), or an invalid, nonexistent or out-of-organization target_project_id rejected during target resolution.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingNumberUpdate permission is required on both projects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or source project not found in scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "An active porting request blocks the move. The Problem includes the affected phone numbers in numbers and per-number errors containing pointer, problem_code and number. No numbers were moved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must be application/json. Returns an InvalidValue validation issue pointing to the Content-Type header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid request, missing or out-of-project number, or destination equals the source project. No numbers were moved. Validation issues use JSON pointers such as /numbers/0 or /target_project_id and may include a problem_code extension for the domain reason.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/numbers/{trackingNumber}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Numbers"
        ],
        "summary": "Get one tracking number",
        "description": "Returns one tracking number identified by either its ID (UUIDv7) or its E.164 phone number. The response has the same shape and include rules as each number in the tracking list. The source reference is returned as source.id; names are read from the source resource.",
        "operationId": "getProjectTrackingNumber",
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `capabilities` — includes all allowed actions.\n• `capabilities.can_delete` — includes whether the tracking number can be deleted.\n• `features` — includes all configured feature flags.\n• `features.has_whisper` — includes whether a call whisper is configured.\n• `messaging` — includes all SMS capabilities.\n• `messaging.sms` — includes all SMS direction and destination capabilities.\n• `messaging.sms.domestic` — includes whether domestic SMS is supported.\n• `messaging.sms.inbound` — includes whether inbound SMS is supported.\n• `messaging.sms.international` — includes whether international SMS is supported.\n• `messaging.sms.outbound` — includes whether outbound SMS is supported.\n• `source` — includes the source ID and all dynamic-number-insertion settings.\n• `source.dni_group_id` — includes the dynamic-number-insertion group ID.\n• `source.id` — includes the tracking-source ID, which is also returned by default.\n• `source.swap_group_index` — includes the swap-group position.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nExample: `source.swap_group_index,features.has_whisper`",
            "x-placeholder": "Example: source.swap_group_index,features.has_whisper",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "capabilities",
                      "description": "includes all allowed actions."
                    },
                    {
                      "value": "capabilities.can_delete",
                      "description": "includes whether the tracking number can be deleted."
                    },
                    {
                      "value": "features",
                      "description": "includes all configured feature flags."
                    },
                    {
                      "value": "features.has_whisper",
                      "description": "includes whether a call whisper is configured."
                    },
                    {
                      "value": "messaging",
                      "description": "includes all SMS capabilities."
                    },
                    {
                      "value": "messaging.sms",
                      "description": "includes all SMS direction and destination capabilities."
                    },
                    {
                      "value": "messaging.sms.domestic",
                      "description": "includes whether domestic SMS is supported."
                    },
                    {
                      "value": "messaging.sms.inbound",
                      "description": "includes whether inbound SMS is supported."
                    },
                    {
                      "value": "messaging.sms.international",
                      "description": "includes whether international SMS is supported."
                    },
                    {
                      "value": "messaging.sms.outbound",
                      "description": "includes whether outbound SMS is supported."
                    },
                    {
                      "value": "source",
                      "description": "includes the source ID and all dynamic-number-insertion settings."
                    },
                    {
                      "value": "source.dni_group_id",
                      "description": "includes the dynamic-number-insertion group ID."
                    },
                    {
                      "value": "source.id",
                      "description": "includes the tracking-source ID, which is also returned by default."
                    },
                    {
                      "value": "source.swap_group_index",
                      "description": "includes the swap-group position."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field."
              ],
              "example": "source.swap_group_index,features.has_whisper"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "trackingNumber",
            "in": "path",
            "description": "Tracking number ID (UUIDv7), or the phone number in E.164 digits.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The tracking number.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrackingNumber"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingNumberRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "TrackingNumberNotFound when no tracking number with this identifier exists inside the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Numbers"
        ],
        "summary": "Update one tracking number",
        "description": "Updates one tracking number identified by either its ID (UUIDv7) or its E.164 phone number. The tracking number must belong to the project in the URL. Send only the fields you want to change; an omitted field is left unchanged. On success, returns the same tracking-number representation and include behavior as GET.",
        "operationId": "updateProjectTrackingNumber",
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `capabilities` — includes all allowed actions.\n• `capabilities.can_delete` — includes whether the tracking number can be deleted.\n• `features` — includes all configured feature flags.\n• `features.has_whisper` — includes whether a call whisper is configured.\n• `messaging` — includes all SMS capabilities.\n• `messaging.sms` — includes all SMS direction and destination capabilities.\n• `messaging.sms.domestic` — includes whether domestic SMS is supported.\n• `messaging.sms.inbound` — includes whether inbound SMS is supported.\n• `messaging.sms.international` — includes whether international SMS is supported.\n• `messaging.sms.outbound` — includes whether outbound SMS is supported.\n• `source` — includes the source ID and all dynamic-number-insertion settings.\n• `source.dni_group_id` — includes the dynamic-number-insertion group ID.\n• `source.id` — includes the tracking-source ID, which is also returned by default.\n• `source.swap_group_index` — includes the swap-group position.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nExample: `source.swap_group_index,features.has_whisper`",
            "x-placeholder": "Example: source.swap_group_index,features.has_whisper",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "capabilities",
                      "description": "includes all allowed actions."
                    },
                    {
                      "value": "capabilities.can_delete",
                      "description": "includes whether the tracking number can be deleted."
                    },
                    {
                      "value": "features",
                      "description": "includes all configured feature flags."
                    },
                    {
                      "value": "features.has_whisper",
                      "description": "includes whether a call whisper is configured."
                    },
                    {
                      "value": "messaging",
                      "description": "includes all SMS capabilities."
                    },
                    {
                      "value": "messaging.sms",
                      "description": "includes all SMS direction and destination capabilities."
                    },
                    {
                      "value": "messaging.sms.domestic",
                      "description": "includes whether domestic SMS is supported."
                    },
                    {
                      "value": "messaging.sms.inbound",
                      "description": "includes whether inbound SMS is supported."
                    },
                    {
                      "value": "messaging.sms.international",
                      "description": "includes whether international SMS is supported."
                    },
                    {
                      "value": "messaging.sms.outbound",
                      "description": "includes whether outbound SMS is supported."
                    },
                    {
                      "value": "source",
                      "description": "includes the source ID and all dynamic-number-insertion settings."
                    },
                    {
                      "value": "source.dni_group_id",
                      "description": "includes the dynamic-number-insertion group ID."
                    },
                    {
                      "value": "source.id",
                      "description": "includes the tracking-source ID, which is also returned by default."
                    },
                    {
                      "value": "source.swap_group_index",
                      "description": "includes the swap-group position."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field."
              ],
              "example": "source.swap_group_index,features.has_whisper"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "trackingNumber",
            "in": "path",
            "description": "Tracking number ID (UUIDv7), or the phone number.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTrackingNumberRequest"
              }
            }
          },
          "description": "The fields to change. Send at least one; omitted fields are left unchanged.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated tracking number, in the same representation as GET.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrackingNumber"
                }
              }
            }
          },
          "400": {
            "description": "Validation problem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingNumberUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Coded domain problem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Numbers"
        ],
        "summary": "Delete one tracking number",
        "description": "Deletes one tracking number identified by either its ID (UUIDv7) or its E.164 phone number. The tracking number must belong to the project in the URL.",
        "operationId": "deleteProjectTrackingNumber",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "trackingNumber",
            "in": "path",
            "description": "Tracking number ID (UUIDv7), or the phone number in E.164 digits.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Tracking number deleted."
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingNumberDelete permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "TrackingNumberNotFound, or TrackingNumberInUse when the number is still assigned to a call flow.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/tracking-sources:copy": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Sources"
        ],
        "summary": "Copy tracking sources to projects",
        "description": "Copies selected project-owned source UUIDs to target projects in this organization using the shared editor behavior. Requires TrackingSourceRead on every source and target project, plus TrackingSourceCreate on targets. Sources and targets must be accessible. Existing names are checked case-sensitively; repeating a copy can fail. Each source/target pair is attempted independently without a batch transaction or project lock. HTTP 200 may include failed targets that already received some sources. Shared creation applies generated names and parameter normalization; registered custom dependencies are copied, while unregistered conditions can be dropped. Existing target sources are not overwritten. Inspect target state before retrying an uncertain or failed batch.",
        "operationId": "copyTrackingSourcesWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tracking_source_ids",
                  "target_project_ids"
                ],
                "properties": {
                  "tracking_source_ids": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Public UUIDs of project-owned tracking sources; system defaults cannot be copied."
                  },
                  "target_project_ids": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Per-target outcomes. A failed target may contain successful copies; no created counts are returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "succeeded",
                    "failed"
                  ],
                  "properties": {
                    "succeeded": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "failed": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "code",
                          "sources"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "code": {
                            "type": "integer",
                            "description": "The problem code every failed source shares, such as TrackingSourceAlreadyAvailable when the target already has the sources; TrackingSourceCopyFailed when the reasons differ."
                          },
                          "sources": {
                            "type": "array",
                            "description": "Sources that were not copied to this target, each with its problem code.",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "code"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "code": {
                                  "type": "integer"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid source or project UUID arrays.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Missing source, system default, inaccessible project, insufficient permission or MCP scope."
          },
          "404": {
            "description": "Organization or target project not found in this organization."
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/tracking-code": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Code"
        ],
        "summary": "Get the tracking code",
        "description": "Returns the project’s tracking code: the script to embed, whether it is published, every setting, and the swap groups with their tracking numbers, plus the numbers that are in no group. Under group tracking the organization shares one script and the settings listed in `group_tracking.shared_fields`. The script tag and the script follow the organization’s white label, whichever host the request uses. Requires the TrackingCodeRead permission and the DNI plan feature.",
        "operationId": "getProjectTrackingCodeWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `activity` — adds `activity`: whether the script has been visited lately (`visit_status`), the last visit (`last_visit`) and the most recent of the last visit, form submission and install check, with its `kind` (`last_activity`).\n• `number_locations` — adds each DNI number’s area (`location`), which Geo Swap matches visitors against.\n• `project_numbers` — adds `project_numbers`: every tracking number of the project, whether or not it is in a swap group, so that a swap target can be checked against the project’s numbers.\n• `source_options` — adds `source_options`: the tracking sources `call_tracking.priority_source_ids` and `form_tracking.source_ids` accept, with their names.\n• `status` — adds `status.stale`: true when the published script is behind the project’s settings and needs a re-publish (its numbers or sources changed, or it does not report the responses of an embedded Typeform that form tracking captures). Reads the published script back.\n\nExample: `status,activity`",
            "x-placeholder": "Example: status,activity",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "activity",
                      "description": "adds `activity`: whether the script has been visited lately (`visit_status`), the last visit (`last_visit`) and the most recent of the last visit, form submission and install check, with its `kind` (`last_activity`)."
                    },
                    {
                      "value": "number_locations",
                      "description": "adds each DNI number’s area (`location`), which Geo Swap matches visitors against."
                    },
                    {
                      "value": "project_numbers",
                      "description": "adds `project_numbers`: every tracking number of the project, whether or not it is in a swap group, so that a swap target can be checked against the project’s numbers."
                    },
                    {
                      "value": "source_options",
                      "description": "adds `source_options`: the tracking sources `call_tracking.priority_source_ids` and `form_tracking.source_ids` accept, with their names."
                    },
                    {
                      "value": "status",
                      "description": "adds `status.stale`: true when the published script is behind the project’s settings and needs a re-publish (its numbers or sources changed, or it does not report the responses of an embedded Typeform that form tracking captures). Reads the published script back."
                    }
                  ]
                }
              ],
              "notes": [],
              "example": "status,activity"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tracking code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrackingCode"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingCodeRead permission is required. MCP clients also need the read scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the DNI plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Code"
        ],
        "summary": "Update and publish the tracking code",
        "description": "Saves the sent settings and publishes the script. Send only the fields to change; omitted fields stay as they are, and `null` clears a nullable field. A value the Tracking Code page saved before today’s limits (`call_tracking.cookie_days`, `call_tracking.spa_delay_seconds`, `call_tracking.page_exclusions`, `form_tracking.vendors`) is returned as saved and accepted when sent back unchanged. An empty body publishes the saved settings, so like `:publish` it is refused (code 406000207) while nothing is saved yet. Like the page’s Save, each publish starts a new visitor storage date, so visitors’ stored attribution restarts; use `:publish` to keep it.\n\n`call_tracking.swap_groups`, when sent, replaces the whole list. A tracking number listed in a group’s `tracking_number_ids` moves to that group. A number no group lists keeps its group while the list sent still has that group (a group is its position in the list), and otherwise joins the first group. So a number never placed in a group, or taken out of its group, joins the first group, and so does one whose group the list sent no longer reaches. A number the response lists in `call_tracking.unassigned_tracking_numbers` because it is stored in a group past the end of `call_tracking.swap_groups` stays in that group when the list sent is long enough to include it. Without `call_tracking.swap_groups`, no number moves and the groups are saved as `call_tracking.swap_groups` shows them, padded groups included; while the response lists numbers in `call_tracking.unassigned_tracking_numbers`, such a save is refused (code 406000209), as the page refuses to publish them, so send `call_tracking.swap_groups` to place them. Once there is more than one group, every group needs at least one tracking number and, with number swapping, targets; the first group needs targets while the project has DNI numbers. A target may not be one of the project’s DNI numbers, which replace the targets.\n\nUnder group tracking, the fields in `group_tracking.shared_fields` change for every project of the organization, as on the page. They include `call_tracking.swap_type`: the shared script swaps one way, the publishing project’s, so each publish, this one or `:publish`, gives every project of the organization that swap type. Turning form tracking off clears its page, form and source rules, as on the page. Requires the TrackingCodeUpdate permission, the DNI plan feature, and the Geo Swap plan feature to publish with `call_tracking.geo_swap` on. Under group tracking it also requires access to every project of the organization. It is refused while the organization’s subscription is not in good standing; reading and removing the script still work.",
        "operationId": "updateProjectTrackingCodeWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `activity` — adds `activity`: whether the script has been visited lately (`visit_status`), the last visit (`last_visit`) and the most recent of the last visit, form submission and install check, with its `kind` (`last_activity`).\n• `number_locations` — adds each DNI number’s area (`location`), which Geo Swap matches visitors against.\n• `project_numbers` — adds `project_numbers`: every tracking number of the project, whether or not it is in a swap group, so that a swap target can be checked against the project’s numbers.\n• `source_options` — adds `source_options`: the tracking sources `call_tracking.priority_source_ids` and `form_tracking.source_ids` accept, with their names.\n• `status` — adds `status.stale`: true when the published script is behind the project’s settings and needs a re-publish (its numbers or sources changed, or it does not report the responses of an embedded Typeform that form tracking captures). Reads the published script back.\n\nExample: `status,activity`",
            "x-placeholder": "Example: status,activity",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "activity",
                      "description": "adds `activity`: whether the script has been visited lately (`visit_status`), the last visit (`last_visit`) and the most recent of the last visit, form submission and install check, with its `kind` (`last_activity`)."
                    },
                    {
                      "value": "number_locations",
                      "description": "adds each DNI number’s area (`location`), which Geo Swap matches visitors against."
                    },
                    {
                      "value": "project_numbers",
                      "description": "adds `project_numbers`: every tracking number of the project, whether or not it is in a swap group, so that a swap target can be checked against the project’s numbers."
                    },
                    {
                      "value": "source_options",
                      "description": "adds `source_options`: the tracking sources `call_tracking.priority_source_ids` and `form_tracking.source_ids` accept, with their names."
                    },
                    {
                      "value": "status",
                      "description": "adds `status.stale`: true when the published script is behind the project’s settings and needs a re-publish (its numbers or sources changed, or it does not report the responses of an embedded Typeform that form tracking captures). Reads the published script back."
                    }
                  ]
                }
              ],
              "notes": [],
              "example": "status,activity"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTrackingCodeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved and published tracking code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrackingCode"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON, or a body that is not a JSON object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingCodeUpdate permission is required, and under group tracking access to every project of the organization (code 406000210 when that access is missing). MCP clients also need the write scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the DNI plan feature, or the Geo Swap plan feature for an update that publishes with Geo Swap on (sending `call_tracking.geo_swap: true`, or leaving it out while it is saved on), is not included in the organization’s current plan. SubscriptionNotInGoodStanding (code 4080000028) while the organization’s subscription is not in good standing. An empty body while nothing has been saved yet (code 406000207). Tracking numbers in no swap group while the body sends no `call_tracking.swap_groups` (code 406000209). Another publish of the organization’s tracking scripts is still running (code 406000208): try again shortly.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must identify JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input: an unknown field, a null or invalid value, a tracking number that is not one of the project’s DNI numbers (400000143) or is listed twice (400000144), a target that is one of the project’s DNI numbers (400000145), an empty swap group, which with more than one group has no tracking number or, with number swapping, no targets (400000146), number swapping without targets in the first group while the project has DNI numbers (400000147; for both, a saved target that has since become one of the project’s DNI numbers does not count, since the script leaves it out), or a source the field cannot use (400000148).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "429": {
            "description": "The script’s publish limit was reached: the project’s, or under group tracking the organization’s shared script’s. The limit applies to API token and MCP requests only. Wait the number of seconds in `Retry-After` before publishing again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next publish is accepted.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "description": "The script could not be published (code 4150000008). `settings_saved` says whether the changes were saved anyway; publish again with `:publish` to retry. Also returned, with no body and nothing changed, when the publish limit cannot be checked; that check applies to API token and MCP requests only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/tracking-code:publish": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Code"
        ],
        "summary": "Publish the saved tracking code again",
        "description": "Rebuilds and publishes the script from the saved settings, for example after adding tracking numbers or changing tracking sources (a new number outside every swap group must be placed first, with a `PUT` that sends `call_tracking.swap_groups`). Like the page’s Re-publish, it keeps the visitor storage date, so visitors’ stored attribution survives. No body. Requires the TrackingCodeUpdate permission and the DNI plan feature, the Geo Swap plan feature while Geo Swap is saved on, and under group tracking access to every project of the organization. It is refused while the organization’s subscription is not in good standing.",
        "operationId": "publishProjectTrackingCodeWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `activity` — adds `activity`: whether the script has been visited lately (`visit_status`), the last visit (`last_visit`) and the most recent of the last visit, form submission and install check, with its `kind` (`last_activity`).\n• `number_locations` — adds each DNI number’s area (`location`), which Geo Swap matches visitors against.\n• `project_numbers` — adds `project_numbers`: every tracking number of the project, whether or not it is in a swap group, so that a swap target can be checked against the project’s numbers.\n• `source_options` — adds `source_options`: the tracking sources `call_tracking.priority_source_ids` and `form_tracking.source_ids` accept, with their names.\n• `status` — adds `status.stale`: true when the published script is behind the project’s settings and needs a re-publish (its numbers or sources changed, or it does not report the responses of an embedded Typeform that form tracking captures). Reads the published script back.\n\nExample: `status,activity`",
            "x-placeholder": "Example: status,activity",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "activity",
                      "description": "adds `activity`: whether the script has been visited lately (`visit_status`), the last visit (`last_visit`) and the most recent of the last visit, form submission and install check, with its `kind` (`last_activity`)."
                    },
                    {
                      "value": "number_locations",
                      "description": "adds each DNI number’s area (`location`), which Geo Swap matches visitors against."
                    },
                    {
                      "value": "project_numbers",
                      "description": "adds `project_numbers`: every tracking number of the project, whether or not it is in a swap group, so that a swap target can be checked against the project’s numbers."
                    },
                    {
                      "value": "source_options",
                      "description": "adds `source_options`: the tracking sources `call_tracking.priority_source_ids` and `form_tracking.source_ids` accept, with their names."
                    },
                    {
                      "value": "status",
                      "description": "adds `status.stale`: true when the published script is behind the project’s settings and needs a re-publish (its numbers or sources changed, or it does not report the responses of an embedded Typeform that form tracking captures). Reads the published script back."
                    }
                  ]
                }
              ],
              "notes": [],
              "example": "status,activity"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published tracking code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrackingCode"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingCodeUpdate permission is required, and under group tracking access to every project of the organization (code 406000210 when that access is missing). MCP clients also need the write scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Nothing has been saved yet, or under group tracking the organization’s shared settings have not been (code 406000207): send a `PUT` first. Under group tracking the project’s own settings must be saved too, since the shared script is built from the publishing project: a project of the group that never saved its own settings gets this code until a `PUT` from it saves them (the Tracking Code page’s Save & publish). Tracking numbers are in no swap group (code 406000209; the response lists them in `call_tracking.unassigned_tracking_numbers`): place them with a `PUT` that sends `call_tracking.swap_groups`. A swap group has no numbers or targets, or number swapping has no targets in the first group while the project has DNI numbers (code 4150000009): fix the groups with a `PUT`. A saved target that has since become one of the project’s DNI numbers does not count as a target, since the script leaves it out. Or FeatureNotIncludedInCurrentPlan when the DNI plan feature, or the Geo Swap plan feature while Geo Swap is saved on, is not included in the organization’s current plan. SubscriptionNotInGoodStanding (code 4080000028) while the organization’s subscription is not in good standing. Another publish of the organization’s tracking scripts is still running (code 406000208): try again shortly.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The request has a body field, which this operation does not take (UnexpectedBodyField at its JSON pointer).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "429": {
            "description": "The script’s publish limit was reached: the project’s, or under group tracking the organization’s shared script’s. The limit applies to API token and MCP requests only. Wait the number of seconds in `Retry-After` before publishing again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next publish is accepted.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "description": "The script could not be published (code 4150000008). `settings_saved` says whether the changes were saved anyway; publish again with `:publish` to retry. Also returned, with no body and nothing changed, when the publish limit cannot be checked; that check applies to API token and MCP requests only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/tracking-code:unpublish": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Code"
        ],
        "summary": "Remove the published tracking code",
        "description": "Removes the published script from the CDN, so sites that embed it stop swapping numbers and capturing forms. The settings are kept; publish again with `PUT` or `:publish`. Does nothing when no script is published. Under group tracking this removes the script every project of the organization shares. Requires the TrackingCodeUpdate permission and the DNI plan feature, and under group tracking access to every project of the organization.",
        "operationId": "unpublishProjectTrackingCodeWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`removed` is true when a published script was removed, and false when none was published, in which case nothing changed and the request does not count toward the publish limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnpublishTrackingCodeResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingCodeUpdate permission is required, and under group tracking access to every project of the organization (code 406000210 when that access is missing). MCP clients also need the write scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the DNI plan feature is not included in the organization’s current plan. Another publish of the organization’s tracking scripts is still running (code 406000208): try again shortly.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The request has a body field, which this operation does not take (UnexpectedBodyField at its JSON pointer).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "429": {
            "description": "The script’s publish limit was reached: the project’s, or under group tracking the organization’s shared script’s. The limit applies to API token and MCP requests only. Wait the number of seconds in `Retry-After` before publishing again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next publish is accepted.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "description": "The publish limit cannot be checked, so nothing changed. That check applies to API token and MCP requests only."
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/tracking-sources": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Sources"
        ],
        "summary": "List project tracking sources",
        "description": "Returns one cursor-paginated page of tracking sources under `items`, plus `no_dni_sources`. Follow `page.next` exactly. List and detail share the same source shape. Use include=summary for tracking-number usage in this project and include=meta for the last update. Use include=parameters for parameter metadata. The optional include=configuration expansion contains the full stored configuration and requires TrackingSourceRead on the target project, even for callers admitted with TrackingNumberCreate. Session, public API and MCP clients share this route. Default output and source write behavior are unchanged.",
        "operationId": "getProjectTrackingSourcesWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all timestamps.\n• `meta.updated_at` — includes the last update timestamp.\n• `summary` — includes all usage counts for this project.\n• `summary.tracking_number_count` — includes the number of tracking numbers using the source in this project.\n\nCollection-only expansions:\n\n• `configuration` — includes the complete stored system/project source configuration, numeric mutation references, usage, custom parameters and reserved names. Requires TrackingSourceRead on this project; otherwise omitted. Independent of items pagination.\n• `parameters` — includes custom tracking parameters and reserved parameter names in `parameters` and `reserved_parameters`.\n• `parameters.usage` — with `parameters`, adds each parameter’s `workflows`: the workflows whose rules name it. Removing such a parameter is refused. Requires TrackingSourceRead on this project; otherwise omitted.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nExample: `summary.tracking_number_count,parameters`",
            "x-placeholder": "Example: summary.tracking_number_count,parameters",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp."
                    },
                    {
                      "value": "summary",
                      "description": "includes all usage counts for this project."
                    },
                    {
                      "value": "summary.tracking_number_count",
                      "description": "includes the number of tracking numbers using the source in this project."
                    }
                  ]
                },
                {
                  "title": "Collection-only expansions",
                  "options": [
                    {
                      "value": "configuration",
                      "description": "includes the complete stored system/project source configuration, numeric mutation references, usage, custom parameters and reserved names. Requires TrackingSourceRead on this project; otherwise omitted. Independent of items pagination."
                    },
                    {
                      "value": "parameters",
                      "description": "includes custom tracking parameters and reserved parameter names in `parameters` and `reserved_parameters`."
                    },
                    {
                      "value": "parameters.usage",
                      "description": "with `parameters`, adds each parameter’s `workflows`: the workflows whose rules name it. Removing such a parameter is refused. Requires TrackingSourceRead on this project; otherwise omitted."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field."
              ],
              "example": "summary.tracking_number_count,parameters"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum tracking sources to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not construct or modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Project tracking sources.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrackingSourceListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingSourceRead or TrackingNumberCreate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Sources"
        ],
        "summary": "Create a project tracking source",
        "description": "Creates a tracking source in the project and returns it with its ID (UUIDv7). Requires TrackingSourceCreate permission. A source is defined by its type plus the parameters that identify it; for generated types the server derives the name.",
        "operationId": "createProjectTrackingSourceWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTrackingSourceRequest"
              }
            }
          },
          "description": "Tracking source to create.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Tracking source created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTrackingSourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "match_syntax is not legacy or wildcard (InvalidValue, at /match_syntax); the name is longer than 45 characters (StringExceedsMaximumLength) or contains a refused character or HTML tag (NameContainsDisallowedCharacters), at /name; or, for paid, organic, social and AI sources, parameters.partners, channels or paidchannels is not letters, digits, `-` and `_` (ValueMustContainOnlyLettersDigitsDashesAndUnderscores), at /parameters/<key>.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingSourceCreate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The type is missing or invalid, the parameters are empty or invalid, the name is missing, or an identical source or name already exists in this project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body holds a field this operation does not read (UnexpectedBodyField), or a value has the wrong type, each at its JSON pointer. A body field sent in the query string is refused at its query pointer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Sources"
        ],
        "summary": "Remove tracking sources",
        "description": "Removes multiple project-owned tracking sources by ID (UUIDv7). Shared catalogue sources and sources still assigned to tracking numbers cannot be removed.",
        "operationId": "removeProjectTrackingSources",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveTrackingSourcesRequest"
              }
            }
          },
          "description": "The project-owned tracking sources to remove.",
          "required": true
        },
        "responses": {
          "204": {
            "description": "Tracking sources removed."
          },
          "400": {
            "description": "Validation problem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The required permission is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Coded domain problem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/tracking-sources/parameter": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Sources"
        ],
        "summary": "Add a custom tracking parameter",
        "description": "Adds a custom URL parameter to this project. The name is trimmed; empty and reserved names are rejected. Reserved names are returned by the tracking-sources list with include=parameters. Each successful request inserts a row, even if the name already exists. This operation is not idempotent and returns no parameter ID. Refresh the parameter list after an uncertain result before retrying.",
        "operationId": "addProjectTrackingParameter",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "description": "Organization ID (UUIDv7).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "Project ID (UUIDv7).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "param_name"
                ],
                "properties": {
                  "param_name": {
                    "type": "string",
                    "description": "Custom parameter name, the URL query key to read: letters, digits, `-` and `_` (otherwise ValueMustContainOnlyLettersDigitsDashesAndUnderscores, 400000156). The database stores up to 100 characters."
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Parameter added; no response body."
          },
          "400": {
            "description": "param_name is longer than 100 characters (StringExceedsMaximumLength) or holds a character other than letters, digits, `-` and `_` (ValueMustContainOnlyLettersDigitsDashesAndUnderscores), at /param_name.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingSourceCreate permission and the required token scope are required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The name is empty (4070000057) or reserved (4070000058).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body holds a field this operation does not read (UnexpectedBodyField), or a value has the wrong type, each at its JSON pointer. A body field sent in the query string is refused at its query pointer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/tracking-sources/{trackingSourceId}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Sources"
        ],
        "summary": "Get one tracking source",
        "description": "Returns one tracking source by ID (UUIDv7). Both project-owned sources and shared catalogue sources can be read. The response has the same shape and include rules as collection items. Matching parameters are returned as a JSON object. Use include=summary for usage in this project, and include=meta for the last update.",
        "operationId": "getProjectTrackingSource",
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all timestamps.\n• `meta.updated_at` — includes the last update timestamp.\n• `summary` — includes all usage counts for this project.\n• `summary.tracking_number_count` — includes the number of tracking numbers using the source in this project.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nExample: `summary.tracking_number_count,meta`",
            "x-placeholder": "Example: summary.tracking_number_count,meta",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp."
                    },
                    {
                      "value": "summary",
                      "description": "includes all usage counts for this project."
                    },
                    {
                      "value": "summary.tracking_number_count",
                      "description": "includes the number of tracking numbers using the source in this project."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field."
              ],
              "example": "summary.tracking_number_count,meta"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "trackingSourceId",
            "in": "path",
            "description": "Tracking source ID (UUIDv7). Resolves a project-owned source or a shared base-catalogue source.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The tracking source.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrackingSource"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingSourceRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "TrackingSourceNotFound when no source with this UUIDv7 is reachable from the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Sources"
        ],
        "summary": "Update a project tracking source",
        "description": "Updates a project-owned tracking source. Requires TrackingSourceUpdate permission. The type of an existing source cannot be changed, and a shared base-catalogue source cannot be modified.",
        "operationId": "updateProjectTrackingSourceWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "trackingSourceId",
            "in": "path",
            "description": "Tracking source ID (UUIDv7), returned as id by the tracking-source collection endpoint.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTrackingSourceRequest"
              }
            }
          },
          "description": "New tracking-source values.",
          "required": true
        },
        "responses": {
          "204": {
            "description": "Tracking source updated."
          },
          "400": {
            "description": "match_syntax is not legacy or wildcard (InvalidValue, at /match_syntax); the name is longer than 45 characters (StringExceedsMaximumLength) or contains a refused character or HTML tag (NameContainsDisallowedCharacters), at /name; or, for paid, organic, social and AI sources, parameters.partners, channels or paidchannels is not letters, digits, `-` and `_` (ValueMustContainOnlyLettersDigitsDashesAndUnderscores), at /parameters/<key>.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingSourceUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found. The body is empty; a tracking source that does not exist inside the project is reported as 409 instead."
          },
          "409": {
            "description": "No tracking source with that ID (UUIDv7) exists in this project, the source cannot be modified, its type cannot be changed, or the new parameters are empty, invalid or already in use.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body holds a field this operation does not read (UnexpectedBodyField), or a value has the wrong type, each at its JSON pointer. A body field sent in the query string is refused at its query pointer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Sources"
        ],
        "summary": "Delete one tracking source",
        "description": "Deletes one project-owned tracking source by ID (UUIDv7). A shared catalogue source or a source still assigned to a tracking number cannot be deleted.",
        "operationId": "deleteProjectTrackingSource",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "trackingSourceId",
            "in": "path",
            "description": "Tracking source ID (UUIDv7). Resolves a project-owned source or a shared base-catalogue source.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Tracking source deleted."
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingSourceDelete permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "TrackingSourceInUse when a tracking number still references the source, TrackingSourceCannotBeDeleted for a non-removable source, or TrackingSourceNotFound.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/call-flows:assign-multiple": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call Flows"
        ],
        "summary": "Assign a call flow to explicit tracking numbers",
        "description": "Uses the shared editor assignment rules. Requires TrackingNumberUpdate and the existing active-call-flow plan limit. Each number is processed separately; HTTP 200 may contain both successes and failures. Missing numbers and numbers outside this organization/project fail with TrackingNumberNotFound (4070000018). Country mismatches fail with CallFlowDestinationCountryMismatch (4070000029). There are no revision or previous-assignment preconditions. Assignment does not publish drafts: a flow with no published version (status draft) is refused with CallFlowNotPublished (406000138) before any number changes, while a published flow with pending changes can be assigned.",
        "operationId": "assignProjectCallFlowToTrackingNumbersWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "new_flow_id",
                  "tracking_nums"
                ],
                "properties": {
                  "new_flow_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Public ID of a call flow in this project."
                  },
                  "tracking_nums": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string"
                    },
                    "description": "Explicit tracking numbers in their stored digits-only form."
                  },
                  "new_flow_name": {
                    "type": "string",
                    "description": "Optional logging label; not an exact-name confirmation.",
                    "nullable": true
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Batch processed; inspect every per-number outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "succeeded",
                    "failed"
                  ],
                  "properties": {
                    "succeeded": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "failed": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "number",
                          "code"
                        ],
                        "properties": {
                          "number": {
                            "type": "string"
                          },
                          "code": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Permission, MCP scope or pricing access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Call flow not found, CallFlowNotPublished when the flow has no published version, or existing shared plan-limit conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/call-flows:unassign-multiple": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call Flows"
        ],
        "summary": "Unassign the call flow from explicit tracking numbers",
        "description": "Clears the call flow assignment of each listed number, so the number can then be deleted and its former call flow can be deleted once no number uses it. Requires TrackingNumberUpdate and remains available when the subscription is not in good standing. Each number is processed separately; HTTP 200 may contain both successes and failures. Missing numbers and numbers outside this organization/project fail with TrackingNumberNotFound (4070000018). Unassigning a number that has no call flow succeeds.",
        "operationId": "unassignProjectCallFlowFromTrackingNumbersWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tracking_nums"
                ],
                "properties": {
                  "tracking_nums": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string"
                    },
                    "description": "Explicit tracking numbers in their stored digits-only form."
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Batch processed; inspect every per-number outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "succeeded",
                    "failed"
                  ],
                  "properties": {
                    "succeeded": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "failed": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "number",
                          "code"
                        ],
                        "properties": {
                          "number": {
                            "type": "string"
                          },
                          "code": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/call-flows/settings": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call Flows"
        ],
        "summary": "Read call-flow editor settings and optional authoring choices",
        "description": "Returns the existing editor settings. The optional authoring_context adds validated definition choices without changing the base response. Media references are opaque, scoped to this project and may change between reads; pass them unchanged to configuration writes.",
        "operationId": "getProjectCallFlowSettingsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "flow_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "telephony",
                "callalerts"
              ],
              "default": "telephony"
            }
          },
          {
            "name": "flow_id",
            "in": "query",
            "description": "Optional public flow UUID within the project.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `authoring_context` — includes supported actions, verified destinations, language/voice choices, geographic options, opaque media references and authoring defaults. Requires CallFlowRead.\n\nOmitted by default. Read-only; does not create or assign flows.\n\nExample: `authoring_context`",
            "x-placeholder": "Example: authoring_context",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "authoring_context",
                      "description": "includes supported actions, verified destinations, language/voice choices, geographic options, opaque media references and authoring defaults. Requires CallFlowRead."
                    }
                  ]
                }
              ],
              "notes": [
                "Omitted by default. Read-only; does not create or assign flows."
              ],
              "example": "authoring_context"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Editor settings with optional authoring_context.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallFlowSettings"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "CallFlowRead permission and read-capable scope are required."
          },
          "404": {
            "description": "Organization, project or flow not found in the authorized scope."
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/call-flows": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call Flows"
        ],
        "summary": "List project call flows",
        "description": "Returns one cursor-paginated page of call flows using the same resource shape as the detail endpoint. Defaults to id, name, project_id and status. Draft edits take precedence over the published version. Use include for the routing tree, settings, features, capabilities, summary, meta or validation. Follow `page.next` exactly.",
        "operationId": "getProjectCallFlowsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "flow_type",
            "in": "query",
            "description": "Which family of flows to return. telephony returns inbound call routing; callalerts returns call-alert flows. Defaults to telephony.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "telephony",
                "callalerts"
              ],
              "default": "telephony"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum call flows to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not construct or modify it.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `capabilities` — includes all allowed actions.\n• `capabilities.can_delete` — includes whether the call flow can be deleted.\n• `configuration` — includes the current authoring definition, stored mutation reference, assignment details and editability. Unsupported list entries have no definition; detail reads return 422.\n• `features` — includes all call-flow feature flags.\n• `features.has_days_of_week` — includes whether weekday routing is used.\n• `features.has_dial` — includes whether a dial step is used.\n• `features.has_geo` — includes whether geographic routing is used.\n• `features.has_greeting` — includes whether a greeting is used.\n• `features.has_hangup` — includes whether a hang-up step is used.\n• `features.has_keypad` — includes whether keypad input is used.\n• `features.has_multiple` — includes whether multiple destinations are used.\n• `features.has_priority` — includes whether priority routing is used.\n• `features.has_receive_sms` — includes whether inbound SMS forwarding to a destination is enabled.\n• `features.has_round_robin` — includes whether round-robin routing is used.\n• `features.has_sticky_destinations` — includes whether sticky destinations are enabled.\n• `features.has_survey` — includes whether a survey is used.\n• `features.has_times` — includes whether time-based routing is used.\n• `features.has_voicemail` — includes whether voicemail is used.\n• `features.has_weighted` — includes whether weighted routing is used.\n• `features.has_whisper` — includes whether a call whisper is used.\n• `flow` — includes the complete call-flow routing tree.\n• `flow_steps` — includes the flat save-payload rows without changing the routing-tree flow representation.\n• `flow_type` — includes the persisted flow family.\n• `is_draft` — includes whether the selected version is a draft.\n• `meta` — includes all timestamps.\n• `meta.updated_at` — includes the last update timestamp.\n• `settings` — includes all recording, caller-ID masking, timing, and early-media settings.\n• `settings.bypass_media_enabled` — includes whether media bypass is enabled.\n• `settings.call_event_timing` — includes the call-event timing setting.\n• `settings.caller_id_masking_enabled` — includes whether caller-ID masking is enabled.\n• `settings.caller_id_masking_mode` — includes the caller-ID masking mode.\n• `settings.early_media_enabled` — includes whether early media is enabled.\n• `settings.recording` — includes all recording settings.\n• `settings.recording.enabled` — includes whether call recording is enabled.\n• `settings.recording.pause_key` — includes the recording pause key.\n• `settings.recording.stop_key` — includes the recording stop key.\n• `summary` — includes all usage counts.\n• `summary.tracking_number_count` — includes the number of active tracking numbers assigned to the call flow.\n• `validation` — includes destination compatibility results under the organization’s international-routing restrictions and destination verification.\n• `validation.has_unreachable_destinations` — includes whether any destination is incompatible with those routing restrictions.\n• `validation.has_unverified_destinations` — includes whether any destination has not been verified yet.\n• `validation.has_unverified_published_destinations` — includes whether the published version routes to an unverified destination.\n• `validation.unreachable_destinations` — includes destination numbers incompatible with those routing restrictions.\n• `validation.unverified_destinations` — includes destination numbers that have not been verified yet.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nWhen requested, the `flow` tree is returned as a whole.\n\nValidation checks routing restrictions; it does not perform a live reachability check.\n\nExample: `flow,flow_steps,flow_type,is_draft,settings.recording.enabled,summary.tracking_number_count`",
            "x-placeholder": "Example: flow,flow_steps,flow_type,is_draft,settings.recording.enabled,summary.tracking_number_count",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "capabilities",
                      "description": "includes all allowed actions."
                    },
                    {
                      "value": "capabilities.can_delete",
                      "description": "includes whether the call flow can be deleted."
                    },
                    {
                      "value": "configuration",
                      "description": "includes the current authoring definition, stored mutation reference, assignment details and editability. Unsupported list entries have no definition; detail reads return 422."
                    },
                    {
                      "value": "features",
                      "description": "includes all call-flow feature flags."
                    },
                    {
                      "value": "features.has_days_of_week",
                      "description": "includes whether weekday routing is used."
                    },
                    {
                      "value": "features.has_dial",
                      "description": "includes whether a dial step is used."
                    },
                    {
                      "value": "features.has_geo",
                      "description": "includes whether geographic routing is used."
                    },
                    {
                      "value": "features.has_greeting",
                      "description": "includes whether a greeting is used."
                    },
                    {
                      "value": "features.has_hangup",
                      "description": "includes whether a hang-up step is used."
                    },
                    {
                      "value": "features.has_keypad",
                      "description": "includes whether keypad input is used."
                    },
                    {
                      "value": "features.has_multiple",
                      "description": "includes whether multiple destinations are used."
                    },
                    {
                      "value": "features.has_priority",
                      "description": "includes whether priority routing is used."
                    },
                    {
                      "value": "features.has_receive_sms",
                      "description": "includes whether inbound SMS forwarding to a destination is enabled."
                    },
                    {
                      "value": "features.has_round_robin",
                      "description": "includes whether round-robin routing is used."
                    },
                    {
                      "value": "features.has_sticky_destinations",
                      "description": "includes whether sticky destinations are enabled."
                    },
                    {
                      "value": "features.has_survey",
                      "description": "includes whether a survey is used."
                    },
                    {
                      "value": "features.has_times",
                      "description": "includes whether time-based routing is used."
                    },
                    {
                      "value": "features.has_voicemail",
                      "description": "includes whether voicemail is used."
                    },
                    {
                      "value": "features.has_weighted",
                      "description": "includes whether weighted routing is used."
                    },
                    {
                      "value": "features.has_whisper",
                      "description": "includes whether a call whisper is used."
                    },
                    {
                      "value": "flow",
                      "description": "includes the complete call-flow routing tree."
                    },
                    {
                      "value": "flow_steps",
                      "description": "includes the flat save-payload rows without changing the routing-tree flow representation."
                    },
                    {
                      "value": "flow_type",
                      "description": "includes the persisted flow family."
                    },
                    {
                      "value": "is_draft",
                      "description": "includes whether the selected version is a draft."
                    },
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp."
                    },
                    {
                      "value": "settings",
                      "description": "includes all recording, caller-ID masking, timing, and early-media settings."
                    },
                    {
                      "value": "settings.bypass_media_enabled",
                      "description": "includes whether media bypass is enabled."
                    },
                    {
                      "value": "settings.call_event_timing",
                      "description": "includes the call-event timing setting."
                    },
                    {
                      "value": "settings.caller_id_masking_enabled",
                      "description": "includes whether caller-ID masking is enabled."
                    },
                    {
                      "value": "settings.caller_id_masking_mode",
                      "description": "includes the caller-ID masking mode."
                    },
                    {
                      "value": "settings.early_media_enabled",
                      "description": "includes whether early media is enabled."
                    },
                    {
                      "value": "settings.recording",
                      "description": "includes all recording settings."
                    },
                    {
                      "value": "settings.recording.enabled",
                      "description": "includes whether call recording is enabled."
                    },
                    {
                      "value": "settings.recording.pause_key",
                      "description": "includes the recording pause key."
                    },
                    {
                      "value": "settings.recording.stop_key",
                      "description": "includes the recording stop key."
                    },
                    {
                      "value": "summary",
                      "description": "includes all usage counts."
                    },
                    {
                      "value": "summary.tracking_number_count",
                      "description": "includes the number of active tracking numbers assigned to the call flow."
                    },
                    {
                      "value": "validation",
                      "description": "includes destination compatibility results under the organization’s international-routing restrictions and destination verification."
                    },
                    {
                      "value": "validation.has_unreachable_destinations",
                      "description": "includes whether any destination is incompatible with those routing restrictions."
                    },
                    {
                      "value": "validation.has_unverified_destinations",
                      "description": "includes whether any destination has not been verified yet."
                    },
                    {
                      "value": "validation.has_unverified_published_destinations",
                      "description": "includes whether the published version routes to an unverified destination."
                    },
                    {
                      "value": "validation.unreachable_destinations",
                      "description": "includes destination numbers incompatible with those routing restrictions."
                    },
                    {
                      "value": "validation.unverified_destinations",
                      "description": "includes destination numbers that have not been verified yet."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "When requested, the `flow` tree is returned as a whole.",
                "Validation checks routing restrictions; it does not perform a live reachability check."
              ],
              "example": "flow,flow_steps,flow_type,is_draft,settings.recording.enabled,summary.tracking_number_count"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Project call flows, including drafts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallFlowListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "CallFlowRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project, or call flow not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call Flows"
        ],
        "summary": "Create a project call flow",
        "description": "Creates a call flow. The flow is submitted as a flat list of steps, one per geo / keypad / weekday / time-window / destination combination. The response returns the submitted, persisted write shape plus its server-owned `id`, `project_id` and `status`. GET expansions are not included. A flow whose destinations are unreachable from its assigned tracking numbers is stored as a draft.",
        "operationId": "createProjectCallFlowWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveCallFlowRequest"
              }
            }
          },
          "description": "Call flow to create.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Persisted create shape: submitted call-flow fields plus server-owned resource fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallFlowWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "CallFlowCreate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project, or call flow not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when a step has receive_sms set and the outbound SMS plan feature is not included in the organization’s current plan, or when a flow that is not a draft rings a user (`user:<id>`) and the Softphone plan feature is not included.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "CallFlowDefinitionInvalid (or another call-flow problem code) when the flow cannot be saved as defined; `pointer` names the step. A step that rings a user (`user:<id>`) gets it when the user is not in the organization or, for a flow going live, cannot receive calls: they need softphone access to the project and must have opened the softphone at least once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call Flows"
        ],
        "summary": "Update a setting on several call flows",
        "description": "Updates the selected setting on multiple call flows in this project. Each `call_flows` entry contains only the flow ID (UUIDv7); the project target comes from the URL.",
        "operationId": "massUpdateProjectCallFlowSetting",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectMassUpdateCallFlowsRequest"
              }
            }
          },
          "description": "The call flows to update, the setting to change and its new value.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Per-flow outcome."
          },
          "400": {
            "description": "Validation problem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The required permission is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Coded domain problem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "delete": {
          "security": [
            {
              "Bearer": []
            }
          ],
          "tags": [
            "Call Flows"
          ],
          "summary": "Remove call flows",
          "description": "Removes multiple call flows by ID (UUIDv7). A flow that is still assigned to a tracking number cannot be removed.",
          "operationId": "removeProjectCallFlows",
          "parameters": [
            {
              "name": "orgId",
              "in": "path",
              "description": "Organization ID (UUIDv7).",
              "required": true,
              "type": "string",
              "format": "uuid"
            },
            {
              "name": "projectId",
              "in": "path",
              "description": "Project ID (UUIDv7).",
              "required": true,
              "type": "string",
              "format": "uuid"
            },
            {
              "name": "body",
              "in": "body",
              "description": "The call flows to remove.",
              "required": true,
              "schema": {
                "$ref": "#/components/schemas/RemoveCallFlowsRequest"
              }
            }
          ],
          "responses": {
            "204": {
              "description": "Call flows removed."
            },
            "400": {
              "description": "Validation problem.",
              "schema": {
                "$ref": "#/components/schemas/ValidationProblem"
              }
            },
            "401": {
              "description": "Authentication required or token expired.",
              "schema": {
                "$ref": "#/components/schemas/Problem"
              }
            },
            "403": {
              "description": "The required permission is missing.",
              "schema": {
                "$ref": "#/components/schemas/Problem"
              }
            },
            "404": {
              "description": "Organization or project not found.",
              "schema": {
                "$ref": "#/components/schemas/Problem"
              }
            },
            "409": {
              "description": "Coded domain problem.",
              "schema": {
                "$ref": "#/components/schemas/Problem"
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call Flows"
        ],
        "summary": "Remove call flows",
        "description": "Removes multiple call flows by ID (UUIDv7). A flow that is still assigned to a tracking number cannot be removed.",
        "operationId": "removeProjectCallFlows",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveCallFlowsRequest"
              }
            }
          },
          "description": "The call flows to remove.",
          "required": true
        },
        "responses": {
          "204": {
            "description": "Call flows removed."
          },
          "400": {
            "description": "Validation problem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The required permission is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Coded domain problem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/call-flows/{callFlowId}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call Flows"
        ],
        "summary": "Get a project call flow",
        "description": "Returns one call flow by ID (UUIDv7) using the same shape as a collection item. Defaults to id, name, project_id and status. Use include=flow,settings to retrieve routing and global settings. Draft edits take precedence unless action=get_latest_valid is requested. The optional configuration expansion always describes the current authoring version. Unsupported definitions return 422 when this expansion is requested on a detail read.",
        "operationId": "getProjectCallFlowWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callFlowId",
            "in": "path",
            "description": "Call flow ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "action",
            "in": "query",
            "description": "show returns the flow as stored, preferring the draft when one exists. get_latest_valid skips the draft and returns the published version.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "show",
                "get_latest_valid"
              ],
              "default": "show"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `capabilities` — includes all allowed actions.\n• `capabilities.can_delete` — includes whether the call flow can be deleted.\n• `configuration` — includes the current authoring definition, stored mutation reference, assignment details and editability. Unsupported list entries have no definition; detail reads return 422.\n• `features` — includes all call-flow feature flags.\n• `features.has_days_of_week` — includes whether weekday routing is used.\n• `features.has_dial` — includes whether a dial step is used.\n• `features.has_geo` — includes whether geographic routing is used.\n• `features.has_greeting` — includes whether a greeting is used.\n• `features.has_hangup` — includes whether a hang-up step is used.\n• `features.has_keypad` — includes whether keypad input is used.\n• `features.has_multiple` — includes whether multiple destinations are used.\n• `features.has_priority` — includes whether priority routing is used.\n• `features.has_receive_sms` — includes whether inbound SMS forwarding to a destination is enabled.\n• `features.has_round_robin` — includes whether round-robin routing is used.\n• `features.has_sticky_destinations` — includes whether sticky destinations are enabled.\n• `features.has_survey` — includes whether a survey is used.\n• `features.has_times` — includes whether time-based routing is used.\n• `features.has_voicemail` — includes whether voicemail is used.\n• `features.has_weighted` — includes whether weighted routing is used.\n• `features.has_whisper` — includes whether a call whisper is used.\n• `flow` — includes the complete call-flow routing tree.\n• `flow_steps` — includes the flat save-payload rows without changing the routing-tree flow representation.\n• `flow_type` — includes the persisted flow family.\n• `is_draft` — includes whether the selected version is a draft.\n• `meta` — includes all timestamps.\n• `meta.updated_at` — includes the last update timestamp.\n• `settings` — includes all recording, caller-ID masking, timing, and early-media settings.\n• `settings.bypass_media_enabled` — includes whether media bypass is enabled.\n• `settings.call_event_timing` — includes the call-event timing setting.\n• `settings.caller_id_masking_enabled` — includes whether caller-ID masking is enabled.\n• `settings.caller_id_masking_mode` — includes the caller-ID masking mode.\n• `settings.early_media_enabled` — includes whether early media is enabled.\n• `settings.recording` — includes all recording settings.\n• `settings.recording.enabled` — includes whether call recording is enabled.\n• `settings.recording.pause_key` — includes the recording pause key.\n• `settings.recording.stop_key` — includes the recording stop key.\n• `summary` — includes all usage counts.\n• `summary.tracking_number_count` — includes the number of active tracking numbers assigned to the call flow.\n• `validation` — includes destination compatibility results under the organization’s international-routing restrictions and destination verification.\n• `validation.has_unreachable_destinations` — includes whether any destination is incompatible with those routing restrictions.\n• `validation.has_unverified_destinations` — includes whether any destination has not been verified yet.\n• `validation.has_unverified_published_destinations` — includes whether the published version routes to an unverified destination.\n• `validation.unreachable_destinations` — includes destination numbers incompatible with those routing restrictions.\n• `validation.unverified_destinations` — includes destination numbers that have not been verified yet.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nWhen requested, the `flow` tree is returned as a whole.\n\nValidation checks routing restrictions; it does not perform a live reachability check.\n\nExample: `flow,flow_steps,flow_type,is_draft,settings.recording.enabled,summary.tracking_number_count`",
            "x-placeholder": "Example: flow,flow_steps,flow_type,is_draft,settings.recording.enabled,summary.tracking_number_count",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "capabilities",
                      "description": "includes all allowed actions."
                    },
                    {
                      "value": "capabilities.can_delete",
                      "description": "includes whether the call flow can be deleted."
                    },
                    {
                      "value": "configuration",
                      "description": "includes the current authoring definition, stored mutation reference, assignment details and editability. Unsupported list entries have no definition; detail reads return 422."
                    },
                    {
                      "value": "features",
                      "description": "includes all call-flow feature flags."
                    },
                    {
                      "value": "features.has_days_of_week",
                      "description": "includes whether weekday routing is used."
                    },
                    {
                      "value": "features.has_dial",
                      "description": "includes whether a dial step is used."
                    },
                    {
                      "value": "features.has_geo",
                      "description": "includes whether geographic routing is used."
                    },
                    {
                      "value": "features.has_greeting",
                      "description": "includes whether a greeting is used."
                    },
                    {
                      "value": "features.has_hangup",
                      "description": "includes whether a hang-up step is used."
                    },
                    {
                      "value": "features.has_keypad",
                      "description": "includes whether keypad input is used."
                    },
                    {
                      "value": "features.has_multiple",
                      "description": "includes whether multiple destinations are used."
                    },
                    {
                      "value": "features.has_priority",
                      "description": "includes whether priority routing is used."
                    },
                    {
                      "value": "features.has_receive_sms",
                      "description": "includes whether inbound SMS forwarding to a destination is enabled."
                    },
                    {
                      "value": "features.has_round_robin",
                      "description": "includes whether round-robin routing is used."
                    },
                    {
                      "value": "features.has_sticky_destinations",
                      "description": "includes whether sticky destinations are enabled."
                    },
                    {
                      "value": "features.has_survey",
                      "description": "includes whether a survey is used."
                    },
                    {
                      "value": "features.has_times",
                      "description": "includes whether time-based routing is used."
                    },
                    {
                      "value": "features.has_voicemail",
                      "description": "includes whether voicemail is used."
                    },
                    {
                      "value": "features.has_weighted",
                      "description": "includes whether weighted routing is used."
                    },
                    {
                      "value": "features.has_whisper",
                      "description": "includes whether a call whisper is used."
                    },
                    {
                      "value": "flow",
                      "description": "includes the complete call-flow routing tree."
                    },
                    {
                      "value": "flow_steps",
                      "description": "includes the flat save-payload rows without changing the routing-tree flow representation."
                    },
                    {
                      "value": "flow_type",
                      "description": "includes the persisted flow family."
                    },
                    {
                      "value": "is_draft",
                      "description": "includes whether the selected version is a draft."
                    },
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp."
                    },
                    {
                      "value": "settings",
                      "description": "includes all recording, caller-ID masking, timing, and early-media settings."
                    },
                    {
                      "value": "settings.bypass_media_enabled",
                      "description": "includes whether media bypass is enabled."
                    },
                    {
                      "value": "settings.call_event_timing",
                      "description": "includes the call-event timing setting."
                    },
                    {
                      "value": "settings.caller_id_masking_enabled",
                      "description": "includes whether caller-ID masking is enabled."
                    },
                    {
                      "value": "settings.caller_id_masking_mode",
                      "description": "includes the caller-ID masking mode."
                    },
                    {
                      "value": "settings.early_media_enabled",
                      "description": "includes whether early media is enabled."
                    },
                    {
                      "value": "settings.recording",
                      "description": "includes all recording settings."
                    },
                    {
                      "value": "settings.recording.enabled",
                      "description": "includes whether call recording is enabled."
                    },
                    {
                      "value": "settings.recording.pause_key",
                      "description": "includes the recording pause key."
                    },
                    {
                      "value": "settings.recording.stop_key",
                      "description": "includes the recording stop key."
                    },
                    {
                      "value": "summary",
                      "description": "includes all usage counts."
                    },
                    {
                      "value": "summary.tracking_number_count",
                      "description": "includes the number of active tracking numbers assigned to the call flow."
                    },
                    {
                      "value": "validation",
                      "description": "includes destination compatibility results under the organization’s international-routing restrictions and destination verification."
                    },
                    {
                      "value": "validation.has_unreachable_destinations",
                      "description": "includes whether any destination is incompatible with those routing restrictions."
                    },
                    {
                      "value": "validation.has_unverified_destinations",
                      "description": "includes whether any destination has not been verified yet."
                    },
                    {
                      "value": "validation.has_unverified_published_destinations",
                      "description": "includes whether the published version routes to an unverified destination."
                    },
                    {
                      "value": "validation.unreachable_destinations",
                      "description": "includes destination numbers incompatible with those routing restrictions."
                    },
                    {
                      "value": "validation.unverified_destinations",
                      "description": "includes destination numbers that have not been verified yet."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "When requested, the `flow` tree is returned as a whole.",
                "Validation checks routing restrictions; it does not perform a live reachability check."
              ],
              "example": "flow,flow_steps,flow_type,is_draft,settings.recording.enabled,summary.tracking_number_count"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The call flow and its step tree.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallFlow"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "CallFlowRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project, or call flow not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The requested configuration cannot represent this stored definition.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call Flows"
        ],
        "summary": "Update a project call flow",
        "description": "Replaces the whole call flow: the submitted steps become the flow in full, so send the complete list rather than a partial update. The response has the same flat write shape as POST. The ID (UUIDv7) is stable across updates.",
        "operationId": "updateProjectCallFlowWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callFlowId",
            "in": "path",
            "description": "Call flow ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveCallFlowRequest"
              }
            }
          },
          "description": "Replacement call flow.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Persisted write shape: submitted call-flow fields plus server-owned resource fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallFlowWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "CallFlowUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project, or call flow not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when a step sets receive_sms for a destination the stored call flow does not already forward to and the outbound SMS plan feature is not included in the organization’s current plan, or when a flow that is not a draft rings a user (`user:<id>`) and the Softphone plan feature is not included.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "CallFlowDefinitionInvalid (or another call-flow problem code) when the flow cannot be saved as defined; `pointer` names the step. A step that rings a user (`user:<id>`) gets it when the user is not in the organization or, for a flow going live, cannot receive calls: they need softphone access to the project and must have opened the softphone at least once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call Flows"
        ],
        "summary": "Delete one call flow",
        "description": "Deletes one call flow by ID (UUIDv7). A flow still assigned to a tracking number cannot be deleted. An unknown call flow ID returns 404.",
        "operationId": "deleteProjectCallFlow",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callFlowId",
            "in": "path",
            "description": "Call flow ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Call flow deleted."
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "CallFlowDelete permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found, or the call flow UUIDv7 does not resolve inside the project. The body is empty."
          },
          "409": {
            "description": "CallFlowInUse when the flow is still assigned to a tracking number, CallFlowNotFound, or CallFlowCouldNotBeDeleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/tags": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tags"
        ],
        "summary": "Read the project tag setup configuration",
        "description": "Returns the existing setup-page configuration with numeric tag/category references. Used as the source payload for configuration copying. Preserves shared default and historical-tag behavior; this is distinct from the paginated UUID tag-category resources.",
        "operationId": "getProjectTagSetupWebApi",
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `configuration` — includes effective tags, category UUIDs, ownership, editability and complete survey order; requires TagRead on this project.\n• `workflow_usage` — includes `workflow_usage`: for each listed tag a workflow names, the workflows that name it. Deleting such a tag is refused. Requires TagRead on this project.\n\nOmitted unless requested and authorized. Dummy responses include neither.\n\nExample: `configuration`",
            "x-placeholder": "Example: configuration",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "configuration",
                      "description": "includes effective tags, category UUIDs, ownership, editability and complete survey order; requires TagRead on this project."
                    },
                    {
                      "value": "workflow_usage",
                      "description": "includes `workflow_usage`: for each listed tag a workflow names, the workflows that name it. Deleting such a tag is refused. Requires TagRead on this project."
                    }
                  ]
                }
              ],
              "notes": [
                "Omitted unless requested and authorized. Dummy responses include neither."
              ],
              "example": "configuration"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "onlyActive",
            "in": "query",
            "required": false,
            "description": "Set true to omit inactive historical tags when preparing a copy.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tag setup configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagSetupConfiguration"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Requires TagRead, ActivityCallsRead or ActivityFormsRead. MCP requires read or write scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/tags:copy-configuration-to-brand": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tags"
        ],
        "summary": "Copy a submitted tag configuration to projects",
        "description": "Uses the existing setup-page copy behavior. Send copyOnlyNew=true to add missing tags and reactivate inactive matches while preserving existing active tag metadata. Omitted/false selects replacement and can remove target tags/categories; a target tag that any workflow of that target (active, inactive or draft) names in a rule or action stays, with its category. Custom category names match exactly; tag names match case-insensitively within the effective category. Existing ambiguous matches select an existing row. Each target commits separately; a failure can leave earlier targets copied. Default-tag copying and workflow remapping use existing shared behavior. Requires TagUpdate on the source and target projects; reading the source configuration separately requires its read permission. Success returns 204 with no counts.",
        "operationId": "copyProjectTagSetupWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CopyTagSetupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Copy completed. No counts or per-target metadata are returned."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Requires TagUpdate on source and targets; MCP requires write scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, source or target project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Missing configuration arrays or target projects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A target in brands is invalid or outside the route organization, the body holds a field this operation does not read (UnexpectedBodyField), a value has the wrong type or size, or a tag name contains `{`, `}`, `%` or an HTML tag, or a category name those or `*` (NameContainsDisallowedCharacters), each at its JSON pointer. A body field sent in the query string is refused at its query pointer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/tags:reorder": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tags"
        ],
        "summary": "Reorder project survey tags",
        "description": "Sets the complete order of active survey-eligible tags (Legacy and Call Status categories). Accepts tag UUIDv7 references or existing positive numeric tag IDs. Missing, extra, duplicate, inactive or foreign references are rejected. Requires TagUpdate; MCP also requires write scope. TagRead is not required. The existing transactional reorder copies inherited system defaults into the project when needed and remaps their order and workflow references. Returns the resulting configuration, including the new numeric IDs after copying defaults. Does not rename, move or delete tags. The existing bulk tag-save operation is unchanged.",
        "operationId": "reorderProjectTagsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderSurveyTagsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Resulting tag configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagConfigurationSnapshot"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, empty list, malformed or repeated references, or unknown fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TagUpdate permission and, for MCP, write scope are required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "InvalidSurveyTagOrder: references must identify every eligible tag exactly once, including when UUID and numeric aliases are mixed. The problem message names the missing tags and counts the other or repeated references.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/tag-categories": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tag Categories"
        ],
        "summary": "List project tag categories",
        "description": "Returns one cursor-paginated page of tag categories visible to the project — shared defaults plus categories the project owns. Each `id` uses the UUIDv7 format.",
        "operationId": "getProjectTagCategoriesWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum tag categories to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tag-category list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagCategoryListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TagRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Creates a tag category owned by the project. Category names are unique within a project, and `default` is reserved for the shared set, so either is refused as a conflict. Requires TagUpdate permission.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tag Categories"
        ],
        "summary": "Create a project tag category",
        "operationId": "createProjectTagCategoryWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/WriteTagCategoryRequest"
        },
        "responses": {
          "201": {
            "description": "Tag category created. Location contains its Web API URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagCategory"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TagUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "A category with the same name exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/tag-categories/{tagCategoryId}": {
      "get": {
        "description": "Returns one tag category by ID (UUIDv7). Resolves both a category the project owns and a shared default category.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tag Categories"
        ],
        "summary": "Get a project tag category",
        "operationId": "getProjectTagCategoryWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tagCategoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tag category.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagCategory"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TagRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Tag category not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "description": "Renames a tag category the project owns. A shared default category cannot be modified, and the new name must be unique within the project. Requires TagUpdate permission.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tag Categories"
        ],
        "summary": "Update a project tag category",
        "operationId": "updateProjectTagCategoryWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tagCategoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/WriteTagCategoryRequest"
        },
        "responses": {
          "200": {
            "description": "Updated tag category.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagCategory"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TagUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Category not found, duplicate, or immutable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Deletes a tag category the project owns, together with every tag inside it, in one transaction. Deleted tags are also dropped from the project tag order. A shared default category cannot be deleted. While any workflow (active, inactive or draft) names one of its tags in a rule or action, the request fails with code 406000146, `tag_ids` listing the tags in use and `workflows` listing each workflow's `id` and `name`, and nothing is deleted; remove the tags from those workflows first. Requires TagUpdate permission.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tag Categories"
        ],
        "summary": "Delete a project tag category and its tags",
        "operationId": "deleteProjectTagCategoryWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tagCategoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Tag category and its project-owned tags deleted."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TagUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Category not found or immutable, or workflows still use one of its tags (TagInUse, code 406000146, with `tag_ids` and `workflows`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/tag-categories/{tagCategoryId}/tags": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tags"
        ],
        "summary": "List tags in a project tag category",
        "description": "Returns one cursor-paginated page of tags. Project tags use shared defaults until the project materializes its own tag set. Each `id` uses the UUIDv7 format.",
        "operationId": "getProjectTagsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tagCategoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum tags to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tag list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TagRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Tag category not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Creates a tag in the given category. The first tag mutation on a project materializes a project-owned copy of every active shared default, so the new tag is checked for a name clash against that materialized set as well. Requires TagUpdate permission.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tags"
        ],
        "summary": "Create a tag in a project category",
        "operationId": "createProjectTagWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tagCategoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTagRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Tag created. Location contains its Web API URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TagUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Category not found or tag name already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/tag-categories/{tagCategoryId}/tags/{tagId}": {
      "get": {
        "description": "Returns one tag by ID (UUIDv7), scoped to the given category. Resolves both a tag the project owns and a shared default tag. `survey_dial_key` is present only when the tag is among the first ten in the project tag order.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tags"
        ],
        "summary": "Get a tag",
        "operationId": "getProjectTagWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tagCategoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tag.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TagRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Category or tag not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "description": "Updates a tag the project owns. Only the supplied fields change. A shared default tag cannot be modified, and the name must stay unique within its category. Requires TagUpdate permission.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tags"
        ],
        "summary": "Update a project-owned tag",
        "operationId": "updateProjectTagWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tagCategoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTagRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated tag.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TagUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Tag not found, duplicate, or immutable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Deletes a tag the project owns and removes it from the project tag order. A shared default tag cannot be deleted; a project-owned copy of a default can be, and it does not reappear from the shared set afterwards. While any workflow (active, inactive or draft) names the tag in a rule or action, the request fails with code 406000146, `tag_ids` and `workflows` listing each workflow's `id` and `name`; remove the tag from those workflows first. Requires TagUpdate permission.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tags"
        ],
        "summary": "Delete a project-owned tag",
        "operationId": "deleteProjectTagWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tagCategoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Tag deleted."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TagUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Tag not found or immutable, or workflows still use the tag (TagInUse, code 406000146, with `tag_ids` and `workflows`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/calls": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "List organization calls",
        "description": "Returns one cursor-paginated page of inbound and outbound calls across the organization’s projects, in reverse chronological order. Follow `page.next` exactly because it preserves every active filter and carries the opaque cursor. Call rows include `org_id`, `project_id` and `project_name`.",
        "operationId": "getOrgCallReportsWebApi",
        "parameters": [
          {
            "name": "filter_mode",
            "in": "query",
            "description": "Strict mode excludes outbound calls when tracking_num, UTM or first_time filters are supplied, and applies the transcription filter to outbound calls. Omit to preserve existing report filtering.",
            "schema": {
              "type": "string",
              "enum": [
                "legacy",
                "strict"
              ],
              "default": "legacy"
            }
          },
          {
            "name": "call_id",
            "in": "query",
            "description": "Exact inbound or outbound call identifier. Bypasses the date window while retaining permissions and other filters. An inbound call that rang several destinations returns one row per destination, the answered one first. Missing or inaccessible calls produce an empty list or zero totals.",
            "schema": {
              "type": "string",
              "maxLength": 255,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "orig_num",
            "in": "query",
            "description": "Deprecated alias of caller_num. Accepts a plain scalar or advanced filter JSON, for example {\"operatorA\":\"contains\",\"valueA\":\"value\"}. Plain caller values match contained digits; plain UTM values match equality ignoring case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Accepts a plain scalar or advanced filter JSON, for example {\"operatorA\":\"eq\",\"valueA\":\"value\"}. Plain caller values match contained digits; plain UTM values match equality ignoring case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Accepts a plain scalar or advanced filter JSON, for example {\"operatorA\":\"eq\",\"valueA\":\"value\"}. Plain caller values match contained digits; plain UTM values match equality ignoring case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Accepts a plain scalar or advanced filter JSON, for example {\"operatorA\":\"eq\",\"valueA\":\"value\"}. Plain caller values match contained digits; plain UTM values match equality ignoring case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "call_outcome",
            "in": "query",
            "description": "Restricts calls to the selected outcomes.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ANSWERED",
                  "NOT_ANSWERED",
                  "ANSWERED_OR_VM"
                ]
              }
            }
          },
          {
            "name": "tracking_num",
            "in": "query",
            "description": "Restricts inbound calls to the selected tracking numbers. In strict mode, excludes outbound calls.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "recording",
            "in": "query",
            "description": "Filters calls by stored recording presence.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "description": "Filters inbound calls by first-time caller status. In strict mode, excludes outbound calls.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "description": "Stored transcription presence. With filter_mode=strict this also filters outbound calls.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "project_ids",
            "in": "query",
            "required": false,
            "description": "Project IDs (UUIDv7) to restrict the page to, as returned by GET /orgs/{orgId}/projects, as one value or comma-separated. Any other ID form is rejected with 422. Omit to include every project in the organization.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "required": false,
            "description": "First day of the reporting window, YYYY-MM-DD, read as dates in the project's time zone (the organization's for an organization-wide request).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "required": false,
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "required": false,
            "description": "Restrict the page to inbound calls, outbound calls, or both. Allowed values: `inbound`, `outbound`, as one value or comma-separated (`inbound,outbound`). Omit to include both.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "inbound",
                  "outbound"
                ]
              }
            }
          },
          {
            "name": "caller_num",
            "in": "query",
            "required": false,
            "description": "Returns calls whose caller number contains this value. Send digits, optionally with a leading `+`, or an advanced filter JSON object. Takes precedence over the deprecated orig_num alias.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum calls to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `recording_url` — adds `recording_url`, a link to each inbound call’s recording or voicemail that works for 167 hours (about 7 days); null when the call has none.\n• `summary` — adds each call’s stored AI summary as `summary`, on lists too; null when the call has none.\n• `transcription` — adds stored transcription_text and outbound transcription presence when call_id is supplied; ignored on ordinary lists.\n\nUses the same ActivityCallsRead row scope. Does not generate a transcript or a summary.\n\ntranscription_text, summary and recording_url are call content: on calls of projects where the user lacks the ActivityCallsMediaRead permission they are returned empty.\n\nExample: `transcription`",
            "x-placeholder": "Example: transcription",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "recording_url",
                      "description": "adds `recording_url`, a link to each inbound call’s recording or voicemail that works for 167 hours (about 7 days); null when the call has none."
                    },
                    {
                      "value": "summary",
                      "description": "adds each call’s stored AI summary as `summary`, on lists too; null when the call has none."
                    },
                    {
                      "value": "transcription",
                      "description": "adds stored transcription_text and outbound transcription presence when call_id is supplied; ignored on ordinary lists."
                    }
                  ]
                }
              ],
              "notes": [
                "Uses the same ActivityCallsRead row scope. Does not generate a transcript or a summary.",
                "transcription_text, summary and recording_url are call content: on calls of projects where the user lacks the ActivityCallsMediaRead permission they are returned empty."
              ],
              "example": "transcription"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of organization calls.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallReportListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsRead permission is required on at least one project, and on every project in `project_ids`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A query option, project ID or pagination cursor is invalid, or the cursor belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/calls:totals": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Organization call totals",
        "description": "Returns the number of inbound and outbound calls that match the filters (`calls`) together with their summed value (`value`). This is the totals companion of GET /orgs/{orgId}/calls and shares its filters.",
        "operationId": "getOrgCallReportTotalsWebApi",
        "parameters": [
          {
            "name": "filter_mode",
            "in": "query",
            "description": "Strict mode excludes outbound calls when tracking_num, UTM or first_time filters are supplied, and applies the transcription filter to outbound calls. Omit to preserve existing report filtering.",
            "schema": {
              "type": "string",
              "enum": [
                "legacy",
                "strict"
              ],
              "default": "legacy"
            }
          },
          {
            "name": "call_id",
            "in": "query",
            "description": "Exact inbound or outbound call identifier. Bypasses the date window while retaining permissions and other filters. An inbound call that rang several destinations returns one row per destination, the answered one first. Missing or inaccessible calls produce an empty list or zero totals.",
            "schema": {
              "type": "string",
              "maxLength": 255,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "orig_num",
            "in": "query",
            "description": "Deprecated alias of caller_num. Accepts a plain scalar or advanced filter JSON, for example {\"operatorA\":\"contains\",\"valueA\":\"value\"}. Plain caller values match contained digits; plain UTM values match equality ignoring case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Accepts a plain scalar or advanced filter JSON, for example {\"operatorA\":\"eq\",\"valueA\":\"value\"}. Plain caller values match contained digits; plain UTM values match equality ignoring case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Accepts a plain scalar or advanced filter JSON, for example {\"operatorA\":\"eq\",\"valueA\":\"value\"}. Plain caller values match contained digits; plain UTM values match equality ignoring case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Accepts a plain scalar or advanced filter JSON, for example {\"operatorA\":\"eq\",\"valueA\":\"value\"}. Plain caller values match contained digits; plain UTM values match equality ignoring case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "call_outcome",
            "in": "query",
            "description": "Restricts calls to the selected outcomes.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ANSWERED",
                  "NOT_ANSWERED",
                  "ANSWERED_OR_VM"
                ]
              }
            }
          },
          {
            "name": "tracking_num",
            "in": "query",
            "description": "Restricts inbound calls to the selected tracking numbers. In strict mode, excludes outbound calls.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "recording",
            "in": "query",
            "description": "Filters calls by stored recording presence.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "description": "Filters inbound calls by first-time caller status. In strict mode, excludes outbound calls.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "description": "Stored transcription presence. With filter_mode=strict this also filters outbound calls.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "project_ids",
            "in": "query",
            "required": false,
            "description": "Project IDs (UUIDv7) to restrict the totals to, as returned by GET /orgs/{orgId}/projects, as one value or comma-separated. Any other ID form is rejected with 422. Omit to include every project in the organization.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "required": false,
            "description": "First day of the reporting window, YYYY-MM-DD, read as dates in the project's time zone (the organization's for an organization-wide request).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "required": false,
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "required": false,
            "description": "Restrict the totals to inbound calls, outbound calls, or both. Allowed values: `inbound`, `outbound`, as one value or comma-separated (`inbound,outbound`). Omit to include both.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "inbound",
                  "outbound"
                ]
              }
            }
          },
          {
            "name": "caller_num",
            "in": "query",
            "required": false,
            "description": "Returns calls whose caller number contains this value. Send digits, optionally with a leading `+`, or an advanced filter JSON object. Takes precedence over the deprecated orig_num alias.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The matching call totals: count and summed value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallReportTotalsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsRead permission is required on at least one project, and on every project in `project_ids`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A query option is invalid, or project_ids contains a value that is not a project ID (UUIDv7) in this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/calls": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "List project calls",
        "description": "Returns one cursor-paginated page of inbound and outbound calls in reverse chronological order. Follow `page.next` exactly because it preserves every active filter and carries the opaque cursor. Call rows include `org_id`, `project_id` and `project_name`.",
        "operationId": "getProjectCallReportsWebApi",
        "parameters": [
          {
            "name": "filter_mode",
            "in": "query",
            "description": "Strict mode excludes outbound calls when tracking_num, UTM or first_time filters are supplied, and applies the transcription filter to outbound calls. Omit to preserve existing report filtering.",
            "schema": {
              "type": "string",
              "enum": [
                "legacy",
                "strict"
              ],
              "default": "legacy"
            }
          },
          {
            "name": "call_id",
            "in": "query",
            "description": "Exact inbound or outbound call identifier. Bypasses the date window while retaining permissions and other filters. An inbound call that rang several destinations returns one row per destination, the answered one first. Missing or inaccessible calls produce an empty list or zero totals.",
            "schema": {
              "type": "string",
              "maxLength": 255,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "orig_num",
            "in": "query",
            "description": "Deprecated alias of caller_num. Accepts a plain scalar or advanced filter JSON, for example {\"operatorA\":\"contains\",\"valueA\":\"value\"}. Plain caller values match contained digits; plain UTM values match equality ignoring case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Accepts a plain scalar or advanced filter JSON, for example {\"operatorA\":\"eq\",\"valueA\":\"value\"}. Plain caller values match contained digits; plain UTM values match equality ignoring case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Accepts a plain scalar or advanced filter JSON, for example {\"operatorA\":\"eq\",\"valueA\":\"value\"}. Plain caller values match contained digits; plain UTM values match equality ignoring case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Accepts a plain scalar or advanced filter JSON, for example {\"operatorA\":\"eq\",\"valueA\":\"value\"}. Plain caller values match contained digits; plain UTM values match equality ignoring case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "call_outcome",
            "in": "query",
            "description": "Restricts calls to the selected outcomes.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ANSWERED",
                  "NOT_ANSWERED",
                  "ANSWERED_OR_VM"
                ]
              }
            }
          },
          {
            "name": "tracking_num",
            "in": "query",
            "description": "Restricts inbound calls to the selected tracking numbers. In strict mode, excludes outbound calls.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "recording",
            "in": "query",
            "description": "Filters calls by stored recording presence.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "description": "Filters inbound calls by first-time caller status. In strict mode, excludes outbound calls.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "description": "Stored transcription presence. With filter_mode=strict this also filters outbound calls.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "required": false,
            "description": "First day of the reporting window, YYYY-MM-DD, read as dates in the project's time zone (the organization's for an organization-wide request).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "required": false,
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "required": false,
            "description": "Restrict the page to inbound calls, outbound calls, or both. Allowed values: `inbound`, `outbound`, as one value or comma-separated (`inbound,outbound`). Omit to include both.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "inbound",
                  "outbound"
                ]
              }
            }
          },
          {
            "name": "caller_num",
            "in": "query",
            "required": false,
            "description": "Returns calls whose caller number contains this value. Send digits, optionally with a leading `+`, or an advanced filter JSON object. Takes precedence over the deprecated orig_num alias.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum calls to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `recording_url` — adds `recording_url`, a link to each inbound call’s recording or voicemail that works for 167 hours (about 7 days); null when the call has none.\n• `summary` — adds each call’s stored AI summary as `summary`, on lists too; null when the call has none.\n• `transcription` — adds stored transcription_text and outbound transcription presence when call_id is supplied; ignored on ordinary lists.\n\nUses the same ActivityCallsRead row scope. Does not generate a transcript or a summary.\n\ntranscription_text, summary and recording_url are call content: on calls of projects where the user lacks the ActivityCallsMediaRead permission they are returned empty.\n\nExample: `transcription`",
            "x-placeholder": "Example: transcription",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "recording_url",
                      "description": "adds `recording_url`, a link to each inbound call’s recording or voicemail that works for 167 hours (about 7 days); null when the call has none."
                    },
                    {
                      "value": "summary",
                      "description": "adds each call’s stored AI summary as `summary`, on lists too; null when the call has none."
                    },
                    {
                      "value": "transcription",
                      "description": "adds stored transcription_text and outbound transcription presence when call_id is supplied; ignored on ordinary lists."
                    }
                  ]
                }
              ],
              "notes": [
                "Uses the same ActivityCallsRead row scope. Does not generate a transcript or a summary.",
                "transcription_text, summary and recording_url are call content: on calls of projects where the user lacks the ActivityCallsMediaRead permission they are returned empty."
              ],
              "example": "transcription"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of project calls.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallReportListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid query option or cursor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/calls:totals": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Project call totals",
        "description": "Returns the number of inbound and outbound calls that match the filters (`calls`) together with their summed value (`value`). This is the totals companion of GET /orgs/{orgId}/projects/{projectId}/calls and shares its filters.",
        "operationId": "getProjectCallReportTotalsWebApi",
        "parameters": [
          {
            "name": "filter_mode",
            "in": "query",
            "description": "Strict mode excludes outbound calls when tracking_num, UTM or first_time filters are supplied, and applies the transcription filter to outbound calls. Omit to preserve existing report filtering.",
            "schema": {
              "type": "string",
              "enum": [
                "legacy",
                "strict"
              ],
              "default": "legacy"
            }
          },
          {
            "name": "call_id",
            "in": "query",
            "description": "Exact inbound or outbound call identifier. Bypasses the date window while retaining permissions and other filters. An inbound call that rang several destinations returns one row per destination, the answered one first. Missing or inaccessible calls produce an empty list or zero totals.",
            "schema": {
              "type": "string",
              "maxLength": 255,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "orig_num",
            "in": "query",
            "description": "Deprecated alias of caller_num. Accepts a plain scalar or advanced filter JSON, for example {\"operatorA\":\"contains\",\"valueA\":\"value\"}. Plain caller values match contained digits; plain UTM values match equality ignoring case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Accepts a plain scalar or advanced filter JSON, for example {\"operatorA\":\"eq\",\"valueA\":\"value\"}. Plain caller values match contained digits; plain UTM values match equality ignoring case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Accepts a plain scalar or advanced filter JSON, for example {\"operatorA\":\"eq\",\"valueA\":\"value\"}. Plain caller values match contained digits; plain UTM values match equality ignoring case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Accepts a plain scalar or advanced filter JSON, for example {\"operatorA\":\"eq\",\"valueA\":\"value\"}. Plain caller values match contained digits; plain UTM values match equality ignoring case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "call_outcome",
            "in": "query",
            "description": "Restricts calls to the selected outcomes.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ANSWERED",
                  "NOT_ANSWERED",
                  "ANSWERED_OR_VM"
                ]
              }
            }
          },
          {
            "name": "tracking_num",
            "in": "query",
            "description": "Restricts inbound calls to the selected tracking numbers. In strict mode, excludes outbound calls.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "recording",
            "in": "query",
            "description": "Filters calls by stored recording presence.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "description": "Filters inbound calls by first-time caller status. In strict mode, excludes outbound calls.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "description": "Stored transcription presence. With filter_mode=strict this also filters outbound calls.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "required": false,
            "description": "First day of the reporting window, YYYY-MM-DD, read as dates in the project's time zone (the organization's for an organization-wide request).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "required": false,
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "required": false,
            "description": "Restrict the totals to inbound calls, outbound calls, or both. Allowed values: `inbound`, `outbound`, as one value or comma-separated (`inbound,outbound`). Omit to include both.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "inbound",
                  "outbound"
                ]
              }
            }
          },
          {
            "name": "caller_num",
            "in": "query",
            "required": false,
            "description": "Returns calls whose caller number contains this value. Send digits, optionally with a leading `+`, or an advanced filter JSON object. Takes precedence over the deprecated orig_num alias.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The matching call totals: count and summed value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallReportTotalsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid query option or cursor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/calls/{callId}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "operationId": "getCallDetails",
        "summary": "Read call details",
        "description": "Returns the inbound call record and its call-flow information. Use the A-leg ID from a call report row. Without the ActivityCallsMediaRead permission on the call’s project, transcript text is returned empty and no signed recording URL is included.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID. Normally the uu_id_a value from a call report. Outbound activity and summary reads accept the outbound id with call_direction=outbound.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, when selecting a specific leg.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "call_outcome",
            "in": "query",
            "description": "Call outcome from the report row, when needed to select the call record.",
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallDetailsResponse"
                }
              }
            }
          },
          "204": {
            "description": "No activity is available, or the selected sample call has no media."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or call not found or not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The requested recording or timeline is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid or unsupported query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/calls/{callId}/summary": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "operationId": "getCallSummary",
        "summary": "Read a call summary",
        "description": "Returns the conversation and AI summary. Existing behavior is preserved: if a transcript exists but no summary is saved, this read generates and saves one. Returns an empty array when no transcript is available. For an outbound call, set call_direction=outbound and use its report-row id or switch leg ID.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID. Normally the uu_id_a value from a call report. Outbound activity and summary reads accept the outbound id with call_direction=outbound.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ],
              "default": "inbound"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallSummaryResponse"
                }
              }
            }
          },
          "204": {
            "description": "No activity is available, or the selected sample call has no media."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsRead and ActivityCallsMediaRead permissions are required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or call not found or not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The requested recording or timeline is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid or unsupported query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/leads": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Leads"
        ],
        "operationId": "listLeads",
        "summary": "List leads",
        "description": "Returns a cursor page of the project’s identified leads (with a phone number or email), most recent interaction first. Follow `page.next` until it is null. A lead is one person, merged across calls and form submissions by phone number and email; tracking data links visits and anonymous calls to it. A lead known only through a web visit is not listed, and is reachable through the `lead_id` of its call or form row. Pass a lead’s id as leadId to read it or its timeline.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Number of leads to return. Follow `page.next` to read the next page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque cursor from the previous response’s `page.next` link.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[phone]",
            "in": "query",
            "description": "Only the lead with this phone number. A national number is also read in the countries of the organization’s tracking numbers. Not combinable with filter[email].",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[email]",
            "in": "query",
            "description": "Only the lead with this email address (case-insensitive).",
            "schema": {
              "type": "string",
              "format": "email"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsRead and ActivityFormsRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or lead not found or not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid or unsupported query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/leads/{leadId}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Leads"
        ],
        "operationId": "getLead",
        "summary": "Read a lead",
        "description": "Returns one lead with its phone numbers and emails. A lead that was merged into another returns the surviving lead and its id.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "leadId",
            "in": "path",
            "required": true,
            "description": "Lead id (UUIDv7), as returned by the leads list or as `lead_id` on call and form activity rows.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsRead and ActivityFormsRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or lead not found or not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid or unsupported query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/leads/{leadId}/timeline": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Leads"
        ],
        "operationId": "getLeadTimeline",
        "summary": "Read a lead timeline",
        "description": "Returns the lead and its journey: web page visits, calls and form submissions. Form-derived lead fields, browser visits and submissions are included only with ActivityFormsRead. Each stream is paged newest first through `page.next`; omitting page_size uses the configured default.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "leadId",
            "in": "path",
            "required": true,
            "description": "Lead id (UUIDv7), as returned by the leads list or as `lead_id` on call and form activity rows.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Number of items of each timeline stream (pages, calls, forms) to return, newest first. The configured default is used when omitted. Follow `page.next` to read the next page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque cursor from the previous response’s `page.next` link.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadTimelineResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or lead not found or not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid or unsupported query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/calls/{callId}/activity": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "operationId": "getCallActivity",
        "summary": "Read call activity",
        "description": "Returns editable call activity, including comments, rating, value, tags and custom fields. For an outbound call, use its report-row id as callId and set call_direction=outbound.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID. Normally the uu_id_a value from a call report. Outbound activity and summary reads accept the outbound id with call_direction=outbound.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, when selecting a specific leg.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ],
              "default": "inbound"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallActivityResponse"
                }
              }
            }
          },
          "204": {
            "description": "No activity is available, or the selected sample call has no media."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or call not found or not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The requested recording or timeline is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid or unsupported query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Update one call",
        "description": "Deprecated: every field has its own endpoint, which changes only that field, so a field changed since the call was read is kept. Use the /calls/{callId}/tags endpoints for tags, /calls/{callId}/fields/{fieldId} for custom field values, and /calls/{callId}/rating, /value, /comments, /action_date and /name for the other fields. Still accepted until existing clients have moved. Applies the editable fields of a call: tags, rating, comments, call value, custom-property values, action date and caller name. The call is addressed by the `{callId}` path segment (`uu_id_a` for an inbound call; the outbound call id when `call_direction=outbound` is sent in the body). Send `uu_id_b` in the body to target a specific inbound leg. On success, returns the updated activity in the same representation as GET /activity.",
        "operationId": "updateCallActivityWebApi",
        "deprecated": true,
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call id: uu_id_a for an inbound call, or the outbound call id.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCallActivityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated activity in the same representation as GET /activity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallActivityResponse"
                }
              }
            }
          },
          "204": {
            "description": "Nothing was changed (for example a mutation aimed at sample data)."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The call could not be updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A tag UUIDv7 does not exist in this project or in shared defaults.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/calls/{callId}/tags": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "operationId": "addCallTags",
        "summary": "Add tags to a call",
        "description": "Adds the tags to the call and keeps the ones it has. Tags the call already has are left as they are, so repeating the request changes nothing. Concurrent changes to the same call are applied one after another, so none is lost. A change runs the call’s workflows that start on a call update, as an edit in the app does. Requires the ActivityCallsUpdate permission and a plan that includes call tagging.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID: the uu_id_a value from a call report, or the outbound call id with call_direction=outbound.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ],
              "default": "inbound"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, to tag one leg of an inbound call. Without it, the tags apply to the whole call.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CallTagIdsRequest"
        },
        "responses": {
          "200": {
            "description": "The call’s tags after the change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallTagsResponse"
                }
              }
            }
          },
          "204": {
            "description": "Nothing was changed, because the call is sample data."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or call not found or not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The organization’s plan does not include call tagging (code 4080000016, with `plan_feature_type` call_tagging), or sample data is being viewed, so a real call cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body is not JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid call address or body, or a tag that is neither this project’s nor a shared default.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "operationId": "replaceCallTags",
        "summary": "Replace a call’s tags",
        "description": "Replaces the call’s complete tag set; an empty `tag_ids` removes every tag. A change runs the call’s workflows that start on a call update, as an edit in the app does. Requires the ActivityCallsUpdate permission and a plan that includes call tagging.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID: the uu_id_a value from a call report, or the outbound call id with call_direction=outbound.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ],
              "default": "inbound"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, to tag one leg of an inbound call. Without it, the tags apply to the whole call.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CallTagIdsRequest"
        },
        "responses": {
          "200": {
            "description": "The call’s tags after the change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallTagsResponse"
                }
              }
            }
          },
          "204": {
            "description": "Nothing was changed, because the call is sample data."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or call not found or not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The organization’s plan does not include call tagging (code 4080000016, with `plan_feature_type` call_tagging), or sample data is being viewed, so a real call cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body is not JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid call address or body, or a tag that is neither this project’s nor a shared default.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/calls/{callId}/tags/{tagId}": {
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Remove a tag from a call",
        "description": "Removes one tag from the call. Removing a tag the call does not have also succeeds, so repeating the request changes nothing. A change runs the call’s workflows that start on a call update, as an edit in the app does. Requires the ActivityCallsUpdate permission and a plan that includes call tagging.",
        "operationId": "removeCallTag",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID: the uu_id_a value from a call report, or the outbound call id with call_direction=outbound.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ],
              "default": "inbound"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, to tag one leg of an inbound call. Without it, the tags apply to the whole call.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "description": "Tag ID (UUIDv7) from tag CRUD.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The call no longer has the tag."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or call was not found, or the tag is neither this project’s nor a shared default (code 4140000010).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The organization’s plan does not include call tagging (code 4080000016, with `plan_feature_type` call_tagging), or sample data is being viewed, so a real call cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid call address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/calls/{callId}/fields/{fieldId}": {
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Set a custom field value on a call",
        "description": "Sets one custom field value of the call and keeps its other values. Find the field’s `id` with GET /fields. The value must fit the field’s type: text of up to 1,000 characters, a number, a `YYYY-MM-DD` date, `true` or `false` for a boolean, or one of a list field’s option values. A `null` value, or an empty number or date, clears the value. Setting the value the call already has changes nothing. A change runs the call’s workflows that start on a call update, as an edit in the app does, so changing several fields runs them once for each field. Requires the ActivityCallsUpdate permission.",
        "operationId": "setCallCustomFieldValue",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID: the uu_id_a value from a call report, or the outbound call id with call_direction=outbound.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ],
              "default": "inbound"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, to change the value on one leg of an inbound call. Without it, the value applies to the whole call.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "description": "Custom field ID (UUIDv7), the `id` that GET /fields returns.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CustomFieldValueRequest"
        },
        "responses": {
          "200": {
            "description": "The call’s value for the field after the change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomFieldValueResponse"
                }
              }
            }
          },
          "204": {
            "description": "Nothing was changed, because the call is sample data."
          },
          "400": {
            "description": "The body is not a JSON object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or call was not found or is not accessible, or the field is not one of this project’s custom fields (code 406000080).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The field is archived, so it takes no new values (code 406000140), or sample data is being viewed, so a real call cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body is not JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid call address or body, or a value that does not fit the field’s type or options (pointed at `/value`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Clear a custom field value on a call",
        "description": "Clears one custom field value of the call and keeps its other values, including for an archived field. Clearing a value the call does not have also succeeds, so repeating the request changes nothing. A change runs the call’s workflows that start on a call update, as an edit in the app does. Requires the ActivityCallsUpdate permission.",
        "operationId": "clearCallCustomFieldValue",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID: the uu_id_a value from a call report, or the outbound call id with call_direction=outbound.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ],
              "default": "inbound"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, to change the value on one leg of an inbound call. Without it, the value applies to the whole call.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "description": "Custom field ID (UUIDv7), the `id` that GET /fields returns.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The call has no value for the field, or the call is sample data."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or call was not found or is not accessible, or the field is not one of this project’s custom fields (code 406000080).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Sample data is being viewed, so a real call cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid call address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/calls/{callId}/rating": {
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Set a call’s rating",
        "description": "Sets the call’s rating and keeps its other fields. The rating is a number from 0 to 5, kept to two decimals. A `null` or empty value clears it. Setting the value the call already has changes nothing. A change runs the call’s workflows that start on a call update, as an edit in the app does. Requires the ActivityCallsUpdate permission.",
        "operationId": "setCallRating",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID: the uu_id_a value from a call report, or the outbound call id with call_direction=outbound.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ],
              "default": "inbound"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, to change the field on one leg of an inbound call. Without it, the field applies to the whole call.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 5,
                    "description": "The rating, or `null` to clear it.",
                    "nullable": true
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The call’s rating after the change.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 5,
                      "description": "The rating now saved; `null` when it was cleared.",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "204": {
            "description": "Nothing was changed, because the call is sample data."
          },
          "400": {
            "description": "The body is not a JSON object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or call was not found or is not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Sample data is being viewed, so a real call cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body is not JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid call address or body, or a value outside these rules (pointed at `/value`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Clear a call’s rating",
        "description": "Clears the call’s rating and keeps its other fields. Clearing a rating the call does not have also succeeds, so repeating the request changes nothing. A change runs the call’s workflows that start on a call update, as an edit in the app does. Requires the ActivityCallsUpdate permission.",
        "operationId": "clearCallRating",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID: the uu_id_a value from a call report, or the outbound call id with call_direction=outbound.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ],
              "default": "inbound"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, to change the field on one leg of an inbound call. Without it, the field applies to the whole call.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The call has no rating, or the call is sample data."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or call was not found or is not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Sample data is being viewed, so a real call cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid call address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/calls/{callId}/value": {
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Set a call’s call value",
        "description": "Sets the call’s call value and keeps its other fields. The call value is an amount in the project’s currency from 0 to 99,999,999.99, kept to two decimals. A `null` or empty value clears it. Setting the value the call already has changes nothing. A change runs the call’s workflows that start on a call update, as an edit in the app does. Requires the ActivityCallsUpdate permission.",
        "operationId": "setCallValue",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID: the uu_id_a value from a call report, or the outbound call id with call_direction=outbound.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ],
              "default": "inbound"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, to change the field on one leg of an inbound call. Without it, the field applies to the whole call.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 99999999.99,
                    "description": "The call value, or `null` to clear it.",
                    "nullable": true
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The call’s call value after the change.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 99999999.99,
                      "description": "The call value now saved; `null` when it was cleared.",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "204": {
            "description": "Nothing was changed, because the call is sample data."
          },
          "400": {
            "description": "The body is not a JSON object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or call was not found or is not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Sample data is being viewed, so a real call cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body is not JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid call address or body, or a value outside these rules (pointed at `/value`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Clear a call’s call value",
        "description": "Clears the call’s call value and keeps its other fields. Clearing a call value the call does not have also succeeds, so repeating the request changes nothing. A change runs the call’s workflows that start on a call update, as an edit in the app does. Requires the ActivityCallsUpdate permission.",
        "operationId": "clearCallValue",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID: the uu_id_a value from a call report, or the outbound call id with call_direction=outbound.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ],
              "default": "inbound"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, to change the field on one leg of an inbound call. Without it, the field applies to the whole call.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The call has no call value, or the call is sample data."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or call was not found or is not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Sample data is being viewed, so a real call cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid call address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/calls/{callId}/comments": {
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Set a call’s comments",
        "description": "Sets the call’s comments and keeps its other fields. Comments are free text of up to 65,535 characters, saved as sent. A `null` or empty value clears it. Setting the value the call already has changes nothing. A change runs the call’s workflows that start on a call update, as an edit in the app does. Requires the ActivityCallsUpdate permission.",
        "operationId": "setCallComments",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID: the uu_id_a value from a call report, or the outbound call id with call_direction=outbound.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ],
              "default": "inbound"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, to change the field on one leg of an inbound call. Without it, the field applies to the whole call.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "type": "string",
                    "maxLength": 65535,
                    "description": "The comments, or `null` to clear it.",
                    "nullable": true
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The call’s comments after the change.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "type": "string",
                      "maxLength": 65535,
                      "description": "The comments now saved; `null` when it was cleared.",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "204": {
            "description": "Nothing was changed, because the call is sample data."
          },
          "400": {
            "description": "The body is not a JSON object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or call was not found or is not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Sample data is being viewed, so a real call cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body is not JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid call address or body, or a value outside these rules (pointed at `/value`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Clear a call’s comments",
        "description": "Clears the call’s comments and keeps its other fields. Clearing a comments the call does not have also succeeds, so repeating the request changes nothing. A change runs the call’s workflows that start on a call update, as an edit in the app does. Requires the ActivityCallsUpdate permission.",
        "operationId": "clearCallComments",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID: the uu_id_a value from a call report, or the outbound call id with call_direction=outbound.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ],
              "default": "inbound"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, to change the field on one leg of an inbound call. Without it, the field applies to the whole call.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The call has no comments, or the call is sample data."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or call was not found or is not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Sample data is being viewed, so a real call cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid call address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/calls/{callId}/action_date": {
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Set a call’s follow-up date",
        "description": "Sets the call’s follow-up date and keeps its other fields. The follow-up date is a `YYYY-MM-DD` day. A `null` or empty value clears it. Setting the value the call already has changes nothing. On an outbound call a change runs the call’s workflows that start on a call update, as an edit in the app does; on an inbound call it runs none. Requires the ActivityCallsUpdate permission.",
        "operationId": "setCallActionDate",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID: the uu_id_a value from a call report, or the outbound call id with call_direction=outbound.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ],
              "default": "inbound"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, to change the field on one leg of an inbound call. Without it, the field applies to the whole call.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "type": "string",
                    "format": "date",
                    "description": "The follow-up date, or `null` to clear it.",
                    "nullable": true
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The call’s follow-up date after the change.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "type": "string",
                      "format": "date",
                      "description": "The follow-up date now saved; `null` when it was cleared.",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "204": {
            "description": "Nothing was changed, because the call is sample data."
          },
          "400": {
            "description": "The body is not a JSON object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or call was not found or is not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Sample data is being viewed, so a real call cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body is not JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid call address or body, or a value outside these rules (pointed at `/value`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Clear a call’s follow-up date",
        "description": "Clears the call’s follow-up date and keeps its other fields. Clearing a follow-up date the call does not have also succeeds, so repeating the request changes nothing. On an outbound call a change runs the call’s workflows that start on a call update, as an edit in the app does; on an inbound call it runs none. Requires the ActivityCallsUpdate permission.",
        "operationId": "clearCallActionDate",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID: the uu_id_a value from a call report, or the outbound call id with call_direction=outbound.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ],
              "default": "inbound"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, to change the field on one leg of an inbound call. Without it, the field applies to the whole call.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The call has no follow-up date, or the call is sample data."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or call was not found or is not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Sample data is being viewed, so a real call cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid call address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/calls/{callId}/name": {
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Set a call’s caller name",
        "description": "Sets the call’s caller name and keeps its other fields. The name is saved for the caller’s number across the project, so every call from that number shows it. It takes up to 100 characters, and surrounding spaces are removed. Outbound calls and calls without a caller number have no caller name. A `null` or empty value clears it. Setting the value the call already has changes nothing. It runs no workflows. Requires the ActivityCallsUpdate permission.",
        "operationId": "setCallCallerName",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID: the uu_id_a value from a call report, or the outbound call id with call_direction=outbound.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ],
              "default": "inbound"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, to change the field on one leg of an inbound call. Without it, the field applies to the whole call.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "The caller name, or `null` to clear it.",
                    "nullable": true
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The call’s caller name after the change.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "type": "string",
                      "maxLength": 100,
                      "description": "The caller name now saved; `null` when it was cleared.",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "204": {
            "description": "Nothing was changed, because the call is sample data."
          },
          "400": {
            "description": "The body is not a JSON object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or call was not found or is not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Sample data is being viewed, so a real call cannot be changed, or the call is outbound or has no caller number (code 406000196).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body is not JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid call address or body, or a value outside these rules (pointed at `/value`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Clear a call’s caller name",
        "description": "Clears the call’s caller name and keeps its other fields. Clearing a caller name the call does not have also succeeds, so repeating the request changes nothing. It runs no workflows. Requires the ActivityCallsUpdate permission.",
        "operationId": "clearCallCallerName",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID: the uu_id_a value from a call report, or the outbound call id with call_direction=outbound.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ],
              "default": "inbound"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, to change the field on one leg of an inbound call. Without it, the field applies to the whole call.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The call has no caller name, or the call is sample data."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or call was not found or is not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Sample data is being viewed, so a real call cannot be changed, or the call is outbound or has no caller number (code 406000196).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid call address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/calls/{callId}/recording": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "operationId": "getCallRecording",
        "summary": "Get a recording URL",
        "description": "Returns a signed recording URL, valid for up to 20 minutes. Use uu_id_b to select a destination leg, or vm_path from the call record to request its voicemail.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID. Normally the uu_id_a value from a call report. Outbound activity and summary reads accept the outbound id with call_direction=outbound.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "description": "Destination leg ID, when selecting a specific leg.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "tracking_num",
            "in": "query",
            "description": "Optional tracking number; must match the selected call.",
            "schema": {
              "type": "string",
              "maxLength": 25
            }
          },
          {
            "name": "vm_path",
            "in": "query",
            "description": "Voicemail path from this call’s record; must belong to the selected call.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallRecordingResponse"
                }
              }
            }
          },
          "204": {
            "description": "No activity is available, or the selected sample call has no media."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsRead and ActivityCallsMediaRead permissions are required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or call not found or not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The requested recording or timeline is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid or unsupported query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Delete a call recording",
        "description": "Deletes the recording (or voicemail) of the call addressed by the `{callId}` (A-leg id) path segment.",
        "operationId": "deleteCallRecordingWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "A-leg id of the target call.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "uu_id_b",
            "in": "query",
            "required": false,
            "description": "B-leg id, for one destination leg.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "tracking_num",
            "in": "query",
            "required": false,
            "description": "Tracking number the call arrived on; confirms the recording belongs to this call.",
            "schema": {
              "type": "string",
              "maxLength": 25
            }
          },
          {
            "name": "vm_path",
            "in": "query",
            "required": false,
            "description": "Voicemail object path, when the deletion targets a voicemail.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The recording was deleted."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsMediaRead and ActivityCallsMediaDelete permissions are required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or call not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Coded domain problem (for example the recording could not be deleted, or the target is sample data).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/calls/{callId}/transcription": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "operationId": "getCallTranscription",
        "summary": "Read a transcription",
        "description": "Returns the stored transcription using the existing JSON-encoded string format. Parse the string to obtain the transcript.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call ID. Normally the uu_id_a value from a call report. Outbound activity and summary reads accept the outbound id with call_direction=outbound.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallTranscriptionResponse"
                }
              }
            }
          },
          "204": {
            "description": "No activity is available, or the selected sample call has no media."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsRead and ActivityCallsMediaRead permissions are required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or call not found or not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The requested recording or timeline is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid or unsupported query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Calls"
        ],
        "summary": "Delete a call transcription",
        "description": "Deletes the stored transcription of the call addressed by the `{callId}` (A-leg id) path segment.",
        "operationId": "deleteCallTranscriptionWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "A-leg id of the target call.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The transcription was deleted."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityCallsMediaRead and ActivityCallsMediaDelete permissions are required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or call not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Coded domain problem (for example the recording could not be deleted, or the target is sample data).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/forms": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Forms"
        ],
        "summary": "List the tracked forms of an organization",
        "description": "Returns one cursor-paginated page of forms tracked across the organization’s projects. Each row carries its `project_id`. Follow `page.next` exactly to continue. `id` is the form’s ID (UUIDv7) and the value to pass in `form_ids` to the submissions endpoints. Submission counts, submission timestamps, and the captured or excluded fields require `include`.",
        "operationId": "getOrgTrackedFormsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "description": "Sample-data mode. Omitted or `off` returns the real forms. `on` returns fixture forms, and `auto` lets the endpoint choose based on setup eligibility. When sample data is served, `is_dummy` is true and the rows carry fixture ids.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "on",
                "off",
                "auto"
              ]
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `fields` — includes the captured field map and the excluded-field rules.\n• `fields.captured` — includes the captured fields, keyed by field name with the detected type.\n• `fields.excluded` — includes the excluded field names and wildcard rules.\n• `meta` — includes all submission timestamps in UTC.\n• `meta.first_submission_at` — includes the earliest submission timestamp.\n• `meta.last_submission_at` — includes the most recent submission timestamp.\n• `page` — includes every page attribute, adding `form_action` to the default `page` object.\n• `page.form_action` — includes the submit target of the form.\n• `summary` — includes all submission counts.\n• `summary.submission_count` — includes the number of recorded submissions.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nSummary, meta, and fields are omitted unless requested.\n\nExample: `summary.submission_count,meta,fields.excluded`",
            "x-placeholder": "Example: summary.submission_count,meta,fields.excluded",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "fields",
                      "description": "includes the captured field map and the excluded-field rules."
                    },
                    {
                      "value": "fields.captured",
                      "description": "includes the captured fields, keyed by field name with the detected type."
                    },
                    {
                      "value": "fields.excluded",
                      "description": "includes the excluded field names and wildcard rules."
                    },
                    {
                      "value": "meta",
                      "description": "includes all submission timestamps in UTC."
                    },
                    {
                      "value": "meta.first_submission_at",
                      "description": "includes the earliest submission timestamp."
                    },
                    {
                      "value": "meta.last_submission_at",
                      "description": "includes the most recent submission timestamp."
                    },
                    {
                      "value": "page",
                      "description": "includes every page attribute, adding `form_action` to the default `page` object."
                    },
                    {
                      "value": "page.form_action",
                      "description": "includes the submit target of the form."
                    },
                    {
                      "value": "summary",
                      "description": "includes all submission counts."
                    },
                    {
                      "value": "summary.submission_count",
                      "description": "includes the number of recorded submissions."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Summary, meta, and fields are omitted unless requested."
              ],
              "example": "summary.submission_count,meta,fields.excluded"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum tracked forms to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tracked forms of the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrackedFormListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "FormsRead or ActivityFormsRead permission is required on at least one project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/forms": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Forms"
        ],
        "summary": "List the tracked forms of a project",
        "description": "Returns one cursor-paginated page of forms tracked in the project. Follow `page.next` exactly to continue. `id` is the form’s ID (UUIDv7) and the value to pass in `form_ids` to the submissions endpoints. Submission counts, submission timestamps, and the captured or excluded fields require `include`.",
        "operationId": "getProjectTrackedFormsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "description": "Sample-data mode. Omitted or `off` returns the real forms. `on` returns fixture forms, and `auto` lets the endpoint choose based on setup eligibility. When sample data is served, `is_dummy` is true and the rows carry fixture ids.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "on",
                "off",
                "auto"
              ]
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `fields` — includes the captured field map and the excluded-field rules.\n• `fields.captured` — includes the captured fields, keyed by field name with the detected type.\n• `fields.excluded` — includes the excluded field names and wildcard rules.\n• `meta` — includes all submission timestamps in UTC.\n• `meta.first_submission_at` — includes the earliest submission timestamp.\n• `meta.last_submission_at` — includes the most recent submission timestamp.\n• `page` — includes every page attribute, adding `form_action` to the default `page` object.\n• `page.form_action` — includes the submit target of the form.\n• `summary` — includes all submission counts.\n• `summary.submission_count` — includes the number of recorded submissions.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nSummary, meta, and fields are omitted unless requested.\n\nExample: `summary.submission_count,meta,fields.excluded`",
            "x-placeholder": "Example: summary.submission_count,meta,fields.excluded",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "fields",
                      "description": "includes the captured field map and the excluded-field rules."
                    },
                    {
                      "value": "fields.captured",
                      "description": "includes the captured fields, keyed by field name with the detected type."
                    },
                    {
                      "value": "fields.excluded",
                      "description": "includes the excluded field names and wildcard rules."
                    },
                    {
                      "value": "meta",
                      "description": "includes all submission timestamps in UTC."
                    },
                    {
                      "value": "meta.first_submission_at",
                      "description": "includes the earliest submission timestamp."
                    },
                    {
                      "value": "meta.last_submission_at",
                      "description": "includes the most recent submission timestamp."
                    },
                    {
                      "value": "page",
                      "description": "includes every page attribute, adding `form_action` to the default `page` object."
                    },
                    {
                      "value": "page.form_action",
                      "description": "includes the submit target of the form."
                    },
                    {
                      "value": "summary",
                      "description": "includes all submission counts."
                    },
                    {
                      "value": "summary.submission_count",
                      "description": "includes the number of recorded submissions."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Summary, meta, and fields are omitted unless requested."
              ],
              "example": "summary.submission_count,meta,fields.excluded"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum tracked forms to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tracked forms of the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrackedFormListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "FormsRead or ActivityFormsRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/form-submissions": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Form submissions"
        ],
        "summary": "List organization form submissions",
        "description": "Returns one cursor-paginated page of submissions. `form_ids` selects the forms: omit it to read every form across the organization’s projects, name one form to get that form’s own field columns, or name several to get the shared Form column. Add `include=headers` for the column descriptors that describe the rows. Follow `page.next` exactly to read the next page. `date_range[start_date]` and `date_range[end_date]` bracket the reporting window in the organization time zone.",
        "operationId": "getOrgFormSubmissionsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "form_ids",
            "in": "query",
            "required": false,
            "description": "Tracked-form IDs (UUIDv7) to read, as returned by the forms list, comma-separated or repeated. Omitted: every readable form in the organization. Present but matching no readable form in the organization: an empty page. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "required": false,
            "description": "First day of the reporting window, YYYY-MM-DD. Defaults to today. The window is inclusive and is resolved in the organization time zone, so it begins at 00:00:00 local time.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "required": false,
            "description": "Last day of the reporting window, YYYY-MM-DD. Defaults to today. The window ends at 23:59:59 local time on this day.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Pins the read to the one submission with this ID and ignores `date_range`. Used by deep links.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "required": false,
            "description": "Sample-data mode. `auto` uses sample submissions only when the organization is eligible.",
            "schema": {
              "type": "string",
              "enum": [
                "on",
                "off",
                "auto"
              ]
            }
          },
          {
            "name": "filter[click_id]",
            "in": "query",
            "required": false,
            "description": "`true`: only submissions with a click id (gclid, fbclid, msclkid and similar). `false`: only submissions without one.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "filter[device][]",
            "in": "query",
            "required": false,
            "description": "One or more device categories: `D` desktop, `M` mobile, `T` tablet, `-` unknown. Unknown includes null and blank stored values.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "D",
                  "M",
                  "T",
                  "-"
                ]
              }
            }
          },
          {
            "name": "filter[tags][]",
            "in": "query",
            "required": false,
            "description": "One or more activity tag public UUIDv7 identifiers. A submission matches when it has any selected tag. Sample-data requests also accept the numeric tag identifiers returned by the sample tag-options endpoint.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "filter[source][operatorA]",
            "in": "query",
            "required": false,
            "description": "Source: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[source][valueA]",
            "in": "query",
            "required": false,
            "description": "Source: value for the first condition. Trimmed, at most 255 characters, matched case-insensitively. An empty column counts as an empty string, so `neq` and `ncontains` include submissions where it is empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[source][join]",
            "in": "query",
            "required": false,
            "description": "Source: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[source][operatorB]",
            "in": "query",
            "required": false,
            "description": "Source: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[source][valueB]",
            "in": "query",
            "required": false,
            "description": "Source: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[medium][operatorA]",
            "in": "query",
            "required": false,
            "description": "Medium: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[medium][valueA]",
            "in": "query",
            "required": false,
            "description": "Medium: value for the first condition. Trimmed, at most 255 characters, matched case-insensitively. An empty column counts as an empty string, so `neq` and `ncontains` include submissions where it is empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[medium][join]",
            "in": "query",
            "required": false,
            "description": "Medium: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[medium][operatorB]",
            "in": "query",
            "required": false,
            "description": "Medium: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[medium][valueB]",
            "in": "query",
            "required": false,
            "description": "Medium: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[campaign][operatorA]",
            "in": "query",
            "required": false,
            "description": "Campaign: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[campaign][valueA]",
            "in": "query",
            "required": false,
            "description": "Campaign: value for the first condition. Trimmed, at most 255 characters, matched case-insensitively. An empty column counts as an empty string, so `neq` and `ncontains` include submissions where it is empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[campaign][join]",
            "in": "query",
            "required": false,
            "description": "Campaign: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[campaign][operatorB]",
            "in": "query",
            "required": false,
            "description": "Campaign: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[campaign][valueB]",
            "in": "query",
            "required": false,
            "description": "Campaign: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[landing][operatorA]",
            "in": "query",
            "required": false,
            "description": "Landing page: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[landing][valueA]",
            "in": "query",
            "required": false,
            "description": "Landing page: value for the first condition. Trimmed, at most 255 characters, matched case-insensitively. An empty column counts as an empty string, so `neq` and `ncontains` include submissions where it is empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[landing][join]",
            "in": "query",
            "required": false,
            "description": "Landing page: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[landing][operatorB]",
            "in": "query",
            "required": false,
            "description": "Landing page: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[landing][valueB]",
            "in": "query",
            "required": false,
            "description": "Landing page: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[value][operatorA]",
            "in": "query",
            "required": false,
            "description": "Value: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "lt",
                "lteq",
                "gt",
                "gteq",
                "btwn"
              ],
              "default": "eq"
            }
          },
          {
            "name": "filter[value][valueA]",
            "in": "query",
            "required": false,
            "description": "Value: value for the first condition. A number between -99999.99 and 99999.99; an empty value counts as 0. With `btwn`, valueA and valueB are the inclusive bounds and the second condition does not apply.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[value][join]",
            "in": "query",
            "required": false,
            "description": "Value: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[value][operatorB]",
            "in": "query",
            "required": false,
            "description": "Value: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "lt",
                "lteq",
                "gt",
                "gteq",
                "btwn"
              ],
              "default": "eq"
            }
          },
          {
            "name": "filter[value][valueB]",
            "in": "query",
            "required": false,
            "description": "Value: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[cpf_*]",
            "in": "query",
            "required": false,
            "description": "A filter on a custom field, keyed by the field `key` (cpf_...) from the project custom fields list, `GET /orgs/{orgId}/projects/{projectId}/fields` (for example `filter[cpf_stage][]=hot`); at most 20 custom field filters. Send one value or a list of at most 100 (`filter[cpf_stage][]=hot&filter[cpf_stage][]=cold`) to match submissions holding any of them, compared exactly as stored (case-sensitive, list option values rather than labels); `not_set` matches submissions without a value, and boolean fields take `true` or `false`. Text, number and date fields also take a condition in the same shape as the other condition filters (`filter[cpf_budget][operatorA]=gt&filter[cpf_budget][valueA]=100`): text compares case-insensitively with eq, neq, contains, ncontains, begins and ends; numbers and `YYYY-MM-DD` dates use eq, neq, lt, lteq, gt, gteq and btwn (inclusive bounds in valueA and valueB). Values are trimmed and at most 255 characters. An operator or value that does not fit the field type matches no submissions; a key that is not a custom field of the projects read is compared as text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `headers` — includes the column descriptors for the returned rows, in display order. The forms UI renders its table from them.\n\nHeaders are omitted unless requested.\n\nExample: `headers`",
            "x-placeholder": "Example: headers",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "headers",
                      "description": "includes the column descriptors for the returned rows, in display order. The forms UI renders its table from them."
                    }
                  ]
                }
              ],
              "notes": [
                "Headers are omitted unless requested."
              ],
              "example": "headers"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum submissions to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not construct or modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Submissions and their headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormSubmissionsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityFormsRead permission is required on at least one project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A `filter` value is invalid (unknown key, operator, join, boolean, or a value out of range), or the pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/form-submissions": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Form submissions"
        ],
        "summary": "List form submissions",
        "description": "Returns one cursor-paginated page of submissions. `form_ids` selects the forms: omit it to read every form in the project, name one form to get that form’s own field columns, or name several to get the shared Form column. Add `include=headers` for the column descriptors that describe the rows. Follow `page.next` exactly to read the next page. `date_range[start_date]` and `date_range[end_date]` bracket the reporting window in the project time zone.",
        "operationId": "getProjectFormSubmissionsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "form_ids",
            "in": "query",
            "required": false,
            "description": "Tracked-form IDs (UUIDv7) to read, as returned by the forms list, comma-separated or repeated. Omitted: every form in the project. Present but matching no form in the project: an empty page. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "required": false,
            "description": "First day of the reporting window, YYYY-MM-DD. Defaults to today. The window is inclusive and is resolved in the project time zone, so it begins at 00:00:00 local time.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "required": false,
            "description": "Last day of the reporting window, YYYY-MM-DD. Defaults to today. The window ends at 23:59:59 local time on this day.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Pins the read to the one submission with this ID and ignores `date_range`. Used by deep links.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "required": false,
            "description": "Sample-data mode. `auto` uses sample submissions only when the project is eligible.",
            "schema": {
              "type": "string",
              "enum": [
                "on",
                "off",
                "auto"
              ]
            }
          },
          {
            "name": "filter[click_id]",
            "in": "query",
            "required": false,
            "description": "`true`: only submissions with a click id (gclid, fbclid, msclkid and similar). `false`: only submissions without one.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "filter[device][]",
            "in": "query",
            "required": false,
            "description": "One or more device categories: `D` desktop, `M` mobile, `T` tablet, `-` unknown. Unknown includes null and blank stored values.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "D",
                  "M",
                  "T",
                  "-"
                ]
              }
            }
          },
          {
            "name": "filter[tags][]",
            "in": "query",
            "required": false,
            "description": "One or more activity tag public UUIDv7 identifiers. A submission matches when it has any selected tag. Sample-data requests also accept the numeric tag identifiers returned by the sample tag-options endpoint.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "filter[source][operatorA]",
            "in": "query",
            "required": false,
            "description": "Source: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[source][valueA]",
            "in": "query",
            "required": false,
            "description": "Source: value for the first condition. Trimmed, at most 255 characters, matched case-insensitively. An empty column counts as an empty string, so `neq` and `ncontains` include submissions where it is empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[source][join]",
            "in": "query",
            "required": false,
            "description": "Source: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[source][operatorB]",
            "in": "query",
            "required": false,
            "description": "Source: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[source][valueB]",
            "in": "query",
            "required": false,
            "description": "Source: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[medium][operatorA]",
            "in": "query",
            "required": false,
            "description": "Medium: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[medium][valueA]",
            "in": "query",
            "required": false,
            "description": "Medium: value for the first condition. Trimmed, at most 255 characters, matched case-insensitively. An empty column counts as an empty string, so `neq` and `ncontains` include submissions where it is empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[medium][join]",
            "in": "query",
            "required": false,
            "description": "Medium: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[medium][operatorB]",
            "in": "query",
            "required": false,
            "description": "Medium: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[medium][valueB]",
            "in": "query",
            "required": false,
            "description": "Medium: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[campaign][operatorA]",
            "in": "query",
            "required": false,
            "description": "Campaign: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[campaign][valueA]",
            "in": "query",
            "required": false,
            "description": "Campaign: value for the first condition. Trimmed, at most 255 characters, matched case-insensitively. An empty column counts as an empty string, so `neq` and `ncontains` include submissions where it is empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[campaign][join]",
            "in": "query",
            "required": false,
            "description": "Campaign: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[campaign][operatorB]",
            "in": "query",
            "required": false,
            "description": "Campaign: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[campaign][valueB]",
            "in": "query",
            "required": false,
            "description": "Campaign: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[landing][operatorA]",
            "in": "query",
            "required": false,
            "description": "Landing page: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[landing][valueA]",
            "in": "query",
            "required": false,
            "description": "Landing page: value for the first condition. Trimmed, at most 255 characters, matched case-insensitively. An empty column counts as an empty string, so `neq` and `ncontains` include submissions where it is empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[landing][join]",
            "in": "query",
            "required": false,
            "description": "Landing page: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[landing][operatorB]",
            "in": "query",
            "required": false,
            "description": "Landing page: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[landing][valueB]",
            "in": "query",
            "required": false,
            "description": "Landing page: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[value][operatorA]",
            "in": "query",
            "required": false,
            "description": "Value: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "lt",
                "lteq",
                "gt",
                "gteq",
                "btwn"
              ],
              "default": "eq"
            }
          },
          {
            "name": "filter[value][valueA]",
            "in": "query",
            "required": false,
            "description": "Value: value for the first condition. A number between -99999.99 and 99999.99; an empty value counts as 0. With `btwn`, valueA and valueB are the inclusive bounds and the second condition does not apply.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[value][join]",
            "in": "query",
            "required": false,
            "description": "Value: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[value][operatorB]",
            "in": "query",
            "required": false,
            "description": "Value: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "lt",
                "lteq",
                "gt",
                "gteq",
                "btwn"
              ],
              "default": "eq"
            }
          },
          {
            "name": "filter[value][valueB]",
            "in": "query",
            "required": false,
            "description": "Value: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[cpf_*]",
            "in": "query",
            "required": false,
            "description": "A filter on a custom field, keyed by the field `key` (cpf_...) from the project custom fields list, `GET /orgs/{orgId}/projects/{projectId}/fields` (for example `filter[cpf_stage][]=hot`); at most 20 custom field filters. Send one value or a list of at most 100 (`filter[cpf_stage][]=hot&filter[cpf_stage][]=cold`) to match submissions holding any of them, compared exactly as stored (case-sensitive, list option values rather than labels); `not_set` matches submissions without a value, and boolean fields take `true` or `false`. Text, number and date fields also take a condition in the same shape as the other condition filters (`filter[cpf_budget][operatorA]=gt&filter[cpf_budget][valueA]=100`): text compares case-insensitively with eq, neq, contains, ncontains, begins and ends; numbers and `YYYY-MM-DD` dates use eq, neq, lt, lteq, gt, gteq and btwn (inclusive bounds in valueA and valueB). Values are trimmed and at most 255 characters. An operator or value that does not fit the field type matches no submissions; a key that is not a custom field of the projects read is compared as text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `headers` — includes the column descriptors for the returned rows, in display order. The forms UI renders its table from them.\n\nHeaders are omitted unless requested.\n\nExample: `headers`",
            "x-placeholder": "Example: headers",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "headers",
                      "description": "includes the column descriptors for the returned rows, in display order. The forms UI renders its table from them."
                    }
                  ]
                }
              ],
              "notes": [
                "Headers are omitted unless requested."
              ],
              "example": "headers"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum submissions to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not construct or modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Submissions and their headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormSubmissionsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityFormsRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A `filter` value is invalid (unknown key, operator, join, boolean, or a value out of range), or the pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/form-submissions/count": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Form submissions"
        ],
        "summary": "Count organization form submissions",
        "description": "Returns the number of submissions that GET /orgs/{orgId}/form-submissions would list for the same `form_ids`, `date_range` and `filter`. `totalRows` keeps the camelCase name the forms UI and the calls count already use.",
        "operationId": "countOrgFormSubmissionsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "form_ids",
            "in": "query",
            "required": false,
            "description": "Tracked-form IDs (UUIDv7) to count, as returned by the forms list, comma-separated or repeated. Omitted: every readable form in the organization. Present but matching no readable form in the organization: zero. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "required": false,
            "description": "First day of the reporting window, YYYY-MM-DD, resolved in the organization time zone.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "required": false,
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "required": false,
            "description": "Sample-data mode. `auto` uses sample submissions only when the organization is eligible.",
            "schema": {
              "type": "string",
              "enum": [
                "on",
                "off",
                "auto"
              ]
            }
          },
          {
            "name": "filter[click_id]",
            "in": "query",
            "required": false,
            "description": "`true`: only submissions with a click id (gclid, fbclid, msclkid and similar). `false`: only submissions without one.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "filter[device][]",
            "in": "query",
            "required": false,
            "description": "One or more device categories: `D` desktop, `M` mobile, `T` tablet, `-` unknown. Unknown includes null and blank stored values.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "D",
                  "M",
                  "T",
                  "-"
                ]
              }
            }
          },
          {
            "name": "filter[tags][]",
            "in": "query",
            "required": false,
            "description": "One or more activity tag public UUIDv7 identifiers. A submission matches when it has any selected tag. Sample-data requests also accept the numeric tag identifiers returned by the sample tag-options endpoint.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "filter[source][operatorA]",
            "in": "query",
            "required": false,
            "description": "Source: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[source][valueA]",
            "in": "query",
            "required": false,
            "description": "Source: value for the first condition. Trimmed, at most 255 characters, matched case-insensitively. An empty column counts as an empty string, so `neq` and `ncontains` include submissions where it is empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[source][join]",
            "in": "query",
            "required": false,
            "description": "Source: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[source][operatorB]",
            "in": "query",
            "required": false,
            "description": "Source: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[source][valueB]",
            "in": "query",
            "required": false,
            "description": "Source: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[medium][operatorA]",
            "in": "query",
            "required": false,
            "description": "Medium: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[medium][valueA]",
            "in": "query",
            "required": false,
            "description": "Medium: value for the first condition. Trimmed, at most 255 characters, matched case-insensitively. An empty column counts as an empty string, so `neq` and `ncontains` include submissions where it is empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[medium][join]",
            "in": "query",
            "required": false,
            "description": "Medium: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[medium][operatorB]",
            "in": "query",
            "required": false,
            "description": "Medium: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[medium][valueB]",
            "in": "query",
            "required": false,
            "description": "Medium: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[campaign][operatorA]",
            "in": "query",
            "required": false,
            "description": "Campaign: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[campaign][valueA]",
            "in": "query",
            "required": false,
            "description": "Campaign: value for the first condition. Trimmed, at most 255 characters, matched case-insensitively. An empty column counts as an empty string, so `neq` and `ncontains` include submissions where it is empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[campaign][join]",
            "in": "query",
            "required": false,
            "description": "Campaign: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[campaign][operatorB]",
            "in": "query",
            "required": false,
            "description": "Campaign: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[campaign][valueB]",
            "in": "query",
            "required": false,
            "description": "Campaign: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[landing][operatorA]",
            "in": "query",
            "required": false,
            "description": "Landing page: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[landing][valueA]",
            "in": "query",
            "required": false,
            "description": "Landing page: value for the first condition. Trimmed, at most 255 characters, matched case-insensitively. An empty column counts as an empty string, so `neq` and `ncontains` include submissions where it is empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[landing][join]",
            "in": "query",
            "required": false,
            "description": "Landing page: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[landing][operatorB]",
            "in": "query",
            "required": false,
            "description": "Landing page: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[landing][valueB]",
            "in": "query",
            "required": false,
            "description": "Landing page: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[value][operatorA]",
            "in": "query",
            "required": false,
            "description": "Value: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "lt",
                "lteq",
                "gt",
                "gteq",
                "btwn"
              ],
              "default": "eq"
            }
          },
          {
            "name": "filter[value][valueA]",
            "in": "query",
            "required": false,
            "description": "Value: value for the first condition. A number between -99999.99 and 99999.99; an empty value counts as 0. With `btwn`, valueA and valueB are the inclusive bounds and the second condition does not apply.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[value][join]",
            "in": "query",
            "required": false,
            "description": "Value: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[value][operatorB]",
            "in": "query",
            "required": false,
            "description": "Value: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "lt",
                "lteq",
                "gt",
                "gteq",
                "btwn"
              ],
              "default": "eq"
            }
          },
          {
            "name": "filter[value][valueB]",
            "in": "query",
            "required": false,
            "description": "Value: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[cpf_*]",
            "in": "query",
            "required": false,
            "description": "A filter on a custom field, keyed by the field `key` (cpf_...) from the project custom fields list, `GET /orgs/{orgId}/projects/{projectId}/fields` (for example `filter[cpf_stage][]=hot`); at most 20 custom field filters. Send one value or a list of at most 100 (`filter[cpf_stage][]=hot&filter[cpf_stage][]=cold`) to match submissions holding any of them, compared exactly as stored (case-sensitive, list option values rather than labels); `not_set` matches submissions without a value, and boolean fields take `true` or `false`. Text, number and date fields also take a condition in the same shape as the other condition filters (`filter[cpf_budget][operatorA]=gt&filter[cpf_budget][valueA]=100`): text compares case-insensitively with eq, neq, contains, ncontains, begins and ends; numbers and `YYYY-MM-DD` dates use eq, neq, lt, lteq, gt, gteq and btwn (inclusive bounds in valueA and valueB). Values are trimmed and at most 255 characters. An operator or value that does not fit the field type matches no submissions; a key that is not a custom field of the projects read is compared as text.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The matching submission count.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormSubmissionCountResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityFormsRead permission is required on at least one project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A `filter` value is invalid (unknown key, operator, join, boolean, or a value out of range).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/form-submissions/count": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Form submissions"
        ],
        "summary": "Count form submissions",
        "description": "Returns the number of submissions that GET /orgs/{orgId}/projects/{projectId}/form-submissions would list for the same `form_ids`, `date_range` and `filter`. `totalRows` keeps the camelCase name the forms UI and the calls count already use.",
        "operationId": "countProjectFormSubmissionsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "form_ids",
            "in": "query",
            "required": false,
            "description": "Tracked-form IDs (UUIDv7) to count, as returned by the forms list, comma-separated or repeated. Omitted: every form in the project. Present but matching no form in the project: zero. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "required": false,
            "description": "First day of the reporting window, YYYY-MM-DD, resolved in the project time zone.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "required": false,
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "required": false,
            "description": "Sample-data mode. `auto` uses sample submissions only when the project is eligible.",
            "schema": {
              "type": "string",
              "enum": [
                "on",
                "off",
                "auto"
              ]
            }
          },
          {
            "name": "filter[click_id]",
            "in": "query",
            "required": false,
            "description": "`true`: only submissions with a click id (gclid, fbclid, msclkid and similar). `false`: only submissions without one.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "filter[device][]",
            "in": "query",
            "required": false,
            "description": "One or more device categories: `D` desktop, `M` mobile, `T` tablet, `-` unknown. Unknown includes null and blank stored values.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "D",
                  "M",
                  "T",
                  "-"
                ]
              }
            }
          },
          {
            "name": "filter[tags][]",
            "in": "query",
            "required": false,
            "description": "One or more activity tag public UUIDv7 identifiers. A submission matches when it has any selected tag. Sample-data requests also accept the numeric tag identifiers returned by the sample tag-options endpoint.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "filter[source][operatorA]",
            "in": "query",
            "required": false,
            "description": "Source: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[source][valueA]",
            "in": "query",
            "required": false,
            "description": "Source: value for the first condition. Trimmed, at most 255 characters, matched case-insensitively. An empty column counts as an empty string, so `neq` and `ncontains` include submissions where it is empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[source][join]",
            "in": "query",
            "required": false,
            "description": "Source: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[source][operatorB]",
            "in": "query",
            "required": false,
            "description": "Source: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[source][valueB]",
            "in": "query",
            "required": false,
            "description": "Source: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[medium][operatorA]",
            "in": "query",
            "required": false,
            "description": "Medium: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[medium][valueA]",
            "in": "query",
            "required": false,
            "description": "Medium: value for the first condition. Trimmed, at most 255 characters, matched case-insensitively. An empty column counts as an empty string, so `neq` and `ncontains` include submissions where it is empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[medium][join]",
            "in": "query",
            "required": false,
            "description": "Medium: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[medium][operatorB]",
            "in": "query",
            "required": false,
            "description": "Medium: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[medium][valueB]",
            "in": "query",
            "required": false,
            "description": "Medium: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[campaign][operatorA]",
            "in": "query",
            "required": false,
            "description": "Campaign: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[campaign][valueA]",
            "in": "query",
            "required": false,
            "description": "Campaign: value for the first condition. Trimmed, at most 255 characters, matched case-insensitively. An empty column counts as an empty string, so `neq` and `ncontains` include submissions where it is empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[campaign][join]",
            "in": "query",
            "required": false,
            "description": "Campaign: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[campaign][operatorB]",
            "in": "query",
            "required": false,
            "description": "Campaign: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[campaign][valueB]",
            "in": "query",
            "required": false,
            "description": "Campaign: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[landing][operatorA]",
            "in": "query",
            "required": false,
            "description": "Landing page: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[landing][valueA]",
            "in": "query",
            "required": false,
            "description": "Landing page: value for the first condition. Trimmed, at most 255 characters, matched case-insensitively. An empty column counts as an empty string, so `neq` and `ncontains` include submissions where it is empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[landing][join]",
            "in": "query",
            "required": false,
            "description": "Landing page: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[landing][operatorB]",
            "in": "query",
            "required": false,
            "description": "Landing page: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "contains",
                "ncontains",
                "begins",
                "ends"
              ],
              "default": "contains"
            }
          },
          {
            "name": "filter[landing][valueB]",
            "in": "query",
            "required": false,
            "description": "Landing page: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[value][operatorA]",
            "in": "query",
            "required": false,
            "description": "Value: comparison for the first condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "lt",
                "lteq",
                "gt",
                "gteq",
                "btwn"
              ],
              "default": "eq"
            }
          },
          {
            "name": "filter[value][valueA]",
            "in": "query",
            "required": false,
            "description": "Value: value for the first condition. A number between -99999.99 and 99999.99; an empty value counts as 0. With `btwn`, valueA and valueB are the inclusive bounds and the second condition does not apply.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[value][join]",
            "in": "query",
            "required": false,
            "description": "Value: how the second condition combines with the first.",
            "schema": {
              "type": "string",
              "enum": [
                "and",
                "or"
              ],
              "default": "and"
            }
          },
          {
            "name": "filter[value][operatorB]",
            "in": "query",
            "required": false,
            "description": "Value: comparison for the optional second condition.",
            "schema": {
              "type": "string",
              "enum": [
                "eq",
                "neq",
                "lt",
                "lteq",
                "gt",
                "gteq",
                "btwn"
              ],
              "default": "eq"
            }
          },
          {
            "name": "filter[value][valueB]",
            "in": "query",
            "required": false,
            "description": "Value: value for the optional second condition. When only the second condition is filled in it is used as the first.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[cpf_*]",
            "in": "query",
            "required": false,
            "description": "A filter on a custom field, keyed by the field `key` (cpf_...) from the project custom fields list, `GET /orgs/{orgId}/projects/{projectId}/fields` (for example `filter[cpf_stage][]=hot`); at most 20 custom field filters. Send one value or a list of at most 100 (`filter[cpf_stage][]=hot&filter[cpf_stage][]=cold`) to match submissions holding any of them, compared exactly as stored (case-sensitive, list option values rather than labels); `not_set` matches submissions without a value, and boolean fields take `true` or `false`. Text, number and date fields also take a condition in the same shape as the other condition filters (`filter[cpf_budget][operatorA]=gt&filter[cpf_budget][valueA]=100`): text compares case-insensitively with eq, neq, contains, ncontains, begins and ends; numbers and `YYYY-MM-DD` dates use eq, neq, lt, lteq, gt, gteq and btwn (inclusive bounds in valueA and valueB). Values are trimmed and at most 255 characters. An operator or value that does not fit the field type matches no submissions; a key that is not a custom field of the projects read is compared as text.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The matching submission count.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormSubmissionCountResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityFormsRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A `filter` value is invalid (unknown key, operator, join, boolean, or a value out of range).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/form-submissions/{submissionId}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Form submissions"
        ],
        "summary": "Read one form submission",
        "description": "Returns one submission of the project, addressed by its submission ID (UUIDv7). The row has the same shape as one element of the submissions list `items`: `id` is the submission ID, `form_id` names the owning form by its UUIDv7, tags and project references are UUIDv7, and each submitted field value appears as its own property. A submission ID that belongs to another project, an internal integer id, or an unknown id is reported as 404. Read the list with `include=headers` for the column descriptors that label the fields.",
        "operationId": "getFormSubmissionWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "description": "Submission ID (UUIDv7), the `id` of a submission row as returned by the submissions list.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The form submission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormSubmission"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityFormsRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found, or no submission with this id exists in the requested project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Form submissions"
        ],
        "summary": "Update one form submission",
        "deprecated": true,
        "description": "Deprecated: the tags and the value have endpoints of their own. Use POST /form-submissions/{submissionId}/tags to add tags, DELETE /form-submissions/{submissionId}/tags/{tagId} to remove one or PUT /form-submissions/{submissionId}/tags to replace the set, so tags added since the submission was read are kept, and PUT or DELETE /form-submissions/{submissionId}/value for the value. Still accepted until existing clients have moved. Sets either the attributed value or the tag set of one form submission, chosen by `type`. Those two attributes are the only editable ones; the submitted field values themselves are never rewritten. `value` is required when `type` is `value`, `tags` when `type` is `tags`; an unrecognised `type` is rejected rather than accepted as a no-op. A request aimed at sample data is accepted and changes nothing.",
        "operationId": "updateFormSubmissionWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "description": "Submission ID (UUIDv7), the `id` of a submission row. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFormSubmissionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Submission updated."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityFormsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found, or no submission with this id exists in the requested project."
          },
          "409": {
            "description": "The target is sample data and cannot be edited.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A tag UUIDv7 does not exist in this project or in shared defaults.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Form submissions"
        ],
        "summary": "Delete one form submission",
        "description": "Removes one submission of the project. A request aimed at sample data is accepted and deletes nothing.",
        "operationId": "deleteFormSubmissionWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "description": "Submission ID (UUIDv7), the `id` of a submission row. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Submission deleted."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityFormsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found, or no submission with this id exists in the requested project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The target is sample data and cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/form-submissions/{submissionId}/custom-fields": {
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Form submissions"
        ],
        "summary": "Set custom field values of one form submission",
        "deprecated": true,
        "description": "Deprecated. Use PUT /form-submissions/{submissionId}/fields/{fieldId} to set one value and DELETE /form-submissions/{submissionId}/fields/{fieldId} to clear one, as on calls. Still accepted until existing clients have moved. Sets values of the project’s custom fields on one form submission. Only the fields in `values` change; a `null` or empty string value clears that field. Keys are custom field keys (`cpf_...`, the `key` of a field from the fields list), and each value must fit the field’s type: `true` or `false` for a boolean field, a number for a number field, a `YYYY-MM-DD` date for a date field, and one of the option values for a list field. A key that is not a visible custom field of the project is rejected. The response holds every custom field value stored on the submission after the change, the same object as the submission’s `custom_fields`. A request aimed at sample data is accepted and changes nothing.",
        "operationId": "updateFormSubmissionCustomFieldsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "description": "Submission ID (UUIDv7), the `id` of a submission row. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFormSubmissionCustomFieldsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Custom field values stored on the submission after the change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateFormSubmissionCustomFieldsResponse"
                }
              }
            }
          },
          "204": {
            "description": "The target is sample data; nothing was changed."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityFormsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found, or no submission with this id exists in the requested project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The target is sample data and cannot be edited.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body is malformed, or a key is not a custom field of the project, or a value does not fit its field. The problem pointer names the offending `/values/{key}`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/form-submissions/{submissionId}/fields/{fieldId}": {
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Form submissions"
        ],
        "summary": "Set a custom field value on a form submission",
        "description": "Sets one custom field value of the submission and keeps its other values, as on calls. Find the field’s `id` with GET /fields. The value must fit the field’s type: text of up to 1,000 characters, a number, a `YYYY-MM-DD` date, `true` or `false` for a boolean, or one of a list field’s option values. A `null` or empty value clears it. Setting the value the submission already has changes nothing. A change runs the form’s workflows that start on a submission update, as an edit in the app does. Requires the ActivityFormsUpdate permission and a plan that includes form tracking.",
        "operationId": "setFormSubmissionCustomFieldValue",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "description": "Submission ID (UUIDv7), the `id` of a submission row. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "description": "Custom field ID (UUIDv7), the `id` that GET /fields returns.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CustomFieldValueRequest"
        },
        "responses": {
          "200": {
            "description": "The submission’s value for the field after the change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomFieldValueResponse"
                }
              }
            }
          },
          "204": {
            "description": "Nothing was changed, because the submission is sample data."
          },
          "400": {
            "description": "The body is not a JSON object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityFormsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or submission was not found, or the field is not one of this project’s custom fields (code 406000080).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The field is archived, so it takes no new values (code 406000140), the organization’s plan does not include form tracking, or sample data is being viewed, so a real submission cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body is not JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid body, or a value that does not fit the field’s type or options (pointed at `/value`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Form submissions"
        ],
        "summary": "Clear a custom field value on a form submission",
        "description": "Clears one custom field value of the submission and keeps its other values, including for an archived field. Clearing a value the submission does not have also succeeds, so repeating the request changes nothing. A change runs the form’s workflows that start on a submission update, as an edit in the app does. Requires the ActivityFormsUpdate permission and a plan that includes form tracking.",
        "operationId": "clearFormSubmissionCustomFieldValue",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "description": "Submission ID (UUIDv7), the `id` of a submission row. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "description": "Custom field ID (UUIDv7), the `id` that GET /fields returns.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The submission has no value for the field, or it is sample data."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityFormsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or submission was not found, or the field is not one of this project’s custom fields (code 406000080).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The organization’s plan does not include form tracking, or sample data is being viewed, so a real submission cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/form-submissions/{submissionId}/tags": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Form submissions"
        ],
        "operationId": "addFormSubmissionTags",
        "summary": "Add tags to a form submission",
        "description": "Adds the tags to the submission and keeps the ones it has. Tags the submission already has are left as they are, so repeating the request changes nothing. Concurrent changes to the same submission are applied one after another, so none is lost. A change runs the form’s workflows that start on a submission update, as an edit in the app does. Requires the ActivityFormsUpdate permission and a plan that includes form tracking.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "description": "Submission ID (UUIDv7), the `id` of a submission row. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/FormSubmissionTagIdsRequest"
        },
        "responses": {
          "200": {
            "description": "The submission’s tags after the change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormSubmissionTagsResponse"
                }
              }
            }
          },
          "204": {
            "description": "Nothing was changed, because the submission is sample data."
          },
          "400": {
            "description": "The body is not a JSON object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityFormsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or submission was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The organization’s plan does not include form tracking, or sample data is being viewed, so a real submission cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body is not JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid body, or a tag that is neither this project’s nor a shared default.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Form submissions"
        ],
        "operationId": "replaceFormSubmissionTags",
        "summary": "Replace a form submission’s tags",
        "description": "Replaces the submission’s complete tag set; an empty `tags` removes every tag. Sending the set the submission already has changes nothing. A change runs the form’s workflows that start on a submission update, as an edit in the app does. Requires the ActivityFormsUpdate permission and a plan that includes form tracking.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "description": "Submission ID (UUIDv7), the `id` of a submission row. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/FormSubmissionTagIdsRequest"
        },
        "responses": {
          "200": {
            "description": "The submission’s tags after the change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormSubmissionTagsResponse"
                }
              }
            }
          },
          "204": {
            "description": "Nothing was changed, because the submission is sample data."
          },
          "400": {
            "description": "The body is not a JSON object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityFormsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or submission was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The organization’s plan does not include form tracking, or sample data is being viewed, so a real submission cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body is not JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid body, or a tag that is neither this project’s nor a shared default.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/form-submissions/{submissionId}/tags/{tagId}": {
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Form submissions"
        ],
        "summary": "Remove a tag from a form submission",
        "description": "Removes one tag from the submission. Removing a tag the submission does not have also succeeds, so repeating the request changes nothing. A change runs the form’s workflows that start on a submission update, as an edit in the app does. Requires the ActivityFormsUpdate permission and a plan that includes form tracking.",
        "operationId": "removeFormSubmissionTag",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "description": "Submission ID (UUIDv7), the `id` of a submission row. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "description": "Tag ID (UUIDv7) from tag CRUD.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The submission no longer has the tag, or it is sample data."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityFormsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or submission was not found, or the tag is neither this project’s nor a shared default (code 4140000010).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The organization’s plan does not include form tracking, or sample data is being viewed, so a real submission cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/form-submissions/{submissionId}/value": {
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Form submissions"
        ],
        "summary": "Set a form submission’s value",
        "description": "Sets the monetary value attributed to the submission, in the project’s currency, and keeps its other fields. The value is from 0 to 99,999.99, kept to two decimals. A `null` or empty value clears it; a cleared value counts as 0, so setting 0 on a submission without a value, or the value it already has, changes nothing. A change runs the form’s workflows that start on a submission update, as an edit in the app does. Requires the ActivityFormsUpdate permission and a plan that includes form tracking.",
        "operationId": "setFormSubmissionValue",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "description": "Submission ID (UUIDv7), the `id` of a submission row. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 99999.99,
                    "description": "The value, or `null` to clear it.",
                    "nullable": true
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The submission’s value after the change.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 99999.99,
                      "description": "The value now saved; `null` when it was cleared.",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "204": {
            "description": "Nothing was changed, because the submission is sample data."
          },
          "400": {
            "description": "The body is not a JSON object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityFormsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or submission was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The organization’s plan does not include form tracking, or sample data is being viewed, so a real submission cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body is not JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid body, or a value that is not a number from 0 to 99,999.99 (pointed at `/value`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Form submissions"
        ],
        "summary": "Clear a form submission’s value",
        "description": "Clears the value attributed to the submission and keeps its other fields. Clearing a value the submission does not have also succeeds, so repeating the request changes nothing. A change runs the form’s workflows that start on a submission update, as an edit in the app does. Requires the ActivityFormsUpdate permission and a plan that includes form tracking.",
        "operationId": "clearFormSubmissionValue",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "description": "Submission ID (UUIDv7), the `id` of a submission row. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The submission has no value, or it is sample data."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityFormsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The organization, project or submission was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The organization’s plan does not include form tracking, or sample data is being viewed, so a real submission cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/sms-messages": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "SMS messages"
        ],
        "summary": "List SMS messages",
        "description": "Returns one cursor-paginated page of SMS messages from projects where the caller has ActivitySmsLogRead permission, newest first. For an inbound message `from` is the other party and `to` is the tracking number; for an outbound message it is the reverse. Dates are read in the response `time_zone`, and a range may cover at most 366 days. Follow `page.next` exactly to read the next page. Automatic forwards of inbound messages are not listed as messages, so outbound totals can be lower than billed outbound SMS; a linked forward appears as `forward` on its inbound message. An outbound message’s `occurred_at` is the time of its most recent delivery status update.",
        "operationId": "getOrgSmsMessagesWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "First day, YYYY-MM-DD, in the response time zone. Defaults to six days before date_to.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Last day, inclusive, YYYY-MM-DD. Defaults to today.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "description": "Only messages in this direction.",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only messages with this status. `received` is inbound only. `failed` includes carrier error text such as \"Routing error\"; `unknown` means no status was recorded.",
            "schema": {
              "type": "string",
              "enum": [
                "received",
                "pending",
                "sent",
                "delivered",
                "failed",
                "unknown"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Only messages sent by this number: E.164, a short code, or an alphanumeric sender ID, 1 to 32 characters of `+`, letters, digits, `.` or `-`. A leading `+` must be sent URL-encoded as `%2B`.",
            "schema": {
              "type": "string",
              "pattern": "^[+A-Za-z0-9.-]{1,32}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Only messages sent to this number, in the same format as `from`. A leading `+` must be sent URL-encoded as `%2B`.",
            "schema": {
              "type": "string",
              "pattern": "^[+A-Za-z0-9.-]{1,32}$"
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "description": "Only messages where this number is the sender or the recipient, in the same format as `from`. A leading `+` must be sent URL-encoded as `%2B`. A contact’s number returns the whole conversation; a tracking number returns everything it sent and received.",
            "schema": {
              "type": "string",
              "pattern": "^[+A-Za-z0-9.-]{1,32}$"
            }
          },
          {
            "name": "external_number",
            "in": "query",
            "description": "Exact external party, regardless of message direction. Combines with other number filters.",
            "schema": {
              "type": "string",
              "pattern": "^[+A-Za-z0-9.-]{1,32}$"
            }
          },
          {
            "name": "tracking_number",
            "in": "query",
            "description": "Exact tracking number, regardless of direction.",
            "schema": {
              "type": "string",
              "pattern": "^[+A-Za-z0-9.-]{1,32}$"
            }
          },
          {
            "name": "max_span_days",
            "in": "query",
            "description": "Optional stricter inclusive date-span limit, applied after timezone defaults and to cursor continuations. Does not change the default seven-day range.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 366,
              "default": 366
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `project` — adds the project name.\n\ntracking_number.can_reply is available only to sessions.\n\nExample: `project`",
            "x-placeholder": "Example: project",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "project",
                      "description": "adds the project name."
                    }
                  ]
                }
              ],
              "notes": [
                "tracking_number.can_reply is available only to sessions."
              ],
              "example": "project"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum messages to return.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not construct or modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of SMS messages.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsMessagesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivitySmsLogRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the inbound SMS plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A query parameter is invalid, the date range is reversed or longer than max_span_days (366 by default), or the pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "503": {
            "description": "Messages held by a carrier are temporarily unavailable. Try again shortly.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/analytics/summary": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read an existing dashboard call report",
        "description": "thisPeriod contains selected calls, answered, missed_calls, minutes, avgminutes and uniquecallers. minutes rounds answered duration to whole minutes; avgminutes divides those rounded minutes by answered calls. missed_calls counts NOT_ANSWERED without recovery logic. Empty analytics scope returns thisPeriod: []. Shared session, public API and MCP access; frontend calculations and defaults are unchanged. Use dummy=false for real data. Comparisons require a second request. Project access requires AnalyticsDashboardRead; organization reports include only authorized projects. Native timezones, boundaries, filters and error behavior apply.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "description": "First day of the reporting window, YYYY-MM-DD. Common report date filtering includes the end day. Omitted dates retain dashboard defaults.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          },
          {
            "name": "call_outcome[]",
            "in": "query",
            "description": "Shared outcome filter, e.g. ANSWERED, NOT_ANSWERED or BLOCKED.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "tracking_num[]",
            "in": "query",
            "description": "Exact tracking phone numbers.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recording",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "include_data[]",
            "in": "query",
            "description": "Requested summary fields. Explicitly include missed_calls when needed; existing omitted-selection/form defaults are unchanged.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "thisPeriod contains selected calls, answered, missed_calls, minutes, avgminutes and uniquecallers. minutes rounds answered duration to whole minutes; avgminutes divides those rounded minutes by answered calls. missed_calls counts NOT_ANSWERED without recovery logic. Empty analytics scope returns thisPeriod: []. Every response includes is_dummy."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Insufficient project analytics permission, token scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          }
        },
        "operationId": "getOrgAnalyticsSummary"
      }
    },
    "/orgs/{orgId}/projects/{projectId}/analytics/summary": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read an existing dashboard call report",
        "description": "thisPeriod contains selected calls, answered, missed_calls, minutes, avgminutes and uniquecallers. minutes rounds answered duration to whole minutes; avgminutes divides those rounded minutes by answered calls. missed_calls counts NOT_ANSWERED without recovery logic. Empty analytics scope returns thisPeriod: []. Shared session, public API and MCP access; frontend calculations and defaults are unchanged. Use dummy=false for real data. Comparisons require a second request. Project access requires AnalyticsDashboardRead; organization reports include only authorized projects. Native timezones, boundaries, filters and error behavior apply.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "description": "First day of the reporting window, YYYY-MM-DD. Common report date filtering includes the end day. Omitted dates retain dashboard defaults.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          },
          {
            "name": "call_outcome[]",
            "in": "query",
            "description": "Shared outcome filter, e.g. ANSWERED, NOT_ANSWERED or BLOCKED.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "tracking_num[]",
            "in": "query",
            "description": "Exact tracking phone numbers.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recording",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "include_data[]",
            "in": "query",
            "description": "Requested summary fields. Explicitly include missed_calls when needed; existing omitted-selection/form defaults are unchanged.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "thisPeriod contains selected calls, answered, missed_calls, minutes, avgminutes and uniquecallers. minutes rounds answered duration to whole minutes; avgminutes divides those rounded minutes by answered calls. missed_calls counts NOT_ANSWERED without recovery logic. Empty analytics scope returns thisPeriod: []. Every response includes is_dummy."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Insufficient project analytics permission, token scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          }
        },
        "operationId": "getProjectAnalyticsSummary"
      }
    },
    "/orgs/{orgId}/analytics/dashboard/calls-by-dimension": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read an existing dashboard call report",
        "description": "summary slice returns trackingList and tot_count; calls returns callData; duration returns callDurationData (average minutes across matching calls); new-repeat returns uniqueCallers/repeatCallers using shared in-range rules; value returns callValueData/avgValueData (average denominator: positive-valued calls). Tags may count a call in multiple groups; page dimensions omit missing pages. Empty analytics scope returns only is_dummy. Shared session, public API and MCP access; frontend calculations and defaults are unchanged. Use dummy=false for real data. Comparisons require a second request. Project access requires AnalyticsDashboardRead; organization reports include only authorized projects. Native timezones, boundaries, filters and error behavior apply.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "description": "First day of the reporting window, YYYY-MM-DD. Common report date filtering includes the end day. Omitted dates retain dashboard defaults.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          },
          {
            "name": "call_outcome[]",
            "in": "query",
            "description": "Shared outcome filter, e.g. ANSWERED, NOT_ANSWERED or BLOCKED.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "tracking_num[]",
            "in": "query",
            "description": "Exact tracking phone numbers.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recording",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "description": "Existing dimension resolver: tracking_source_name, tracking_num_name, destination_num_name, utm_source/medium/campaign, utm_source_utm_medium, tag_ids, tag_category, call_page, landing_page, brnd.name or call_outcome. Unknown values retain the report default.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slices",
            "in": "query",
            "description": "Optional comma-separated slice selector. Dimension report: summary,calls,duration,new-repeat,value. Destinations: pie,hangup. Omit for the existing full report.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "summary slice returns trackingList and tot_count; calls returns callData; duration returns callDurationData (average minutes across matching calls); new-repeat returns uniqueCallers/repeatCallers using shared in-range rules; value returns callValueData/avgValueData (average denominator: positive-valued calls). Tags may count a call in multiple groups; page dimensions omit missing pages. Empty analytics scope returns only is_dummy. Every response includes is_dummy."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Insufficient project analytics permission, token scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          }
        },
        "operationId": "getOrgAnalyticsBreakdown"
      }
    },
    "/orgs/{orgId}/projects/{projectId}/analytics/dashboard/calls-by-dimension": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read an existing dashboard call report",
        "description": "summary slice returns trackingList and tot_count; calls returns callData; duration returns callDurationData (average minutes across matching calls); new-repeat returns uniqueCallers/repeatCallers using shared in-range rules; value returns callValueData/avgValueData (average denominator: positive-valued calls). Tags may count a call in multiple groups; page dimensions omit missing pages. Empty analytics scope returns only is_dummy. Shared session, public API and MCP access; frontend calculations and defaults are unchanged. Use dummy=false for real data. Comparisons require a second request. Project access requires AnalyticsDashboardRead; organization reports include only authorized projects. Native timezones, boundaries, filters and error behavior apply.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "description": "First day of the reporting window, YYYY-MM-DD. Common report date filtering includes the end day. Omitted dates retain dashboard defaults.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          },
          {
            "name": "call_outcome[]",
            "in": "query",
            "description": "Shared outcome filter, e.g. ANSWERED, NOT_ANSWERED or BLOCKED.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "tracking_num[]",
            "in": "query",
            "description": "Exact tracking phone numbers.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recording",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "description": "Existing dimension resolver: tracking_source_name, tracking_num_name, destination_num_name, utm_source/medium/campaign, utm_source_utm_medium, tag_ids, tag_category, call_page, landing_page, brnd.name or call_outcome. Unknown values retain the report default.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slices",
            "in": "query",
            "description": "Optional comma-separated slice selector. Dimension report: summary,calls,duration,new-repeat,value. Destinations: pie,hangup. Omit for the existing full report.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "summary slice returns trackingList and tot_count; calls returns callData; duration returns callDurationData (average minutes across matching calls); new-repeat returns uniqueCallers/repeatCallers using shared in-range rules; value returns callValueData/avgValueData (average denominator: positive-valued calls). Tags may count a call in multiple groups; page dimensions omit missing pages. Empty analytics scope returns only is_dummy. Every response includes is_dummy."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Insufficient project analytics permission, token scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          }
        },
        "operationId": "getProjectAnalyticsBreakdown"
      }
    },
    "/orgs/{orgId}/analytics/dashboard/trends": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read an existing dashboard call report",
        "description": "Returns tot_count, dates_array/dailyChartData, wk_array/weeklyChartData and month_array/monthlyChartData. Daily periods are filled; week/month arrays use native sparse labels. Counts are per dimension; expanded tag totals are not independent distinct-call totals. Shared session, public API and MCP access; frontend calculations and defaults are unchanged. Use dummy=false for real data. Comparisons require a second request. Project access requires AnalyticsDashboardRead; organization reports include only authorized projects. Native timezones, boundaries, filters and error behavior apply.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "description": "First day of the reporting window, YYYY-MM-DD. Common report date filtering includes the end day. Omitted dates retain dashboard defaults.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          },
          {
            "name": "call_outcome[]",
            "in": "query",
            "description": "Shared outcome filter, e.g. ANSWERED, NOT_ANSWERED or BLOCKED.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "tracking_num[]",
            "in": "query",
            "description": "Exact tracking phone numbers.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recording",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "description": "Existing dimension resolver: tracking_source_name, tracking_num_name, destination_num_name, utm_source/medium/campaign, utm_source_utm_medium, tag_ids, tag_category, call_page, landing_page, brnd.name or call_outcome. Unknown values retain the report default.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns tot_count, dates_array/dailyChartData, wk_array/weeklyChartData and month_array/monthlyChartData. Daily periods are filled; week/month arrays use native sparse labels. Counts are per dimension; expanded tag totals are not independent distinct-call totals. Every response includes is_dummy."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Insufficient project analytics permission, token scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          }
        },
        "operationId": "getOrgAnalyticsTrend"
      }
    },
    "/orgs/{orgId}/projects/{projectId}/analytics/dashboard/trends": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read an existing dashboard call report",
        "description": "Returns tot_count, dates_array/dailyChartData, wk_array/weeklyChartData and month_array/monthlyChartData. Daily periods are filled; week/month arrays use native sparse labels. Counts are per dimension; expanded tag totals are not independent distinct-call totals. Shared session, public API and MCP access; frontend calculations and defaults are unchanged. Use dummy=false for real data. Comparisons require a second request. Project access requires AnalyticsDashboardRead; organization reports include only authorized projects. Native timezones, boundaries, filters and error behavior apply.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "description": "First day of the reporting window, YYYY-MM-DD. Common report date filtering includes the end day. Omitted dates retain dashboard defaults.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          },
          {
            "name": "call_outcome[]",
            "in": "query",
            "description": "Shared outcome filter, e.g. ANSWERED, NOT_ANSWERED or BLOCKED.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "tracking_num[]",
            "in": "query",
            "description": "Exact tracking phone numbers.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recording",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "description": "Existing dimension resolver: tracking_source_name, tracking_num_name, destination_num_name, utm_source/medium/campaign, utm_source_utm_medium, tag_ids, tag_category, call_page, landing_page, brnd.name or call_outcome. Unknown values retain the report default.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns tot_count, dates_array/dailyChartData, wk_array/weeklyChartData and month_array/monthlyChartData. Daily periods are filled; week/month arrays use native sparse labels. Counts are per dimension; expanded tag totals are not independent distinct-call totals. Every response includes is_dummy."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Insufficient project analytics permission, token scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          }
        },
        "operationId": "getProjectAnalyticsTrend"
      }
    },
    "/orgs/{orgId}/analytics/dashboard/calls-by-hour": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read an existing dashboard call report",
        "description": "categories and series contain hourly call counts divided by active dates in each hour, rounded to two decimals; values are averages, not raw counts. Shared session, public API and MCP access; frontend calculations and defaults are unchanged. Use dummy=false for real data. Comparisons require a second request. Project access requires AnalyticsDashboardRead; organization reports include only authorized projects. Native timezones, boundaries, filters and error behavior apply.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "description": "First day of the reporting window, YYYY-MM-DD. Common report date filtering includes the end day. Omitted dates retain dashboard defaults.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          },
          {
            "name": "call_outcome[]",
            "in": "query",
            "description": "Shared outcome filter, e.g. ANSWERED, NOT_ANSWERED or BLOCKED.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "tracking_num[]",
            "in": "query",
            "description": "Exact tracking phone numbers.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recording",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "description": "Existing dimension resolver: tracking_source_name, tracking_num_name, destination_num_name, utm_source/medium/campaign, utm_source_utm_medium, tag_ids, tag_category, call_page, landing_page, brnd.name or call_outcome. Unknown values retain the report default.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "categories and series contain hourly call counts divided by active dates in each hour, rounded to two decimals; values are averages, not raw counts. Every response includes is_dummy."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Insufficient project analytics permission, token scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          }
        },
        "operationId": "getOrgAnalyticsHour"
      }
    },
    "/orgs/{orgId}/projects/{projectId}/analytics/dashboard/calls-by-hour": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read an existing dashboard call report",
        "description": "categories and series contain hourly call counts divided by active dates in each hour, rounded to two decimals; values are averages, not raw counts. Shared session, public API and MCP access; frontend calculations and defaults are unchanged. Use dummy=false for real data. Comparisons require a second request. Project access requires AnalyticsDashboardRead; organization reports include only authorized projects. Native timezones, boundaries, filters and error behavior apply.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "description": "First day of the reporting window, YYYY-MM-DD. Common report date filtering includes the end day. Omitted dates retain dashboard defaults.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          },
          {
            "name": "call_outcome[]",
            "in": "query",
            "description": "Shared outcome filter, e.g. ANSWERED, NOT_ANSWERED or BLOCKED.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "tracking_num[]",
            "in": "query",
            "description": "Exact tracking phone numbers.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recording",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "description": "Existing dimension resolver: tracking_source_name, tracking_num_name, destination_num_name, utm_source/medium/campaign, utm_source_utm_medium, tag_ids, tag_category, call_page, landing_page, brnd.name or call_outcome. Unknown values retain the report default.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "categories and series contain hourly call counts divided by active dates in each hour, rounded to two decimals; values are averages, not raw counts. Every response includes is_dummy."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Insufficient project analytics permission, token scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          }
        },
        "operationId": "getProjectAnalyticsHour"
      }
    },
    "/orgs/{orgId}/analytics/dashboard/calls-by-weekday": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read an existing dashboard call report",
        "description": "categories and series contain weekday call counts divided by active dates for each weekday, rounded to two decimals; values are averages, not raw counts. Shared session, public API and MCP access; frontend calculations and defaults are unchanged. Use dummy=false for real data. Comparisons require a second request. Project access requires AnalyticsDashboardRead; organization reports include only authorized projects. Native timezones, boundaries, filters and error behavior apply.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "description": "First day of the reporting window, YYYY-MM-DD. Common report date filtering includes the end day. Omitted dates retain dashboard defaults.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          },
          {
            "name": "call_outcome[]",
            "in": "query",
            "description": "Shared outcome filter, e.g. ANSWERED, NOT_ANSWERED or BLOCKED.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "tracking_num[]",
            "in": "query",
            "description": "Exact tracking phone numbers.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recording",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "description": "Existing dimension resolver: tracking_source_name, tracking_num_name, destination_num_name, utm_source/medium/campaign, utm_source_utm_medium, tag_ids, tag_category, call_page, landing_page, brnd.name or call_outcome. Unknown values retain the report default.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "categories and series contain weekday call counts divided by active dates for each weekday, rounded to two decimals; values are averages, not raw counts. Every response includes is_dummy."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Insufficient project analytics permission, token scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          }
        },
        "operationId": "getOrgAnalyticsWeekday"
      }
    },
    "/orgs/{orgId}/projects/{projectId}/analytics/dashboard/calls-by-weekday": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read an existing dashboard call report",
        "description": "categories and series contain weekday call counts divided by active dates for each weekday, rounded to two decimals; values are averages, not raw counts. Shared session, public API and MCP access; frontend calculations and defaults are unchanged. Use dummy=false for real data. Comparisons require a second request. Project access requires AnalyticsDashboardRead; organization reports include only authorized projects. Native timezones, boundaries, filters and error behavior apply.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "description": "First day of the reporting window, YYYY-MM-DD. Common report date filtering includes the end day. Omitted dates retain dashboard defaults.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          },
          {
            "name": "call_outcome[]",
            "in": "query",
            "description": "Shared outcome filter, e.g. ANSWERED, NOT_ANSWERED or BLOCKED.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "tracking_num[]",
            "in": "query",
            "description": "Exact tracking phone numbers.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recording",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "description": "Existing dimension resolver: tracking_source_name, tracking_num_name, destination_num_name, utm_source/medium/campaign, utm_source_utm_medium, tag_ids, tag_category, call_page, landing_page, brnd.name or call_outcome. Unknown values retain the report default.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "categories and series contain weekday call counts divided by active dates for each weekday, rounded to two decimals; values are averages, not raw counts. Every response includes is_dummy."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Insufficient project analytics permission, token scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          }
        },
        "operationId": "getProjectAnalyticsWeekday"
      }
    },
    "/orgs/{orgId}/analytics/dashboard/call-duration-distribution": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read an existing dashboard call report",
        "description": "Returns buckets and tot_count. Existing intervals are 0..59, 60..179, 180..359, 360..599 and greater than 600 seconds: exactly 600 seconds is omitted. tot_count sums displayed buckets. Shared session, public API and MCP access; frontend calculations and defaults are unchanged. Use dummy=false for real data. Comparisons require a second request. Project access requires AnalyticsDashboardRead; organization reports include only authorized projects. Native timezones, boundaries, filters and error behavior apply.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "description": "First day of the reporting window, YYYY-MM-DD. Common report date filtering includes the end day. Omitted dates retain dashboard defaults.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          },
          {
            "name": "call_outcome[]",
            "in": "query",
            "description": "Shared outcome filter, e.g. ANSWERED, NOT_ANSWERED or BLOCKED.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "tracking_num[]",
            "in": "query",
            "description": "Exact tracking phone numbers.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recording",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns buckets and tot_count. Existing intervals are 0..59, 60..179, 180..359, 360..599 and greater than 600 seconds: exactly 600 seconds is omitted. tot_count sums displayed buckets. Every response includes is_dummy."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Insufficient project analytics permission, token scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          }
        },
        "operationId": "getOrgAnalyticsDuration"
      }
    },
    "/orgs/{orgId}/projects/{projectId}/analytics/dashboard/call-duration-distribution": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read an existing dashboard call report",
        "description": "Returns buckets and tot_count. Existing intervals are 0..59, 60..179, 180..359, 360..599 and greater than 600 seconds: exactly 600 seconds is omitted. tot_count sums displayed buckets. Shared session, public API and MCP access; frontend calculations and defaults are unchanged. Use dummy=false for real data. Comparisons require a second request. Project access requires AnalyticsDashboardRead; organization reports include only authorized projects. Native timezones, boundaries, filters and error behavior apply.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "description": "First day of the reporting window, YYYY-MM-DD. Common report date filtering includes the end day. Omitted dates retain dashboard defaults.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          },
          {
            "name": "call_outcome[]",
            "in": "query",
            "description": "Shared outcome filter, e.g. ANSWERED, NOT_ANSWERED or BLOCKED.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "tracking_num[]",
            "in": "query",
            "description": "Exact tracking phone numbers.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recording",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns buckets and tot_count. Existing intervals are 0..59, 60..179, 180..359, 360..599 and greater than 600 seconds: exactly 600 seconds is omitted. tot_count sums displayed buckets. Every response includes is_dummy."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Insufficient project analytics permission, token scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          }
        },
        "operationId": "getProjectAnalyticsDuration"
      }
    },
    "/orgs/{orgId}/analytics/dashboard/destinations": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read an existing dashboard call report",
        "description": "With slices=hangup, b contains hangupCategories, destination_hungup and caller_hungup arrays grouped by the chosen dimension; unknown hangups are omitted. a is the destination pie slice when requested. Empty analytics scope returns a: [], b: []. Shared session, public API and MCP access; frontend calculations and defaults are unchanged. Use dummy=false for real data. Comparisons require a second request. Project access requires AnalyticsDashboardRead; organization reports include only authorized projects. Native timezones, boundaries, filters and error behavior apply.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "description": "First day of the reporting window, YYYY-MM-DD. Common report date filtering includes the end day. Omitted dates retain dashboard defaults.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          },
          {
            "name": "call_outcome[]",
            "in": "query",
            "description": "Shared outcome filter, e.g. ANSWERED, NOT_ANSWERED or BLOCKED.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "tracking_num[]",
            "in": "query",
            "description": "Exact tracking phone numbers.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recording",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "description": "Existing dimension resolver: tracking_source_name, tracking_num_name, destination_num_name, utm_source/medium/campaign, utm_source_utm_medium, tag_ids, tag_category, call_page, landing_page, brnd.name or call_outcome. Unknown values retain the report default.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slices",
            "in": "query",
            "description": "Optional comma-separated slice selector. Dimension report: summary,calls,duration,new-repeat,value. Destinations: pie,hangup. Omit for the existing full report.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "With slices=hangup, b contains hangupCategories, destination_hungup and caller_hungup arrays grouped by the chosen dimension; unknown hangups are omitted. a is the destination pie slice when requested. Empty analytics scope returns a: [], b: []. Every response includes is_dummy."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Insufficient project analytics permission, token scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          }
        },
        "operationId": "getOrgAnalyticsHangup"
      }
    },
    "/orgs/{orgId}/projects/{projectId}/analytics/dashboard/destinations": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read an existing dashboard call report",
        "description": "With slices=hangup, b contains hangupCategories, destination_hungup and caller_hungup arrays grouped by the chosen dimension; unknown hangups are omitted. a is the destination pie slice when requested. Empty analytics scope returns a: [], b: []. Shared session, public API and MCP access; frontend calculations and defaults are unchanged. Use dummy=false for real data. Comparisons require a second request. Project access requires AnalyticsDashboardRead; organization reports include only authorized projects. Native timezones, boundaries, filters and error behavior apply.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "description": "First day of the reporting window, YYYY-MM-DD. Common report date filtering includes the end day. Omitted dates retain dashboard defaults.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "description": "Last day of the reporting window, YYYY-MM-DD. See `date_range[start_date]`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          },
          {
            "name": "call_outcome[]",
            "in": "query",
            "description": "Shared outcome filter, e.g. ANSWERED, NOT_ANSWERED or BLOCKED.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "tracking_num[]",
            "in": "query",
            "description": "Exact tracking phone numbers.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "description": "Shared advanced-filter JSON, e.g. {\"operatorA\":\"eq\",\"valueA\":\"search\"}; text equality is case insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recording",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "transcription",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "first_time",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "description": "Existing dimension resolver: tracking_source_name, tracking_num_name, destination_num_name, utm_source/medium/campaign, utm_source_utm_medium, tag_ids, tag_category, call_page, landing_page, brnd.name or call_outcome. Unknown values retain the report default.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slices",
            "in": "query",
            "description": "Optional comma-separated slice selector. Dimension report: summary,calls,duration,new-repeat,value. Destinations: pie,hangup. Omit for the existing full report.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "With slices=hangup, b contains hangupCategories, destination_hungup and caller_hungup arrays grouped by the chosen dimension; unknown hangups are omitted. a is the destination pie slice when requested. Empty analytics scope returns a: [], b: []. Every response includes is_dummy."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Insufficient project analytics permission, token scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          }
        },
        "operationId": "getProjectAnalyticsHangup"
      }
    },
    "/orgs/{orgId}/analytics/dashboard/caller-journeys": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read the dashboard caller-journey report",
        "description": "Returns the existing browsing-history Sankey graph by default. Reads matched-call history and web tracking; this is not the former MCP snapshot graph. Real graph queries use call end_stamp and matched insert_date, with midnight at the start of `date_range[end_date]` as their upper cutoff. Only DNI source filtering applies to the graph; common call filters and selected brand subsets are not applied there. Stage-prefixed URL labels retain the shared formatting and can contain path identifiers. Some query failures return an empty graph, indistinguishable from no matching data. No preferences or business data are written. Existing table_data_only requests retain their separate call-page table and common filtering behavior.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "description": "First day of the reporting window, YYYY-MM-DD. Existing omitted-date and dummy defaults are retained.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "description": "Last day of the reporting window, YYYY-MM-DD. Real-data graph queries bind midnight at the start of this day; it is not an inclusive whole day.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "journey",
            "in": "query",
            "description": "JSON object or nested query values: max_steps 3..20 (default 4), max_paths 0..3 (default 2), pages_per_step 5..20 (default 5). URL depth and page-box controls retain dashboard meanings. Unknown fields are ignored.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source[]",
            "in": "query",
            "description": "Optional DNI source strings or JSON-encoded arrays of strings. Exact source matching in graph mode.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          },
          {
            "name": "table_data_only",
            "in": "query",
            "description": "Omit for the graph; send true for the existing call-page table. Legacy truthiness also treats the literal string false as true.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Graph: is_dummy, max_steps, max_path_levels, min_boxes_per_step, legacy numeric cid and from_to_weight_grouped_json (array of [from, to, weight] triples). Empty analytics scope returns zero layout values and empty triples. Table mode returns rows with tracking_type, answered, not_answered, call_seconds, unique_callers and device counters. Native shapes and calculations are unchanged."
          },
          "403": {
            "description": "Insufficient project analytics permission, scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          },
          "422": {
            "description": "Invalid graph control or source structure."
          }
        },
        "operationId": "getOrgAnalyticsCallerJourneys"
      }
    },
    "/orgs/{orgId}/projects/{projectId}/analytics/dashboard/caller-journeys": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read the dashboard caller-journey report",
        "description": "Returns the existing browsing-history Sankey graph by default. Reads matched-call history and web tracking; this is not the former MCP snapshot graph. Real graph queries use call end_stamp and matched insert_date, with midnight at the start of `date_range[end_date]` as their upper cutoff. Only DNI source filtering applies to the graph; common call filters and selected brand subsets are not applied there. Stage-prefixed URL labels retain the shared formatting and can contain path identifiers. Some query failures return an empty graph, indistinguishable from no matching data. No preferences or business data are written. Existing table_data_only requests retain their separate call-page table and common filtering behavior.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "description": "First day of the reporting window, YYYY-MM-DD. Existing omitted-date and dummy defaults are retained.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "description": "Last day of the reporting window, YYYY-MM-DD. Real-data graph queries bind midnight at the start of this day; it is not an inclusive whole day.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "journey",
            "in": "query",
            "description": "JSON object or nested query values: max_steps 3..20 (default 4), max_paths 0..3 (default 2), pages_per_step 5..20 (default 5). URL depth and page-box controls retain dashboard meanings. Unknown fields are ignored.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source[]",
            "in": "query",
            "description": "Optional DNI source strings or JSON-encoded arrays of strings. Exact source matching in graph mode.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          },
          {
            "name": "table_data_only",
            "in": "query",
            "description": "Omit for the graph; send true for the existing call-page table. Legacy truthiness also treats the literal string false as true.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Graph: is_dummy, max_steps, max_path_levels, min_boxes_per_step, legacy numeric cid and from_to_weight_grouped_json (array of [from, to, weight] triples). Empty analytics scope returns zero layout values and empty triples. Table mode returns rows with tracking_type, answered, not_answered, call_seconds, unique_callers and device counters. Native shapes and calculations are unchanged."
          },
          "403": {
            "description": "Insufficient project analytics permission, scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          },
          "422": {
            "description": "Invalid graph control or source structure."
          }
        },
        "operationId": "getProjectAnalyticsCallerJourneys"
      }
    },
    "/orgs/{orgId}/analytics/dashboard/visit-stats": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read the dashboard visit-conversion report",
        "description": "Shared session, public API and MCP report. Preserves dashboard calculations: unique visits are counted per day and DNI group, then summed into the requested period. Organization-wide DNI is included alongside accessible project groups. Visits are the repeated denominator for each call-dimension series; never sum them across series. This report does not accept general analytics field_filters or return configuration-availability reasons. Existing date bucketing, zero filling and the last-1000-days calendar spine are retained. Set dummy=false for real data. Rates can be calculated as calls divided by visits; a zero denominator has no rate.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "required": true,
            "description": "First day of the reporting window, YYYY-MM-DD, inclusive.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "required": true,
            "description": "Last day of the reporting window, YYYY-MM-DD, inclusive.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "visit_stats",
            "in": "query",
            "description": "JSON object with period: day, week or month. Defaults to week. Existing daily/weekly/monthly aliases and nested query parameters remain supported.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "description": "__none__ requests a Total series. Existing unknown values fall back to tracking source.",
            "schema": {
              "type": "string",
              "enum": [
                "__none__",
                "tracking_source_name",
                "destination_num_name",
                "call_outcome",
                "utm_source",
                "utm_medium",
                "utm_campaign",
                "utm_source_utm_medium"
              ],
              "default": "tracking_source_name"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          },
          {
            "name": "brand[]",
            "in": "query",
            "description": "Optional selected project UUIDs, intersected with accessible projects.",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unchanged dashboard report. dimension_data is keyed by dimension label; Total is supplied by the report when applicable. PHP may encode empty data or sequential numeric labels as an array. Empty authorized scope returns empty arrays and an empty period.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "is_dummy",
                    "period",
                    "visit_data_dates",
                    "dimension_data"
                  ],
                  "properties": {
                    "is_dummy": {
                      "type": "boolean"
                    },
                    "period": {
                      "type": "string",
                      "enum": [
                        "day",
                        "week",
                        "month",
                        ""
                      ]
                    },
                    "visit_data_dates": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "dimension_data": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "yrweek",
                            "calls",
                            "unique_visits",
                            "all_visits"
                          ],
                          "properties": {
                            "yrweek": {
                              "type": "string",
                              "description": "YYYY-MM-DD for day; YYYY-WW for week; YYYY-MM for month."
                            },
                            "calls": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "unique_visits": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "all_visits": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient project analytics permission, scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          },
          "422": {
            "description": "Invalid dates or unsupported visit period."
          }
        },
        "operationId": "getOrgAnalyticsVisitStats"
      }
    },
    "/orgs/{orgId}/projects/{projectId}/analytics/dashboard/visit-stats": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read the dashboard visit-conversion report",
        "description": "Shared session, public API and MCP report. Preserves dashboard calculations: unique visits are counted per day and DNI group, then summed into the requested period. Organization-wide DNI is included alongside accessible project groups. Visits are the repeated denominator for each call-dimension series; never sum them across series. This report does not accept general analytics field_filters or return configuration-availability reasons. Existing date bucketing, zero filling and the last-1000-days calendar spine are retained. Set dummy=false for real data. Rates can be calculated as calls divided by visits; a zero denominator has no rate.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "required": true,
            "description": "First day of the reporting window, YYYY-MM-DD, inclusive.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "required": true,
            "description": "Last day of the reporting window, YYYY-MM-DD, inclusive.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "visit_stats",
            "in": "query",
            "description": "JSON object with period: day, week or month. Defaults to week. Existing daily/weekly/monthly aliases and nested query parameters remain supported.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "description": "__none__ requests a Total series. Existing unknown values fall back to tracking source.",
            "schema": {
              "type": "string",
              "enum": [
                "__none__",
                "tracking_source_name",
                "destination_num_name",
                "call_outcome",
                "utm_source",
                "utm_medium",
                "utm_campaign",
                "utm_source_utm_medium"
              ],
              "default": "tracking_source_name"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "false",
                "true",
                "auto"
              ],
              "default": "false"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unchanged dashboard report. dimension_data is keyed by dimension label; Total is supplied by the report when applicable. PHP may encode empty data or sequential numeric labels as an array. Empty authorized scope returns empty arrays and an empty period.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "is_dummy",
                    "period",
                    "visit_data_dates",
                    "dimension_data"
                  ],
                  "properties": {
                    "is_dummy": {
                      "type": "boolean"
                    },
                    "period": {
                      "type": "string",
                      "enum": [
                        "day",
                        "week",
                        "month",
                        ""
                      ]
                    },
                    "visit_data_dates": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "dimension_data": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "yrweek",
                            "calls",
                            "unique_visits",
                            "all_visits"
                          ],
                          "properties": {
                            "yrweek": {
                              "type": "string",
                              "description": "YYYY-MM-DD for day; YYYY-WW for week; YYYY-MM for month."
                            },
                            "calls": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "unique_visits": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "all_visits": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient project analytics permission, scope or API entitlement."
          },
          "404": {
            "description": "Unknown or mismatched organization/project."
          },
          "422": {
            "description": "Invalid dates or unsupported visit period."
          }
        },
        "operationId": "getProjectAnalyticsVisitStats"
      }
    },
    "/orgs/{orgId}/analytics/extra-fields": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read analytics field metadata",
        "description": "Returns the existing extra-field groups by default. Set only_fields=call_query to retrieve the complete server-authoritative inbound call query catalog under call_query, including allowed operators, historical options and authorized project references. This opt-in retains real-data-only behavior and requires AnalyticsDashboardRead in the selected project; organization results are limited to projects readable for analytics. Existing field groups also permit ActivityCallsRead. This read does not change dashboard preferences or execute a report.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "only_fields",
            "in": "query",
            "description": "Optional group selector. Omitted selects the existing custom-property, parameter and browser-storage groups; call_query is opt-in.",
            "schema": {
              "type": "string",
              "enum": [
                "custom_properties",
                "parameters",
                "browser_storage",
                "call_query"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Selected metadata groups. call_query is returned only when explicitly selected.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "custom_properties": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "parameters": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "cookie_names": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "local_storage_keys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "call_query": {
                      "type": "object",
                      "required": [
                        "timezone",
                        "is_sample_data",
                        "fields"
                      ],
                      "properties": {
                        "timezone": {
                          "type": "string"
                        },
                        "is_sample_data": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "field_ref",
                              "label",
                              "category",
                              "data_type",
                              "active",
                              "allowed_operators",
                              "available_options",
                              "options_are_closed",
                              "authorized_project_ids"
                            ],
                            "properties": {
                              "field_ref": {
                                "type": "string",
                                "description": "Opaque server field reference; pass unchanged in field_filters."
                              },
                              "label": {
                                "type": "string"
                              },
                              "category": {
                                "type": "string"
                              },
                              "data_type": {
                                "type": "string",
                                "enum": [
                                  "text",
                                  "number",
                                  "date",
                                  "boolean",
                                  "list"
                                ]
                              },
                              "active": {
                                "type": "boolean"
                              },
                              "allowed_operators": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "available_options": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "value": {
                                      "description": "String, number or boolean option value."
                                    },
                                    "label": {
                                      "type": "string"
                                    }
                                  }
                                }
                              },
                              "options_are_closed": {
                                "type": "boolean"
                              },
                              "authorized_project_ids": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access to the selected metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Query metadata unavailable or timed out.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "getOrgAnalyticsExtraFields"
      }
    },
    "/orgs/{orgId}/projects/{projectId}/analytics/extra-fields": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Call analytics"
        ],
        "summary": "Read analytics field metadata",
        "description": "Returns the existing extra-field groups by default. Set only_fields=call_query to retrieve the complete server-authoritative inbound call query catalog under call_query, including allowed operators, historical options and authorized project references. This opt-in retains real-data-only behavior and requires AnalyticsDashboardRead in the selected project; organization results are limited to projects readable for analytics. Existing field groups also permit ActivityCallsRead. This read does not change dashboard preferences or execute a report.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "only_fields",
            "in": "query",
            "description": "Optional group selector. Omitted selects the existing custom-property, parameter and browser-storage groups; call_query is opt-in.",
            "schema": {
              "type": "string",
              "enum": [
                "custom_properties",
                "parameters",
                "browser_storage",
                "call_query"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Selected metadata groups. call_query is returned only when explicitly selected.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "custom_properties": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "parameters": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "cookie_names": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "local_storage_keys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "call_query": {
                      "type": "object",
                      "required": [
                        "timezone",
                        "is_sample_data",
                        "fields"
                      ],
                      "properties": {
                        "timezone": {
                          "type": "string"
                        },
                        "is_sample_data": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "field_ref",
                              "label",
                              "category",
                              "data_type",
                              "active",
                              "allowed_operators",
                              "available_options",
                              "options_are_closed",
                              "authorized_project_ids"
                            ],
                            "properties": {
                              "field_ref": {
                                "type": "string",
                                "description": "Opaque server field reference; pass unchanged in field_filters."
                              },
                              "label": {
                                "type": "string"
                              },
                              "category": {
                                "type": "string"
                              },
                              "data_type": {
                                "type": "string",
                                "enum": [
                                  "text",
                                  "number",
                                  "date",
                                  "boolean",
                                  "list"
                                ]
                              },
                              "active": {
                                "type": "boolean"
                              },
                              "allowed_operators": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "available_options": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "value": {
                                      "description": "String, number or boolean option value."
                                    },
                                    "label": {
                                      "type": "string"
                                    }
                                  }
                                }
                              },
                              "options_are_closed": {
                                "type": "boolean"
                              },
                              "authorized_project_ids": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access to the selected metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Query metadata unavailable or timed out.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "operationId": "getProjectAnalyticsExtraFields"
      }
    },
    "/orgs/{orgId}/projects/{projectId}/sms-messages": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "SMS messages"
        ],
        "summary": "List SMS messages",
        "description": "Returns one cursor-paginated page of the project’s SMS messages, newest first. For an inbound message `from` is the other party and `to` is the tracking number; for an outbound message it is the reverse. Dates are read in the response `time_zone`, and a range may cover at most 366 days. Follow `page.next` exactly to read the next page. Automatic forwards of inbound messages are not listed as messages, so outbound totals can be lower than billed outbound SMS; a linked forward appears as `forward` on its inbound message. An outbound message’s `occurred_at` is the time of its most recent delivery status update.",
        "operationId": "getProjectSmsMessagesWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "First day, YYYY-MM-DD, in the response time zone. Defaults to six days before date_to.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Last day, inclusive, YYYY-MM-DD. Defaults to today.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "description": "Only messages in this direction.",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only messages with this status. `received` is inbound only. `failed` includes carrier error text such as \"Routing error\"; `unknown` means no status was recorded.",
            "schema": {
              "type": "string",
              "enum": [
                "received",
                "pending",
                "sent",
                "delivered",
                "failed",
                "unknown"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Only messages sent by this number: E.164, a short code, or an alphanumeric sender ID, 1 to 32 characters of `+`, letters, digits, `.` or `-`. A leading `+` must be sent URL-encoded as `%2B`.",
            "schema": {
              "type": "string",
              "pattern": "^[+A-Za-z0-9.-]{1,32}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Only messages sent to this number, in the same format as `from`. A leading `+` must be sent URL-encoded as `%2B`.",
            "schema": {
              "type": "string",
              "pattern": "^[+A-Za-z0-9.-]{1,32}$"
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "description": "Only messages where this number is the sender or the recipient, in the same format as `from`. A leading `+` must be sent URL-encoded as `%2B`. A contact’s number returns the whole conversation; a tracking number returns everything it sent and received.",
            "schema": {
              "type": "string",
              "pattern": "^[+A-Za-z0-9.-]{1,32}$"
            }
          },
          {
            "name": "external_number",
            "in": "query",
            "description": "Exact external party, regardless of message direction. Combines with other number filters.",
            "schema": {
              "type": "string",
              "pattern": "^[+A-Za-z0-9.-]{1,32}$"
            }
          },
          {
            "name": "tracking_number",
            "in": "query",
            "description": "Exact tracking number, regardless of direction.",
            "schema": {
              "type": "string",
              "pattern": "^[+A-Za-z0-9.-]{1,32}$"
            }
          },
          {
            "name": "max_span_days",
            "in": "query",
            "description": "Optional stricter inclusive date-span limit, applied after timezone defaults and to cursor continuations. Does not change the default seven-day range.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 366,
              "default": 366
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `project` — adds the project name.\n\ntracking_number.can_reply is available only to sessions.\n\nExample: `project`",
            "x-placeholder": "Example: project",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "project",
                      "description": "adds the project name."
                    }
                  ]
                }
              ],
              "notes": [
                "tracking_number.can_reply is available only to sessions."
              ],
              "example": "project"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum messages to return.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not construct or modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of SMS messages.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsMessagesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivitySmsLogRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the inbound SMS plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A query parameter is invalid, the date range is reversed or longer than max_span_days (366 by default), or the pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "503": {
            "description": "Messages held by a carrier are temporarily unavailable. Try again shortly.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/forms/{formId}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Forms"
        ],
        "summary": "Read one tracked form",
        "description": "Returns a single tracked form with the same shape and include rules as each row of the forms list. A form id that belongs to another project is reported as 404.",
        "operationId": "getProjectTrackedFormWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "formId",
            "in": "path",
            "description": "Tracked-form ID (UUIDv7), the `id` returned by the forms list. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "description": "Sample-data mode. Omitted or `off` returns real data; `on` returns fixture data and `auto` lets the endpoint choose based on setup eligibility.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "on",
                "off",
                "auto"
              ]
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `fields` — includes the captured field map and the excluded-field rules.\n• `fields.captured` — includes the captured fields, keyed by field name with the detected type.\n• `fields.excluded` — includes the excluded field names and wildcard rules.\n• `meta` — includes all submission timestamps in UTC.\n• `meta.first_submission_at` — includes the earliest submission timestamp.\n• `meta.last_submission_at` — includes the most recent submission timestamp.\n• `page` — includes every page attribute, adding `form_action` to the default `page` object.\n• `page.form_action` — includes the submit target of the form.\n• `summary` — includes all submission counts.\n• `summary.submission_count` — includes the number of recorded submissions.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nSummary, meta, and fields are omitted unless requested.\n\nExample: `summary.submission_count,meta,fields.excluded`",
            "x-placeholder": "Example: summary.submission_count,meta,fields.excluded",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "fields",
                      "description": "includes the captured field map and the excluded-field rules."
                    },
                    {
                      "value": "fields.captured",
                      "description": "includes the captured fields, keyed by field name with the detected type."
                    },
                    {
                      "value": "fields.excluded",
                      "description": "includes the excluded field names and wildcard rules."
                    },
                    {
                      "value": "meta",
                      "description": "includes all submission timestamps in UTC."
                    },
                    {
                      "value": "meta.first_submission_at",
                      "description": "includes the earliest submission timestamp."
                    },
                    {
                      "value": "meta.last_submission_at",
                      "description": "includes the most recent submission timestamp."
                    },
                    {
                      "value": "page",
                      "description": "includes every page attribute, adding `form_action` to the default `page` object."
                    },
                    {
                      "value": "page.form_action",
                      "description": "includes the submit target of the form."
                    },
                    {
                      "value": "summary",
                      "description": "includes all submission counts."
                    },
                    {
                      "value": "summary.submission_count",
                      "description": "includes the number of recorded submissions."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Summary, meta, and fields are omitted unless requested."
              ],
              "example": "summary.submission_count,meta,fields.excluded"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The tracked form.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrackedForm"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "FormsRead or ActivityFormsRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such form in this project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Forms"
        ],
        "summary": "Update a tracked form",
        "description": "Edits the form itself rather than a submission: send `name` to rename it and/or `excluded_fields` to replace its excluded-field list; at least one is required. Renaming a submitted field is a separate resource (PUT /orgs/{orgId}/projects/{projectId}/forms/{formId}/fields/{fieldKey}). Returns the updated form, the same representation GET /orgs/{orgId}/projects/{projectId}/forms/{formId} returns; when you send excluded_fields, the resulting fields.excluded is echoed without needing include.",
        "operationId": "updateFormDetailsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "formId",
            "in": "path",
            "required": true,
            "description": "Tracked-form ID (UUIDv7), the `id` returned by the forms list. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `fields` — includes the captured field map and the excluded-field rules.\n• `fields.captured` — includes the captured fields, keyed by field name with the detected type.\n• `fields.excluded` — includes the excluded field names and wildcard rules.\n• `meta` — includes all submission timestamps in UTC.\n• `meta.first_submission_at` — includes the earliest submission timestamp.\n• `meta.last_submission_at` — includes the most recent submission timestamp.\n• `page` — includes every page attribute, adding `form_action` to the default `page` object.\n• `page.form_action` — includes the submit target of the form.\n• `summary` — includes all submission counts.\n• `summary.submission_count` — includes the number of recorded submissions.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nSummary, meta, and fields are omitted unless requested.\n\nExample: `summary.submission_count,meta,fields.excluded`",
            "x-placeholder": "Example: summary.submission_count,meta,fields.excluded",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "fields",
                      "description": "includes the captured field map and the excluded-field rules."
                    },
                    {
                      "value": "fields.captured",
                      "description": "includes the captured fields, keyed by field name with the detected type."
                    },
                    {
                      "value": "fields.excluded",
                      "description": "includes the excluded field names and wildcard rules."
                    },
                    {
                      "value": "meta",
                      "description": "includes all submission timestamps in UTC."
                    },
                    {
                      "value": "meta.first_submission_at",
                      "description": "includes the earliest submission timestamp."
                    },
                    {
                      "value": "meta.last_submission_at",
                      "description": "includes the most recent submission timestamp."
                    },
                    {
                      "value": "page",
                      "description": "includes every page attribute, adding `form_action` to the default `page` object."
                    },
                    {
                      "value": "page.form_action",
                      "description": "includes the submit target of the form."
                    },
                    {
                      "value": "summary",
                      "description": "includes all submission counts."
                    },
                    {
                      "value": "summary.submission_count",
                      "description": "includes the number of recorded submissions."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Summary, meta, and fields are omitted unless requested."
              ],
              "example": "summary.submission_count,meta,fields.excluded"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFormDetailsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The updated form.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrackedForm"
                }
              }
            }
          },
          "204": {
            "description": "Sample-mode target: acknowledged without a write."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityFormsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/forms/{formId}/fields/{fieldKey}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Forms"
        ],
        "summary": "Read one tracked-form field",
        "description": "Returns one field of a tracked form by its key, the same representation as one item of GET /orgs/{orgId}/projects/{projectId}/forms/{formId}/fields. `fieldKey` is a field name from that list. A key that is not among the form’s captured fields is reported as 404.",
        "operationId": "getTrackedFormFieldWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "formId",
            "in": "path",
            "required": true,
            "description": "Tracked-form ID (UUIDv7), the `id` returned by the forms list. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fieldKey",
            "in": "path",
            "required": true,
            "description": "Key of the field to read, from the form fields list.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The form field.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormField"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "FormsRead or ActivityFormsRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project, form, or field not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Forms"
        ],
        "summary": "Rename a tracked-form field",
        "description": "Renames one submitted field of a tracked form, setting the display label used when its submissions are rendered or exported. `fieldKey` is a field name returned by GET /orgs/{orgId}/projects/{projectId}/forms/{formId}/fields. Returns the updated field list, the same representation that endpoint returns.",
        "operationId": "updateTrackedFormFieldWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "formId",
            "in": "path",
            "required": true,
            "description": "Tracked-form ID (UUIDv7), the `id` returned by the forms list. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fieldKey",
            "in": "path",
            "required": true,
            "description": "Key of the submitted field being renamed, from the form fields list.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFormFieldRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The updated field list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormFieldsResponse"
                }
              }
            }
          },
          "204": {
            "description": "Sample-mode target: acknowledged without a write."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "ActivityFormsUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project, or form not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/fields": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Fields"
        ],
        "summary": "List project fields",
        "description": "Returns one cursor-paginated page of the project’s active and archived fields. Each `id` uses the UUIDv7 format; `key` is the immutable server-generated storage key.",
        "operationId": "getProjectFieldsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all metadata.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n• `meta.updated_by` — includes the user ID of the last updater, or null for a system change.\n• `summary` — includes all usage counts.\n• `summary.integration_count` — includes the number of integration types.\n• `summary.report_count` — includes the number of report references.\n• `summary.workflow_count` — includes the number of workflow references.\n• `usage` — includes existing workflow and report references plus integration names. Collections also include built-in field references in `system_field_usage`.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta, summary, and usage are omitted unless requested. Archived properties return zero summary counts and empty usage arrays.\n\nExample: `usage,meta.updated_at`",
            "x-placeholder": "Example: usage,meta.updated_at",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all metadata."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_by",
                      "description": "includes the user ID of the last updater, or null for a system change."
                    },
                    {
                      "value": "summary",
                      "description": "includes all usage counts."
                    },
                    {
                      "value": "summary.integration_count",
                      "description": "includes the number of integration types."
                    },
                    {
                      "value": "summary.report_count",
                      "description": "includes the number of report references."
                    },
                    {
                      "value": "summary.workflow_count",
                      "description": "includes the number of workflow references."
                    },
                    {
                      "value": "usage",
                      "description": "includes existing workflow and report references plus integration names. Collections also include built-in field references in `system_field_usage`."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta, summary, and usage are omitted unless requested. Archived properties return zero summary counts and empty usage arrays."
              ],
              "example": "usage,meta.updated_at"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum fields to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Custom-property list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomPropertyListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "CustomPropertyRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Fields"
        ],
        "summary": "Create a project field",
        "description": "Creates a field in the project. The server generates the immutable `key`; clients send only the mutable fields documented in the request schema. A name already in use is refused. Creation is rejected with a validation problem on `name` if the generated key, including its prefix and any collision suffix, exceeds 100 characters.",
        "operationId": "createProjectFieldWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomPropertyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Field created. Location contains its Web API URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomProperty"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, including an unknown input field.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "CustomPropertyCreate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "A field with the same name exists. The problem carries field_id, the ID (UUIDv7) of the existing field.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Fields"
        ],
        "summary": "Archive or delete project fields",
        "description": "Send `field_ids` containing the IDs (UUIDv7) of the fields to remove. Fields with stored call values are archived; unused fields are deleted. While any workflow (active, inactive or draft) names one of the fields in a rule or action, the request fails with code 406000145, `field_ids` listing the fields in use and `workflows` listing each workflow's `id` and `name`, and no field is removed; remove the fields from those workflows first.",
        "operationId": "deleteProjectFieldsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/FieldIdsRequest"
        },
        "responses": {
          "204": {
            "description": "Fields archived or deleted."
          },
          "400": {
            "description": "Invalid field_ids or an unknown input field.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "CustomPropertyDelete permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "One or more fields were not found in this project (CustomPropertyNotFound), or workflows still use one of them (CustomFieldInUse, code 406000145, with `field_ids` and `workflows`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/fields:restore": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Fields"
        ],
        "summary": "Restore project fields",
        "description": "Send `field_ids` containing the IDs (UUIDv7) of archived fields to restore. Every selected field must belong to this project and be archived.",
        "operationId": "restoreProjectFieldsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/FieldIdsRequest"
        },
        "responses": {
          "204": {
            "description": "Fields restored."
          },
          "400": {
            "description": "Invalid field_ids or an unknown input field.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "CustomPropertyCreate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "One or more fields were not found or are not archived.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/fields/{fieldId}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Fields"
        ],
        "summary": "Get a project field",
        "description": "Returns one field, addressed by its ID (UUIDv7).",
        "operationId": "getProjectFieldWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all metadata.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n• `meta.updated_by` — includes the user ID of the last updater, or null for a system change.\n• `summary` — includes all usage counts.\n• `summary.integration_count` — includes the number of integration types.\n• `summary.report_count` — includes the number of report references.\n• `summary.workflow_count` — includes the number of workflow references.\n• `usage` — includes existing workflow and report references plus integration names. Collections also include built-in field references in `system_field_usage`.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta, summary, and usage are omitted unless requested. Archived properties return zero summary counts and empty usage arrays.\n\nExample: `usage,meta.updated_at`",
            "x-placeholder": "Example: usage,meta.updated_at",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all metadata."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_by",
                      "description": "includes the user ID of the last updater, or null for a system change."
                    },
                    {
                      "value": "summary",
                      "description": "includes all usage counts."
                    },
                    {
                      "value": "summary.integration_count",
                      "description": "includes the number of integration types."
                    },
                    {
                      "value": "summary.report_count",
                      "description": "includes the number of report references."
                    },
                    {
                      "value": "summary.workflow_count",
                      "description": "includes the number of workflow references."
                    },
                    {
                      "value": "usage",
                      "description": "includes existing workflow and report references plus integration names. Collections also include built-in field references in `system_field_usage`."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta, summary, and usage are omitted unless requested. Archived properties return zero summary counts and empty usage arrays."
              ],
              "example": "usage,meta.updated_at"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Field.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomProperty"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "CustomPropertyRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Field not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Fields"
        ],
        "summary": "Update a project field",
        "description": "Updates a field. Send only the mutable fields to change. Omitted fields remain unchanged, `description: null` clears the description, and `options: []` clears list options. The server-owned `key` never changes.",
        "operationId": "updateProjectFieldWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCustomPropertyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated field.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomProperty"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, including an unknown input field.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "CustomPropertyUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Field not found, duplicate name, or the body carried no change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Fields"
        ],
        "summary": "Archive or delete a project field",
        "description": "Removes a field. A field whose `key` already appears in call data is archived (`is_archived = true`) so historical values stay readable; an unused one is deleted outright. While any workflow (active, inactive or draft) names the field in a rule or action, the request fails with code 406000145, `field_ids` and `workflows` listing each workflow's `id` and `name`; remove the field from those workflows first.",
        "operationId": "deleteProjectFieldWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Field archived or deleted."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "CustomPropertyDelete permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Field not found (CustomPropertyNotFound), or workflows still use the field (CustomFieldInUse, code 406000145, with `field_ids` and `workflows`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/fields/{fieldId}/options": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Fields"
        ],
        "summary": "Append custom field options",
        "description": "Atomically appends choices to an active list field without removing or replacing existing choices. Identical existing value/label pairs are successful no-ops. Conflicting values or labels (compared ignoring case) reject the entire request. Concurrent append requests are serialized. PUT on the field still replaces the full option list.",
        "operationId": "appendProjectFieldOptionsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppendFieldOptionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated field and number of options added; zero for an identical retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppendFieldOptionsResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON or a non-object body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "CustomPropertyUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or field not found in scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "CustomFieldArchived (the field is archived), CustomFieldNotList (only list fields have options) or CustomFieldOptionConflict (an option reuses the value or label of a different existing option, ignoring case). The problem message gives the detail; no options are added.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must identify JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input; no options are added.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/webhooks": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Webhooks"
        ],
        "summary": "List project webhooks",
        "description": "Returns one cursor-paginated page of the project’s webhooks in delivery order. Requires the IntegrationWebhookRead permission and the Webhook plan feature.",
        "operationId": "getProjectWebhooksWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum webhooks to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not modify it.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all timestamps.\n• `meta.created_at` — includes the creation timestamp in UTC.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta is omitted unless requested.\n\nExample: `meta.updated_at`",
            "x-placeholder": "Example: meta.updated_at",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.created_at",
                      "description": "includes the creation timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta is omitted unless requested."
              ],
              "example": "meta.updated_at"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationWebhookRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Webhook plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Webhooks"
        ],
        "summary": "Create a project webhook",
        "description": "Creates a webhook at the end of the project’s list. The endpoint must be an https URL on a public host. A new webhook receives events once a workflow step points at it. Requires the IntegrationWebhookUpdate permission and the Webhook plan feature.",
        "operationId": "createProjectWebhookWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all timestamps.\n• `meta.created_at` — includes the creation timestamp in UTC.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta is omitted unless requested.\n\nExample: `meta.updated_at`",
            "x-placeholder": "Example: meta.updated_at",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.created_at",
                      "description": "includes the creation timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta is omitted unless requested."
              ],
              "example": "meta.updated_at"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationWebhookUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Webhook plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must identify JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input: unknown field, missing value, refused endpoint URL (400000103 to 400000107), a missing secret, or `other` auth with no `extra_params` and no query string in the endpoint URL (400000157).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/webhooks:copy": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Webhooks"
        ],
        "summary": "Copy webhooks to other projects",
        "description": "Copies webhooks of the project into each target project of the same organization. Copying a webhook again updates the earlier copy instead of adding another, so workflows in the target keep working. Each target is copied completely or not at all; `failed` lists targets left unchanged with a problem code (406000128 when the event type would change on a copy a workflow uses, 406000126 when a copied webhook was deleted while the request ran, 406000130 otherwise). Requires the IntegrationWebhookUpdate permission on the source and every target, and the Webhook plan feature.",
        "operationId": "copyProjectWebhooksWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CopyWebhooksRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Copy outcome per target.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CopyWebhooksResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationWebhookUpdate permission is required on the source and every target.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Webhook plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must identify JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input: unknown field, a webhook that is not one of the project’s, a target project that does not exist in the organization, or the source project listed as a target.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/webhooks:fields": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhook payload fields",
        "description": "Returns the fields a webhook payload can send for the project’s events: built-in fields plus, for call events, the project’s custom fields, custom parameters, tracking cookies and local storage keys, sorted by event type and then label. Use a field’s `field` value in a webhook’s `payload.fields[].field`. The list depends on the project, so read it again after adding custom fields or parameters. Requires the IntegrationWebhookRead permission and the Webhook plan feature.",
        "operationId": "getProjectWebhookFieldsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "event_type",
            "in": "query",
            "required": false,
            "description": "Only the fields of this event type, which matches a webhook’s `event_type`. Omit to list all three.",
            "schema": {
              "type": "string",
              "enum": [
                "call",
                "form",
                "sms"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook payload fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookFieldListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationWebhookRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Webhook plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "`event_type` is unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/webhooks/{webhookId}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Webhooks"
        ],
        "summary": "Get a project webhook",
        "description": "Returns one webhook, addressed by its ID (UUIDv7).",
        "operationId": "getProjectWebhookWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all timestamps.\n• `meta.created_at` — includes the creation timestamp in UTC.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta is omitted unless requested.\n\nExample: `meta.updated_at`",
            "x-placeholder": "Example: meta.updated_at",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.created_at",
                      "description": "includes the creation timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta is omitted unless requested."
              ],
              "example": "meta.updated_at"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationWebhookRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or webhook not found (code 406000126 for the webhook).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Webhook plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Webhooks"
        ],
        "summary": "Update a project webhook",
        "description": "Updates a webhook. Send only the fields to change; omitted fields stay as they are. `auth` and `extra_params`, when sent, replace the stored values, but an omitted secret keeps the saved one while the endpoint URL (origin, path and query) and auth type are unchanged. After such a change every saved secret must be sent again (validation code 400000109). `event_type` cannot change while a workflow uses the webhook (code 406000128 with `workflow_ids`). Requires the IntegrationWebhookUpdate permission and the Webhook plan feature.",
        "operationId": "updateProjectWebhookWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all timestamps.\n• `meta.created_at` — includes the creation timestamp in UTC.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta is omitted unless requested.\n\nExample: `meta.updated_at`",
            "x-placeholder": "Example: meta.updated_at",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.created_at",
                      "description": "includes the creation timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta is omitted unless requested."
              ],
              "example": "meta.updated_at"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationWebhookUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or webhook not found (code 406000126 for the webhook).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The event type cannot change while workflows use the webhook (code 406000128 with `workflow_ids`), or FeatureNotIncludedInCurrentPlan when the Webhook plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must identify JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input: unknown field, null or invalid value, refused endpoint URL (400000103 to 400000107), a secret that must be sent again (400000109), or `other` auth with no `extra_params` and no query string in the endpoint URL (400000157).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Webhooks"
        ],
        "summary": "Delete a project webhook",
        "description": "Deletes a webhook that no workflow uses. While any workflow (active, inactive or draft) points at it, the request fails with code 406000127 and a `workflow_ids` list; remove the webhook from those workflows first. Requires the IntegrationWebhookUpdate permission and the Webhook plan feature.",
        "operationId": "deleteProjectWebhookWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Webhook deleted."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationWebhookUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or webhook not found (code 406000126 for the webhook).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Workflows still use the webhook (code 406000127 with `workflow_ids`), or FeatureNotIncludedInCurrentPlan when the Webhook plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/calls/{callId}/integration-events": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Integration Events"
        ],
        "summary": "List call integration deliveries",
        "description": "Returns what Nimbata sent to integrations for one call, with the result of every attempt: Meta, Google Ads, HubSpot, webhooks and the rest, including Google Ads conversions still waiting for upload. One item per delivery, an integration and event pair, newest first by `last_attempted_at`. Every attempt of the delivery is listed, oldest first. The list is not paged. A call that exists but has no recorded delivery returns an empty list, as does one older than the 365-day retention. Requires the AuditLogRead permission on the project and the Integration Events plan feature; the activity permission for the call is not needed.",
        "operationId": "getCallIntegrationEventsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call id: `uu_id_a` of an inbound call, or the outbound call id.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `attempts.request_details` — includes `request_details` on each attempt: request metadata such as the endpoint and method, with credentials redacted. The target URL of a Zapier, Make or Cometly delivery is never included.\n• `attempts.request_payload` — includes `request_payload` on each attempt: the body Nimbata sent to the integration, with credentials redacted.\n• `attempts.response` — includes `response` on each attempt: what the integration answered with. It is the integration’s own text.\n\nBodies are omitted unless requested. Name each body: there is no `attempts` include that adds all of them.\n\nExample: `attempts.response`",
            "x-placeholder": "Example: attempts.response",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "attempts.request_details",
                      "description": "includes `request_details` on each attempt: request metadata such as the endpoint and method, with credentials redacted. The target URL of a Zapier, Make or Cometly delivery is never included."
                    },
                    {
                      "value": "attempts.request_payload",
                      "description": "includes `request_payload` on each attempt: the body Nimbata sent to the integration, with credentials redacted."
                    },
                    {
                      "value": "attempts.response",
                      "description": "includes `response` on each attempt: what the integration answered with. It is the integration’s own text."
                    }
                  ]
                }
              ],
              "notes": [
                "Bodies are omitted unless requested. Name each body: there is no `attempts` include that adds all of them."
              ],
              "example": "attempts.response"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The deliveries of the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationDeliveryListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "AuditLogRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or call not found. CallResourceNotFound (code 406000174) when the project has no such call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Integration Events plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "IntegrationEventLogUnavailable (406000173): the delivery log could not be read, which does not mean nothing was sent. Retry after the number of seconds in Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/form-submissions/{submissionId}/integration-events": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Integration Events"
        ],
        "summary": "List form submission integration deliveries",
        "description": "Returns what Nimbata sent to integrations for one form submission, with the result of every attempt. One item per delivery, an integration and event pair, newest first by `last_attempted_at`. Every attempt of the delivery is listed, oldest first. The list is not paged. A form submission that exists but has no recorded delivery returns an empty list, as does one older than the 365-day retention. Requires the AuditLogRead permission on the project and the Integration Events plan feature; the activity permission for the form submission is not needed.",
        "operationId": "getFormIntegrationEventsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "description": "Form submission ID (UUIDv7): the `id` of a form submission.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `attempts.request_details` — includes `request_details` on each attempt: request metadata such as the endpoint and method, with credentials redacted. The target URL of a Zapier, Make or Cometly delivery is never included.\n• `attempts.request_payload` — includes `request_payload` on each attempt: the body Nimbata sent to the integration, with credentials redacted.\n• `attempts.response` — includes `response` on each attempt: what the integration answered with. It is the integration’s own text.\n\nBodies are omitted unless requested. Name each body: there is no `attempts` include that adds all of them.\n\nExample: `attempts.response`",
            "x-placeholder": "Example: attempts.response",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "attempts.request_details",
                      "description": "includes `request_details` on each attempt: request metadata such as the endpoint and method, with credentials redacted. The target URL of a Zapier, Make or Cometly delivery is never included."
                    },
                    {
                      "value": "attempts.request_payload",
                      "description": "includes `request_payload` on each attempt: the body Nimbata sent to the integration, with credentials redacted."
                    },
                    {
                      "value": "attempts.response",
                      "description": "includes `response` on each attempt: what the integration answered with. It is the integration’s own text."
                    }
                  ]
                }
              ],
              "notes": [
                "Bodies are omitted unless requested. Name each body: there is no `attempts` include that adds all of them."
              ],
              "example": "attempts.response"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The deliveries of the form submission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationDeliveryListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "AuditLogRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or form submission not found. FormSubmissionResourceNotFound (code 406000175) when the project has no such form submission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Integration Events plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "IntegrationEventLogUnavailable (406000173): the delivery log could not be read, which does not mean nothing was sent. Retry after the number of seconds in Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/integration-events": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Integration Events"
        ],
        "summary": "List project integration events",
        "description": "Returns one cursor-paginated page of the project’s integration events: delivery attempts, queued Google Ads conversions and project-level integration events. Requires the AuditLogRead permission on the project and the Integration Events plan feature. Newest first by `attempted_at`. A page can hold fewer than `page_size` items while `page.next` is set, because a selective `filter[result]` reads a bounded number of stored events per page: keep following `page.next` until it is null.",
        "operationId": "getProjectIntegrationEventsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "filter[integration]",
            "in": "query",
            "required": false,
            "description": "Comma-separated integration names. Omit for every integration. Unknown names are refused. Names: `cometly` (Cometly), `criteo` (Criteo), `dynamics` (Microsoft Dynamics), `email` (Email Alerts), `facebook` (Meta), `ga` (Google Analytics), `gohighlevel` (GoHighLevel), `googleads` (Google Ads), `gsheets` (Google Sheets), `hubspot` (HubSpot), `jobber` (Jobber), `make` (Make), `microsoft` (Microsoft Ads), `openai_ads` (OpenAI Ads), `pipedrive` (Pipedrive), `salesforce` (Salesforce), `slack` (Slack), `webhook` (Webhook), `zapier` (Zapier), `zoho` (Zoho).",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "cometly",
                  "criteo",
                  "dynamics",
                  "email",
                  "facebook",
                  "ga",
                  "gohighlevel",
                  "googleads",
                  "gsheets",
                  "hubspot",
                  "jobber",
                  "make",
                  "microsoft",
                  "openai_ads",
                  "pipedrive",
                  "salesforce",
                  "slack",
                  "webhook",
                  "zapier",
                  "zoho"
                ]
              }
            }
          },
          {
            "name": "filter[result]",
            "in": "query",
            "required": false,
            "description": "Comma-separated results. Omit for every result except `queued`. `queued` lists the Google Ads conversions still waiting for upload; they are read from the upload queue, so `queued` cannot be combined with another result (code 400000133), and it returns no items when `filter[integration]` leaves out `googleads`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "success",
                  "failed",
                  "skipped",
                  "queued",
                  "unknown"
                ]
              }
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "required": false,
            "description": "First day of the reporting window, YYYY-MM-DD, inclusive, read as dates in the project's time zone (the organization's for an organization-wide request). Send it with `date_range[end_date]`; omit both to read every day the log keeps.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "required": false,
            "description": "Last day of the reporting window, YYYY-MM-DD, inclusive. See `date_range[start_date]`. An end before the start is refused (code 400000153).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum events to return. A missing or invalid value uses the default; a larger value is capped at the maximum.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not modify it. It is bound to the scope and the filters, so changing a filter means starting again without a cursor; `page_size` may change between pages.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `details` — includes `details` on each item: what a project-level event stored beyond its `detail`, with credentials redacted. Delivery attempts store nothing more, so theirs is an empty object.\n\nDetails are omitted unless requested.\n\nExample: `details`",
            "x-placeholder": "Example: details",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "details",
                      "description": "includes `details` on each item: what a project-level event stored beyond its `detail`, with credentials redacted. Delivery attempts store nothing more, so theirs is an empty object."
                    }
                  ]
                }
              ],
              "notes": [
                "Details are omitted unless requested."
              ],
              "example": "details"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of integration events.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationEventListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "AuditLogRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Integration Events plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "An unknown query parameter or filter, an unknown integration name or result, `queued` combined with another result (400000133), a `date_range` without both days or with a day that is not YYYY-MM-DD, a `date_range` ending before it starts (400000153), or a pagination cursor that is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "503": {
            "description": "IntegrationEventLogUnavailable (406000173): the delivery log could not be read. Retry after the number of seconds in Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/integration-events": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Integration Events"
        ],
        "summary": "List organization integration events",
        "description": "Returns one cursor-paginated page of the integration events of every project in the organization where the caller holds the AuditLogRead permission. Other projects are left out, and a caller who holds the permission on no project receives an empty page. Requires the Integration Events plan feature. Newest first by `attempted_at`. A page can hold fewer than `page_size` items while `page.next` is set, because a selective `filter[result]` reads a bounded number of stored events per page: keep following `page.next` until it is null.",
        "operationId": "getOrganizationIntegrationEventsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "filter[integration]",
            "in": "query",
            "required": false,
            "description": "Comma-separated integration names. Omit for every integration. Unknown names are refused. Names: `cometly` (Cometly), `criteo` (Criteo), `dynamics` (Microsoft Dynamics), `email` (Email Alerts), `facebook` (Meta), `ga` (Google Analytics), `gohighlevel` (GoHighLevel), `googleads` (Google Ads), `gsheets` (Google Sheets), `hubspot` (HubSpot), `jobber` (Jobber), `make` (Make), `microsoft` (Microsoft Ads), `openai_ads` (OpenAI Ads), `pipedrive` (Pipedrive), `salesforce` (Salesforce), `slack` (Slack), `webhook` (Webhook), `zapier` (Zapier), `zoho` (Zoho).",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "cometly",
                  "criteo",
                  "dynamics",
                  "email",
                  "facebook",
                  "ga",
                  "gohighlevel",
                  "googleads",
                  "gsheets",
                  "hubspot",
                  "jobber",
                  "make",
                  "microsoft",
                  "openai_ads",
                  "pipedrive",
                  "salesforce",
                  "slack",
                  "webhook",
                  "zapier",
                  "zoho"
                ]
              }
            }
          },
          {
            "name": "filter[result]",
            "in": "query",
            "required": false,
            "description": "Comma-separated results. Omit for every result except `queued`. `queued` lists the Google Ads conversions still waiting for upload; they are read from the upload queue, so `queued` cannot be combined with another result (code 400000133), and it returns no items when `filter[integration]` leaves out `googleads`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "success",
                  "failed",
                  "skipped",
                  "queued",
                  "unknown"
                ]
              }
            }
          },
          {
            "name": "date_range[start_date]",
            "in": "query",
            "required": false,
            "description": "First day of the reporting window, YYYY-MM-DD, inclusive, read as dates in the project's time zone (the organization's for an organization-wide request). Send it with `date_range[end_date]`; omit both to read every day the log keeps.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_range[end_date]",
            "in": "query",
            "required": false,
            "description": "Last day of the reporting window, YYYY-MM-DD, inclusive. See `date_range[start_date]`. An end before the start is refused (code 400000153).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum events to return. A missing or invalid value uses the default; a larger value is capped at the maximum.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not modify it. It is bound to the scope and the filters, so changing a filter means starting again without a cursor; `page_size` may change between pages.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `details` — includes `details` on each item: what a project-level event stored beyond its `detail`, with credentials redacted. Delivery attempts store nothing more, so theirs is an empty object.\n\nDetails are omitted unless requested.\n\nExample: `details`",
            "x-placeholder": "Example: details",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "details",
                      "description": "includes `details` on each item: what a project-level event stored beyond its `detail`, with credentials redacted. Delivery attempts store nothing more, so theirs is an empty object."
                    }
                  ]
                }
              ],
              "notes": [
                "Details are omitted unless requested."
              ],
              "example": "details"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of integration events.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationEventListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The organization is not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Integration Events plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "An unknown query parameter or filter, an unknown integration name or result, `queued` combined with another result (400000133), a `date_range` without both days or with a day that is not YYYY-MM-DD, a `date_range` ending before it starts (400000153), or a pagination cursor that is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "503": {
            "description": "IntegrationEventLogUnavailable (406000173): the delivery log could not be read. Retry after the number of seconds in Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/email-alerts": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Email Alerts"
        ],
        "summary": "List project email alerts",
        "description": "Returns one cursor-paginated page of the project’s email alerts in the order the app lists them. Requires the IntegrationEmailRead permission and the Email plan feature.",
        "operationId": "getProjectEmailAlertsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum email alerts to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not modify it.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all timestamps.\n• `meta.created_at` — includes the creation timestamp in UTC.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta is omitted unless requested.\n\nExample: `meta.updated_at`",
            "x-placeholder": "Example: meta.updated_at",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.created_at",
                      "description": "includes the creation timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta is omitted unless requested."
              ],
              "example": "meta.updated_at"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Email alert list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailAlertListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationEmailRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Email plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Email Alerts"
        ],
        "summary": "Create a project email alert",
        "description": "Creates an email alert at the end of the project’s list. Fields left out take the defaults the app gives a new alert. A new alert sends email once a workflow step points at it. A project holds at most 25 email alerts. Requires the IntegrationEmailUpdate permission and the Email plan feature.",
        "operationId": "createProjectEmailAlertWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all timestamps.\n• `meta.created_at` — includes the creation timestamp in UTC.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta is omitted unless requested.\n\nExample: `meta.updated_at`",
            "x-placeholder": "Example: meta.updated_at",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.created_at",
                      "description": "includes the creation timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta is omitted unless requested."
              ],
              "example": "meta.updated_at"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEmailAlertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created email alert.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailAlert"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationEmailUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "EmailAlertLimitReached (406000191) when the project already holds 25 email alerts, or FeatureNotIncludedInCurrentPlan when the Email plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must identify JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input: an unknown field (including release 1’s `greeting`, `fields` and `include_*`), a missing or invalid value, an address that fails validation (400000021), a `%field%` variable the alert’s field list does not have or a section token outside a `call` alert’s body (400000137, naming the variable in `token`), or `%recording_link%` in the body of a `call` alert in a HIPAA organization (400000138, naming it in `token`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/email-alerts:copy": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Email Alerts"
        ],
        "summary": "Copy email alerts to other projects",
        "description": "Copies email alerts of the project into each target project of the same organization. Copying an alert again updates the earlier copy instead of adding another, so workflows in the target keep working; other alerts are added at the end of the target’s list. A copy keeps the alert’s recipients, settings, subject and body as they are (`%recording_link%` included, also in a HIPAA organization, where it sends no recording link); `%field%` variables for fields the target project does not have (the source project’s own custom fields, custom parameters, tracking cookies and local storage keys) stay in the text as typed. Each target is copied completely or not at all; `failed` lists targets left unchanged with a problem code (406000189 when the event type would change on a copy a workflow uses, 406000191 when the target would hold more than 25 email alerts, 406000190 otherwise). Requires the IntegrationEmailUpdate permission on the source and every target, and the Email plan feature.",
        "operationId": "copyProjectEmailAlertsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CopyEmailAlertsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Copy outcome per target.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CopyEmailAlertsResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationEmailUpdate permission is required on the source and every target.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Email plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must identify JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input: unknown field, an email alert that is not one of the project’s, a target project that does not exist in the organization, or the source project listed as a target.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/email-alerts:fields": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Email Alerts"
        ],
        "summary": "List email alert fields",
        "description": "Returns the fields an email alert can name for the project’s events: built-in fields plus, for call events, the project’s custom fields, custom parameters, tracking cookies and local storage keys, sorted by event type and then label. Call events end with the three section tokens (kind `section`): `recording_link`, `transcription` and `activity_link`, which place the Listen link, the call transcription and the Go to Activity link in a call alert’s body. Use a field’s `field` value as `%field%` in an alert’s subject and body; a section token only in a call alert’s body. The list depends on the project, so read it again after adding custom fields or parameters. Requires the IntegrationEmailRead permission and the Email plan feature.",
        "operationId": "getProjectEmailAlertFieldsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "event_type",
            "in": "query",
            "required": false,
            "description": "Only the fields of this event type, which matches an email alert’s `event_type`. Omit to list all three.",
            "schema": {
              "type": "string",
              "enum": [
                "call",
                "form",
                "sms"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Email alert fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailAlertFieldListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationEmailRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Email plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "`event_type` is unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/email-alerts/{emailAlertId}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Email Alerts"
        ],
        "summary": "Get a project email alert",
        "description": "Returns one email alert, addressed by its ID (UUIDv7).",
        "operationId": "getProjectEmailAlertWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "emailAlertId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all timestamps.\n• `meta.created_at` — includes the creation timestamp in UTC.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta is omitted unless requested.\n\nExample: `meta.updated_at`",
            "x-placeholder": "Example: meta.updated_at",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.created_at",
                      "description": "includes the creation timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta is omitted unless requested."
              ],
              "example": "meta.updated_at"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Email alert.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailAlert"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationEmailRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or email alert not found (code 406000187 for the email alert).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Email plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Email Alerts"
        ],
        "summary": "Update a project email alert",
        "description": "Updates an email alert; the change applies to the next email it sends. Send only the fields to change; omitted fields stay as they are, and a sent list replaces the stored one. Only the values sent are checked, so a stored subject or body naming a field the project no longer has does not block another change. `event_type` cannot change while any workflow (active, inactive or draft) uses the alert (code 406000189 with `workflow_ids`). Changing it resets `subject` and `body` to the new type’s defaults unless they are sent too. `is_valid` is checked again only when `to` or `cc` is sent. Requires the IntegrationEmailUpdate permission and the Email plan feature.",
        "operationId": "updateProjectEmailAlertWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "emailAlertId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all timestamps.\n• `meta.created_at` — includes the creation timestamp in UTC.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta is omitted unless requested.\n\nExample: `meta.updated_at`",
            "x-placeholder": "Example: meta.updated_at",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.created_at",
                      "description": "includes the creation timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta is omitted unless requested."
              ],
              "example": "meta.updated_at"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEmailAlertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated email alert.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailAlert"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationEmailUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or email alert not found (code 406000187 for the email alert).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "EmailAlertEventTypeLocked (406000189) when `event_type` changes while workflows use the alert, with their IDs in `workflow_ids`, or FeatureNotIncludedInCurrentPlan when the Email plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must identify JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input: an unknown field (including `id`, `project_id`, `is_valid` and `meta` echoed from a read, and release 1’s `greeting`, `fields` and `include_*`), a null or invalid value, an address that fails validation (400000021), a `%field%` variable the alert’s field list does not have or a section token outside a `call` alert’s body (400000137, naming the variable in `token`), or a body that adds `%recording_link%` to a `call` alert in a HIPAA organization (400000138, naming it in `token`; a body that already holds it stays saveable and sends no recording link). Sent values are checked against the event type the alert will have.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Email Alerts"
        ],
        "summary": "Delete a project email alert",
        "description": "Deletes an email alert that no workflow uses. While any workflow (active, inactive or draft) points at it, the request fails with code 406000188 and a `workflow_ids` list; remove the email alert from those workflows first. The project’s other email alerts keep their order. Requires the IntegrationEmailUpdate permission and the Email plan feature.",
        "operationId": "deleteProjectEmailAlertWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "emailAlertId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Email alert deleted."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationEmailUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or email alert not found (code 406000187 for the email alert).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Workflows still use the email alert (code 406000188 with `workflow_ids`), or FeatureNotIncludedInCurrentPlan when the Email plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/slack-alerts": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Slack Alerts"
        ],
        "summary": "List project Slack alerts",
        "description": "Returns one cursor-paginated page of the project’s Slack alerts in the order the app lists them. Requires the IntegrationSlackRead permission and the Slack plan feature.",
        "operationId": "getProjectSlackAlertsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum Slack alerts to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not modify it.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all timestamps.\n• `meta.created_at` — includes the creation timestamp in UTC.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta is omitted unless requested.\n\nExample: `meta.updated_at`",
            "x-placeholder": "Example: meta.updated_at",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.created_at",
                      "description": "includes the creation timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta is omitted unless requested."
              ],
              "example": "meta.updated_at"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Slack alert list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackAlertListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationSlackRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Slack plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Slack Alerts"
        ],
        "summary": "Create a project Slack alert",
        "description": "Creates a Slack alert at the end of the project’s list. Fields left out take the defaults the app gives a new alert. A new alert posts once a workflow step points at it and it has a channel. A project holds at most 25 Slack alerts. Requires the IntegrationSlackUpdate permission and the Slack plan feature.",
        "operationId": "createProjectSlackAlertWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all timestamps.\n• `meta.created_at` — includes the creation timestamp in UTC.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta is omitted unless requested.\n\nExample: `meta.updated_at`",
            "x-placeholder": "Example: meta.updated_at",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.created_at",
                      "description": "includes the creation timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta is omitted unless requested."
              ],
              "example": "meta.updated_at"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSlackAlertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created Slack alert.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackAlert"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationSlackUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "SlackAlertLimitReached (406000203) when the project already holds 25 Slack alerts, or FeatureNotIncludedInCurrentPlan when the Slack plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must identify JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input: an unknown field, a missing or invalid value, a `%field%` variable in `text` or a bot name `field` part the project’s field list does not have (400000139, naming it in `token`), or an alert with neither `text` nor `fields` (400000140).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/slack-alerts:copy": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Slack Alerts"
        ],
        "summary": "Copy Slack alerts to other projects",
        "description": "Copies Slack alerts of the project into each target project of the same organization. Copying an alert again updates the earlier copy instead of adding another, so workflows in the target keep working; other alerts are added at the end of the target’s list. A copy keeps the alert’s channel, which posts only when the target project is connected to the same Slack workspace; `%field%` variables for fields the target project does not have stay in the text as typed. Each target is copied completely or not at all; `failed` lists targets left unchanged with a problem code (406000203 when the target would hold more than 25 Slack alerts, 406000202 otherwise). Requires the IntegrationSlackUpdate permission on the source and every target, and the Slack plan feature.",
        "operationId": "copyProjectSlackAlertsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CopySlackAlertsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Copy outcome per target.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CopySlackAlertsResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationSlackUpdate permission is required on the source and every target.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Slack plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must identify JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input: unknown field, a Slack alert that is not one of the project’s, a target project that does not exist in the organization, or the source project listed as a target.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/slack-alerts:fields": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Slack Alerts"
        ],
        "summary": "List Slack alert fields",
        "description": "Returns the call fields a Slack alert can name: built-in fields plus the project’s custom fields, custom parameters, tracking cookies and local storage keys, sorted by label. Use a field’s `field` value as `%field%` in an alert’s `text`, as a bot name `field` part, or as a field row’s `field`. The list depends on the project, so read it again after adding custom fields or parameters. Requires the IntegrationSlackRead permission and the Slack plan feature.",
        "operationId": "getProjectSlackAlertFieldsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "event_type",
            "in": "query",
            "required": false,
            "description": "Slack alerts are sent for calls only, so the list holds call fields only.",
            "schema": {
              "type": "string",
              "enum": [
                "call"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Slack alert fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackAlertFieldListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationSlackRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Slack plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "`event_type` is not `call`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/slack-alerts:channels": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Slack Alerts"
        ],
        "summary": "List Slack channels",
        "description": "Returns the channels of the project’s connected Slack workspace, by name, for choosing a Slack alert’s `channel_id`: public channels, and private channels the Nimbata app was added to. Requires the IntegrationSlackRead permission and the Slack plan feature.",
        "operationId": "getProjectSlackAlertChannelsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Slack channels.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackChannelListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationSlackRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "SlackNotConnected (4230000002) when the project has no Slack connection, or FeatureNotIncludedInCurrentPlan when the Slack plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/slack-alerts/{slackAlertId}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Slack Alerts"
        ],
        "summary": "Get a project Slack alert",
        "description": "Returns one Slack alert, addressed by its ID (UUIDv7).",
        "operationId": "getProjectSlackAlertWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "slackAlertId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all timestamps.\n• `meta.created_at` — includes the creation timestamp in UTC.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta is omitted unless requested.\n\nExample: `meta.updated_at`",
            "x-placeholder": "Example: meta.updated_at",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.created_at",
                      "description": "includes the creation timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta is omitted unless requested."
              ],
              "example": "meta.updated_at"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Slack alert.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackAlert"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationSlackRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or Slack alert not found (code 406000200 for the Slack alert).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Slack plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Slack Alerts"
        ],
        "summary": "Update a project Slack alert",
        "description": "Updates a Slack alert; the change applies to the next message it posts. Send only the fields to change; omitted fields stay as they are, and a sent list replaces the stored one. Only the values sent are checked, so stored text naming a field the project no longer has does not block another change. Sending a `channel_id` makes an alert whose channel Slack reported gone (`is_valid` false) post again. Requires the IntegrationSlackUpdate permission and the Slack plan feature.",
        "operationId": "updateProjectSlackAlertWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "slackAlertId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all timestamps.\n• `meta.created_at` — includes the creation timestamp in UTC.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta is omitted unless requested.\n\nExample: `meta.updated_at`",
            "x-placeholder": "Example: meta.updated_at",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.created_at",
                      "description": "includes the creation timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta is omitted unless requested."
              ],
              "example": "meta.updated_at"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSlackAlertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated Slack alert.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackAlert"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationSlackUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or Slack alert not found (code 406000200 for the Slack alert).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Slack plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must identify JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input: an unknown field (including `id`, `project_id`, `is_valid` and `meta` echoed from a read), a null (except `channel_id`) or invalid value, a `%field%` variable in `text` or a bot name `field` part the project’s field list does not have (400000139, naming it in `token`), or a change that leaves the alert with neither `text` nor `fields` (400000140).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Slack Alerts"
        ],
        "summary": "Delete a project Slack alert",
        "description": "Deletes a Slack alert that no workflow uses. While any workflow (active, inactive or draft) points at it, the request fails with code 406000201 and a `workflow_ids` list; remove the Slack alert from those workflows first. The project’s other Slack alerts keep their order. Requires the IntegrationSlackUpdate permission and the Slack plan feature.",
        "operationId": "deleteProjectSlackAlertWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "slackAlertId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Slack alert deleted."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IntegrationSlackUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or Slack alert not found (code 406000200 for the Slack alert).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Workflows still use the Slack alert (code 406000201 with `workflow_ids`), or FeatureNotIncludedInCurrentPlan when the Slack plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/workflows": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Workflows"
        ],
        "summary": "Create a workflow",
        "description": "Creates a workflow at the end of the project’s run order. It is created off, so nothing runs until :publish. A step for an integration the project has not set up, or for a configuration it does not have, is saved with `is_valid` false, and `include=review` lists what it needs; any other value the project does not have is refused with 422. An AI tag step with `generate_missing_tags` asks the AI which tags its prompt names and creates the ones the project lacks, and a save creates the AI preset fields a step writes to, even when the caller could not create tags or fields directly. Repeating the request creates another workflow. Requires the WorkflowCreate permission and the Workflows plan feature.",
        "operationId": "createProjectWorkflowWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes when and by whom the workflow was last changed.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n• `meta.updated_by` — includes the ID (UUIDv7) of the user who last changed it.\n• `review` — includes `review`: what a workflow that is not valid must fix before it can be turned on.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta and review are omitted unless requested.\n\nExample: `review`",
            "x-placeholder": "Example: review",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes when and by whom the workflow was last changed."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_by",
                      "description": "includes the ID (UUIDv7) of the user who last changed it."
                    },
                    {
                      "value": "review",
                      "description": "includes `review`: what a workflow that is not valid must fix before it can be turned on."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta and review are omitted unless requested."
              ],
              "example": "review"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkflowRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created workflow, with what its AI tag prompts created.",
            "headers": {
              "Location": {
                "description": "The URL of the new workflow.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "The workflow’s version, the same value as its `etag`. An update sends it back in `If-Match`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSavedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "WorkflowCreate permission is required, or WorkflowIntegrationAccessRequired (4130000017) when a step names an integration the caller cannot read, or holds a `restricted` placeholder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Workflows plan feature is not included in the organization’s current plan, or a step’s integration is not; WorkflowWebhookReferenceUnknown (406000132) when a webhook a step names was deleted while saving, with `webhook_ids`, or WorkflowEmailAlertReferenceUnknown (406000192) when a step names an email alert the project does not have, with `email_alert_ids`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must identify JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input: an unknown field (including `id`, `is_active`, `etag` and the other read-only fields of a read), a missing or invalid value, or a definition the catalog does not allow. Each problem’s `pointer` names the value, such as `/stages/0/rules/call_duration/operA`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Workflows"
        ],
        "summary": "List project workflows",
        "description": "Returns one cursor-paginated page of the project’s workflows in run order (`execution_order`). A list can lag a save by a moment, so read the workflow itself for an `etag` to update it with right after saving it. Requires the WorkflowRead permission and the Workflows plan feature.",
        "operationId": "getProjectWorkflowsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum workflows to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not modify it.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes when and by whom the workflow was last changed.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n• `meta.updated_by` — includes the ID (UUIDv7) of the user who last changed it.\n• `review` — includes `review`: what a workflow that is not valid must fix before it can be turned on.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta and review are omitted unless requested.\n\nExample: `review`",
            "x-placeholder": "Example: review",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes when and by whom the workflow was last changed."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_by",
                      "description": "includes the ID (UUIDv7) of the user who last changed it."
                    },
                    {
                      "value": "review",
                      "description": "includes `review`: what a workflow that is not valid must fix before it can be turned on."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta and review are omitted unless requested."
              ],
              "example": "review"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "WorkflowRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Workflows plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Workflows"
        ],
        "summary": "Delete workflows",
        "description": "Deletes workflows of the project, all or none. A workflow that is on must be turned off first: the request fails with WorkflowActive (406000197), `workflow_ids` listing the ones that are on, and nothing is deleted. An ID that names no workflow of the project is ignored, so repeating the request succeeds. A delete cannot be undone. Requires the WorkflowDelete permission; it needs neither the Workflows plan feature nor a subscription in good standing.",
        "operationId": "deleteProjectWorkflowsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteWorkflowsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Workflows deleted."
          },
          "400": {
            "description": "Malformed JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "WorkflowDelete permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "WorkflowActive (406000197): a workflow is on. `workflow_ids` lists them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must identify JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input: an unknown field, an empty list or an ID that is not a UUIDv7.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/workflows:describe": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Workflows"
        ],
        "summary": "Describe what a workflow can hold",
        "description": "Returns the `catalog` of what a workflow definition can hold, the same for every project; the project’s `values` a definition can name; and `readiness`, the facts recording and transcription steps depend on. A `values_from` or `keys_from` in the catalog names the list in `values` and the field of its items that the definition stores. Integrations the caller cannot read are left out of `values`. Requires the WorkflowRead permission and the Workflows plan feature.",
        "operationId": "describeProjectWorkflowsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The catalog, the project’s values and readiness.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDescribeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "WorkflowRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Workflows plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/workflows:reorder": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Workflows"
        ],
        "summary": "Set the run order of a project’s workflows",
        "description": "Sets the order the project’s workflows run in. `workflow_ids` must list every workflow of the project exactly once. Form Submitted workflows that fire immediately stay ahead of the project’s other Form Submitted workflows, because that is how they run. Requires the WorkflowUpdate permission and the Workflows plan feature.",
        "operationId": "reorderProjectWorkflowsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderWorkflowsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Order saved."
          },
          "400": {
            "description": "Malformed JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "WorkflowUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "WorkflowInvalidExecutionOrder (4130000004) when the list leaves a workflow out, repeats one or names one the project does not have, with `message` saying which; FeatureNotIncludedInCurrentPlan when the Workflows plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must identify JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input: an unknown field or an ID that is not a UUIDv7.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/workflows:copy": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Workflows"
        ],
        "summary": "Copy workflows to other projects",
        "description": "Copies workflows into each target project of the same organization, all or nothing across the targets. At most 100 targets and 1,000 copies in all (workflows times targets). Every reference is matched in the target, and a value without a match is kept: `changes` lists it, and the copy is saved off and not valid (`needs_review`) until a save or :publish finds nothing missing. Missing tags and custom fields are created like the source’s, without a tag or field permission. A webhook a step names is copied too when the plan includes webhooks and the caller holds IntegrationWebhookUpdate on the source and the target. `preserve_status` turns on the copies of workflows that are on, when they are `exact`. Send `dry_run` first: it is priced and reports like a copy and writes nothing. A copy is not idempotent: repeating it adds more copies, turned on when `preserve_status` is true, so check the target before retrying one whose answer was lost. Requires the WorkflowCreate permission on the source and every target, and the Workflows plan feature.",
        "operationId": "copyProjectWorkflowsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CopyWorkflowsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "What was copied, or with `dry_run` what would be, per target.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CopyWorkflowsResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "WorkflowCreate permission is required on the source and every target, or WorkflowIntegrationAccessRequired (4130000017) when a step names an integration the caller cannot read there, with `project_ids`. Nothing is copied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Workflows plan feature is not included in the organization’s current plan; PlanLimitReached (4080000017) when the plan’s active workflow limit is reached, OverageAcknowledgementRequired (4080000036) or OverageRequiresBillingPermission (4080000037) when going over it would be billed as overage, which is confirmed in the app. A copy that adds no active workflow is not limited.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must identify JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input: an unknown field, a list over its limit, a workflow that is not one of the project’s, a target project that does not exist in the organization, or the source project listed as a target.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/workflows/{workflowId}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Workflows"
        ],
        "summary": "Get a workflow",
        "description": "Returns one workflow, addressed by its ID (UUIDv7), with the `etag` an update sends back. Requires the WorkflowRead permission and the Workflows plan feature.",
        "operationId": "getProjectWorkflowWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "description": "Workflow ID (UUIDv7).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes when and by whom the workflow was last changed.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n• `meta.updated_by` — includes the ID (UUIDv7) of the user who last changed it.\n• `review` — includes `review`: what a workflow that is not valid must fix before it can be turned on.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta and review are omitted unless requested.\n\nExample: `review`",
            "x-placeholder": "Example: review",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes when and by whom the workflow was last changed."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_by",
                      "description": "includes the ID (UUIDv7) of the user who last changed it."
                    },
                    {
                      "value": "review",
                      "description": "includes `review`: what a workflow that is not valid must fix before it can be turned on."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta and review are omitted unless requested."
              ],
              "example": "review"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow.",
            "headers": {
              "ETag": {
                "description": "The workflow’s version, the same value as its `etag`. An update sends it back in `If-Match`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workflow"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "WorkflowRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or workflow not found (code 4130000002 for the workflow).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Workflows plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Workflows"
        ],
        "summary": "Update a workflow",
        "description": "Updates a workflow; a workflow that is on runs the change at once. Send only the fields to change: a field left out keeps its stored value, and `stages`, when sent, replaces every stage. `If-Match` is required, so a save cannot undo a change it never saw: without it the update is refused with 428, and against an older version with 412, before its definition is checked. Read the workflow again and redo the change. Stages left out are checked again only when the trigger or direction they run under changes. A workflow that is not valid becomes valid once a save that checks its definition finds nothing missing, and never through a save that puts back a step the caller cannot read. Requires the WorkflowUpdate permission and the Workflows plan feature.",
        "operationId": "updateProjectWorkflowWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "description": "Workflow ID (UUIDv7).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The `etag` of the read this update is based on, quotes included, such as `\"3\"`. A list, `*` or a weak ETag is refused with 400.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes when and by whom the workflow was last changed.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n• `meta.updated_by` — includes the ID (UUIDv7) of the user who last changed it.\n• `review` — includes `review`: what a workflow that is not valid must fix before it can be turned on.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta and review are omitted unless requested.\n\nExample: `review`",
            "x-placeholder": "Example: review",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes when and by whom the workflow was last changed."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_by",
                      "description": "includes the ID (UUIDv7) of the user who last changed it."
                    },
                    {
                      "value": "review",
                      "description": "includes `review`: what a workflow that is not valid must fix before it can be turned on."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta and review are omitted unless requested."
              ],
              "example": "review"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkflowRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated workflow, with what its AI tag prompts created.",
            "headers": {
              "ETag": {
                "description": "The workflow’s version, the same value as its `etag`. An update sends it back in `If-Match`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSavedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON, or an `If-Match` that does not name one version.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "WorkflowUpdate permission is required; WorkflowIntegrationAccessRequired (4130000017) when a step names an integration the caller cannot read, or repeats a `restricted` placeholder; or WorkflowHiddenIntegrationRemoved (4130000018) when a `restricted` step was left out.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or workflow not found (code 4130000002 for the workflow).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Workflows plan feature is not included in the organization’s current plan, or a step’s integration is not; WorkflowWebhookReferenceUnknown (406000132) when a webhook a step names was deleted while saving, with `webhook_ids`, or WorkflowEmailAlertReferenceUnknown (406000192) when a step names an email alert the project does not have, with `email_alert_ids`; or WorkflowHiddenIntegrationStale (4130000019) when a `restricted` step no longer matches the stored workflow.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "412": {
            "description": "WorkflowModified (406000195): the workflow changed since the read that gave this `etag`. Nothing is written.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must identify JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input: an unknown field (including `id`, `is_active`, `etag` and the other read-only fields of a read), a missing or invalid value, or a definition the catalog does not allow. Each problem’s `pointer` names the value, such as `/stages/0/rules/call_duration/operA`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "428": {
            "description": "WorkflowVersionRequired (406000199): `If-Match` is missing. Nothing is written.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/workflows/{workflowId}:duplicate": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Workflows"
        ],
        "summary": "Duplicate a workflow",
        "description": "Copies a workflow inside its project, as a new workflow at the end of the run order that is off and keeps the source’s `is_valid`. Send `{}` for the default name, the source’s with ` (Duplicate)` added. Repeating the request creates another copy. Requires the WorkflowCreate permission and the Workflows plan feature.",
        "operationId": "duplicateProjectWorkflowWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "description": "Workflow ID (UUIDv7).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes when and by whom the workflow was last changed.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n• `meta.updated_by` — includes the ID (UUIDv7) of the user who last changed it.\n• `review` — includes `review`: what a workflow that is not valid must fix before it can be turned on.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta and review are omitted unless requested.\n\nExample: `review`",
            "x-placeholder": "Example: review",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes when and by whom the workflow was last changed."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    },
                    {
                      "value": "meta.updated_by",
                      "description": "includes the ID (UUIDv7) of the user who last changed it."
                    },
                    {
                      "value": "review",
                      "description": "includes `review`: what a workflow that is not valid must fix before it can be turned on."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta and review are omitted unless requested."
              ],
              "example": "review"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateWorkflowRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The new workflow.",
            "headers": {
              "Location": {
                "description": "The URL of the new workflow.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "The workflow’s version, the same value as its `etag`. An update sends it back in `If-Match`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workflow"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON, including an empty body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "WorkflowCreate permission is required, or WorkflowIntegrationAccessRequired (4130000017) when the workflow holds a step for an integration the caller cannot read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or workflow not found (code 4130000002 for the workflow).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Workflows plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must identify JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input: an unknown field or an empty name.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/workflows/{workflowId}:publish": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Workflows"
        ],
        "summary": "Turn a workflow on",
        "description": "Turns a workflow on, so it runs on the next event. It takes no body. A valid workflow that is already on stays on and the request succeeds. A workflow saved as not valid, such as a copy that needs review, is checked again: it is turned on, and becomes valid, once nothing is left to fix. Turning one on counts against the plan’s active workflow limit. Requires the WorkflowUpdate permission and the Workflows plan feature.",
        "operationId": "publishProjectWorkflowWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "description": "Workflow ID (UUIDv7).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The workflow is on."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "WorkflowUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or workflow not found (code 4130000002 for the workflow).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "WorkflowNotValid (406000194) while something is left to fix, which `include=review` lists; WorkflowModified (406000195) when a save changed the workflow while it was checked; PlanLimitReached (4080000017) when the plan’s active workflow limit is reached, OverageAcknowledgementRequired (4080000036) or OverageRequiresBillingPermission (4080000037) when going over it would be billed as overage, which is confirmed in the app; FeatureNotIncludedInCurrentPlan when the Workflows plan feature is not included in the organization’s current plan, or a step’s integration is not.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The request has a body field, which this operation does not take (UnexpectedBodyField at its JSON pointer).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/workflows/{workflowId}:unpublish": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Workflows"
        ],
        "summary": "Turn a workflow off",
        "description": "Turns a workflow off, so it runs on no new event. It takes no body. A workflow that is already off stays off and the request succeeds. A workflow must be off to be deleted. Requires the WorkflowUpdate permission; it needs neither the Workflows plan feature nor a subscription in good standing.",
        "operationId": "unpublishProjectWorkflowWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "description": "Workflow ID (UUIDv7).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The workflow is off."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "WorkflowUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or workflow not found (code 4130000002 for the workflow).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The request has a body field, which this operation does not take (UnexpectedBodyField at its JSON pointer).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/calls/{callId}/workflow-runs": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Workflows"
        ],
        "summary": "List call workflow runs",
        "description": "Returns the workflow runs of one call. Newest run first, each with the workflows that ran, the steps they reached and the attempts those steps made. A call no workflow ran for is an empty list. Requires the AuditLogRead permission and the Integration Events plan feature.",
        "operationId": "getCallWorkflowRunsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "description": "Call id: `uu_id_a` of an inbound call, or the outbound call id.",
            "schema": {
              "type": "string",
              "maxLength": 45
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `attempts.request_details` — includes `request_details` on each attempt: request metadata such as the endpoint and method, with credentials redacted. The target URL of a Zapier, Make or Cometly delivery is never included.\n• `attempts.request_payload` — includes `request_payload` on each attempt: the body Nimbata sent to the integration, with credentials redacted.\n• `attempts.response` — includes `response` on each attempt: what the integration answered with. It is the integration’s own text.\n\nBodies are omitted unless requested. Name each body: there is no `attempts` include that adds all of them.\n\nExample: `attempts.response`",
            "x-placeholder": "Example: attempts.response",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "attempts.request_details",
                      "description": "includes `request_details` on each attempt: request metadata such as the endpoint and method, with credentials redacted. The target URL of a Zapier, Make or Cometly delivery is never included."
                    },
                    {
                      "value": "attempts.request_payload",
                      "description": "includes `request_payload` on each attempt: the body Nimbata sent to the integration, with credentials redacted."
                    },
                    {
                      "value": "attempts.response",
                      "description": "includes `response` on each attempt: what the integration answered with. It is the integration’s own text."
                    }
                  ]
                }
              ],
              "notes": [
                "Bodies are omitted unless requested. Name each body: there is no `attempts` include that adds all of them."
              ],
              "example": "attempts.response"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The workflow runs of the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "AuditLogRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or call not found. CallResourceNotFound (code 406000174) when the project has no such call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Integration Events plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "IntegrationEventLogUnavailable (406000173): the run log or the delivery log could not be read, which does not mean nothing ran. Retry after the number of seconds in Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/form-submissions/{submissionId}/workflow-runs": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Workflows"
        ],
        "summary": "List form submission workflow runs",
        "description": "Returns the workflow runs of one form submission. Newest run first, each with the workflows that ran, the steps they reached and the attempts those steps made. A form submission no workflow ran for is an empty list. Requires the AuditLogRead permission and the Integration Events plan feature.",
        "operationId": "getFormSubmissionWorkflowRunsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "description": "Form submission ID (UUIDv7): the `id` of a form submission.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `attempts.request_details` — includes `request_details` on each attempt: request metadata such as the endpoint and method, with credentials redacted. The target URL of a Zapier, Make or Cometly delivery is never included.\n• `attempts.request_payload` — includes `request_payload` on each attempt: the body Nimbata sent to the integration, with credentials redacted.\n• `attempts.response` — includes `response` on each attempt: what the integration answered with. It is the integration’s own text.\n\nBodies are omitted unless requested. Name each body: there is no `attempts` include that adds all of them.\n\nExample: `attempts.response`",
            "x-placeholder": "Example: attempts.response",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "attempts.request_details",
                      "description": "includes `request_details` on each attempt: request metadata such as the endpoint and method, with credentials redacted. The target URL of a Zapier, Make or Cometly delivery is never included."
                    },
                    {
                      "value": "attempts.request_payload",
                      "description": "includes `request_payload` on each attempt: the body Nimbata sent to the integration, with credentials redacted."
                    },
                    {
                      "value": "attempts.response",
                      "description": "includes `response` on each attempt: what the integration answered with. It is the integration’s own text."
                    }
                  ]
                }
              ],
              "notes": [
                "Bodies are omitted unless requested. Name each body: there is no `attempts` include that adds all of them."
              ],
              "example": "attempts.response"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The workflow runs of the form submission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "AuditLogRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization, project or form submission not found. FormSubmissionResourceNotFound (code 406000175) when the project has no such form submission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "FeatureNotIncludedInCurrentPlan when the Integration Events plan feature is not included in the organization’s current plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "IntegrationEventLogUnavailable (406000173): the run log or the delivery log could not be read, which does not mean nothing ran. Retry after the number of seconds in Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/identities": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Identities"
        ],
        "summary": "List project identities",
        "description": "Returns one cursor-paginated page of the project’s identities, each with its address and documents.",
        "operationId": "getProjectIdentitiesWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum identities to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not construct or modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Project identities.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentityListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IdentityRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "503": {
            "description": "IdentitiesCouldNotBeLoaded: the numbering provider could not be read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Identities"
        ],
        "summary": "Create an identity",
        "description": "Creates an identity in the project. `type` is `personal` (default) or `business` and cannot be changed later. `country`, `first_name`, `last_name` and `phone_number` are required, plus `company_name` for a business. Company fields are rejected on a personal identity. A new identity has no address or documents; add them with the address and documents operations.",
        "operationId": "createIdentityWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIdentityRequest"
              }
            }
          },
          "description": "Identity to create.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Identity created, in the same representation as GET by ID. `Location` carries its URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IdentityCreate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "IdentityCouldNotBeSaved: the numbering provider rejected the identity. `details` lists its reasons.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed: a required field is missing, a field is invalid or not allowed (such as a company field on a personal identity), or /country is not a supported country code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "503": {
            "description": "IdentityCouldNotBeSaved: the numbering provider could not be read; nothing was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/identities/{identityId}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Identities"
        ],
        "summary": "Read an identity",
        "description": "Returns an identity with its status, address and documents.",
        "operationId": "getIdentityWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "identityId",
            "in": "path",
            "description": "Identity ID, as returned by the identity operations.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IdentityRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such identity in this project, or it belongs to another project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "IdentityCouldNotBeLoaded: the numbering provider could not be read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Identities"
        ],
        "summary": "Replace an identity",
        "description": "Replaces the identity with the body. Required fields are as on create, and omitted optional fields are cleared. `type` cannot be changed, and `company_reg_number` is locked once the identity is verified.",
        "operationId": "updateIdentityWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "identityId",
            "in": "path",
            "description": "Identity ID, as returned by the identity operations.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateIdentityRequest"
              }
            }
          },
          "description": "The new content of the identity.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated identity in the same representation as GET by ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IdentityUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such identity in this project, or it belongs to another project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "VerifiedIdentityFieldLocked: `company_reg_number` cannot change on a verified identity (omitting it counts as a change). IdentityCouldNotBeSaved: the numbering provider rejected the update; see `details`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed: a required field is missing, a field is invalid or not allowed (including `type`, or a company field on a personal identity), or /country is not a supported country code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "503": {
            "description": "The numbering provider could not be read (IdentityCouldNotBeLoaded or IdentityCouldNotBeSaved). If this happened after the update, it may already be applied; repeating the request is safe.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Identities"
        ],
        "summary": "Delete an identity",
        "description": "Deletes an identity together with its address and documents. A verified identity cannot be deleted.",
        "operationId": "deleteIdentityWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "identityId",
            "in": "path",
            "description": "Identity ID, as returned by the identity operations.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Identity deleted."
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IdentityDelete permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such identity in this project, or it belongs to another project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "VerifiedIdentityCannotBeDeleted: the identity is verified. IdentityCouldNotBeDeleted: the numbering provider refused; see `details`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "IdentityCouldNotBeLoaded: the numbering provider could not be read; nothing was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/identities/{identityId}/address": {
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Identities"
        ],
        "summary": "Set the address of an identity",
        "description": "Creates or replaces the identity’s address. All fields are required, and `country` cannot change once the address exists.",
        "operationId": "putIdentityAddressWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "identityId",
            "in": "path",
            "description": "Identity ID, as returned by the identity operations.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutIdentityAddressRequest"
              }
            }
          },
          "description": "The address of the identity.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "The identity with its saved address, in the same representation as GET by ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IdentityCreate or IdentityUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such identity in this project, or it belongs to another project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "IdentityAddressCouldNotBeSaved: the numbering provider rejected the address; see `details`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed: a required field is missing or not allowed, /country is not a supported country code, or /country differs from the existing address (ValueCannotBeChanged).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "503": {
            "description": "The numbering provider could not be read (IdentityCouldNotBeLoaded or IdentityAddressCouldNotBeSaved). If this happened after saving, repeating the request is safe.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Identities"
        ],
        "summary": "Delete the address of an identity",
        "description": "Removes the identity’s address. An address already used to verify a number cannot be deleted.",
        "operationId": "deleteIdentityAddressWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "identityId",
            "in": "path",
            "description": "Identity ID, as returned by the identity operations.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Address deleted."
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IdentityDelete permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such identity in this project, it belongs to another project, or it has no address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "IdentityAddressCouldNotBeDeleted: the numbering provider refused; see `details`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "IdentityCouldNotBeLoaded: the numbering provider could not be read; nothing was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/identities/{identityId}/documents": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Identities"
        ],
        "summary": "Upload an identity document",
        "description": "Uploads a document to the identity. Files are encrypted client-side before upload and `encryption_fingerprint` identifies the keys used, as described under “Read the document encryption keys”; send up to 5 files as repeated `files[]` parts. Each file must be a PDF, JPG or PNG of up to 10 MB before it is encrypted. `type_id` comes from `accepted_types` in the number’s registration requirements. Address proofs need the identity’s address to exist first.",
        "operationId": "uploadIdentityDocumentWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "identityId",
            "in": "path",
            "description": "Identity ID, as returned by the identity operations.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "description": "Encrypted document files, 1 to 5 per request. Each must be a PDF, JPG or PNG of up to 10 MB before it is encrypted. Send several files as repeated `files[]` multipart parts.",
                    "type": "string",
                    "format": "binary"
                  },
                  "encryption_fingerprint": {
                    "description": "Fingerprint of the key the files were encrypted with.",
                    "type": "string"
                  },
                  "type_id": {
                    "description": "The document type, from the `type_id` of an accepted type in the registration requirements.",
                    "type": "string"
                  }
                },
                "required": [
                  "files",
                  "encryption_fingerprint",
                  "type_id"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Document uploaded. Returns the identity, including the new document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            }
          },
          "204": {
            "description": "Document uploaded, but the identity could not be re-read. Do not upload it again; read the identity instead."
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IdentityCreate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such identity in this project, or it belongs to another project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "IdentityHasNoAddress: an address proof needs the identity’s address first. IdentityDocumentCouldNotBeUploaded: the numbering provider rejected the document; see `details`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed: /files is missing or has more than 5 files, /encryption_fingerprint or /type_id is missing, /type_id is not a known document type, or a field is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "503": {
            "description": "The numbering provider could not be read (IdentityCouldNotBeLoaded or IdentityDocumentCouldNotBeUploaded); nothing was uploaded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/identities/{identityId}/documents/{documentId}": {
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Identities"
        ],
        "summary": "Delete an identity document",
        "description": "Deletes a document from the identity or its address.",
        "operationId": "deleteIdentityDocumentWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "identityId",
            "in": "path",
            "description": "Identity ID, as returned by the identity operations.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "description": "Document ID, from the identity’s or its address’s `documents`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Document deleted."
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IdentityDelete permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such identity in this project, it belongs to another project, or it has no such document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "IdentityDocumentCouldNotBeDeleted: the numbering provider refused; see `details`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "IdentityCouldNotBeLoaded: the numbering provider could not be read; nothing was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/tracking/numbers/locations": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Numbers"
        ],
        "summary": "Browse tracking-number locations",
        "operationId": "getTrackingNumberLocations",
        "description": "Browse regions, cities or area codes. Supplying page_size opts into provider pagination (maximum 100); omitting it preserves legacy discovery and its pageSize default of 250. includeLocationRef adds an opaque context-bound reference for child location browsing or available-number search. Preserve country, type and SMS context when reusing it.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "local",
                "toll_free",
                "mobile",
                "national"
              ]
            }
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "region",
                "city",
                "area_code"
              ]
            }
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          },
          {
            "name": "parentId",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          },
          {
            "name": "parentRef",
            "in": "query",
            "description": "Opaque region reference for kind=city. Cannot be combined with parentId.",
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "smsIn",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "smsOut",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "includeLocationRef",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "At most 10000 when page_size is supplied.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Legacy page limit; does not opt into provider pagination. Ignored when page_size is supplied.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 250
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Opt into provider pagination; use the same value on continuation.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Locations and provider continuation flag.",
            "headers": {
              "Nb-Page-Number": {
                "schema": {
                  "type": "integer"
                }
              },
              "Nb-Page-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "Nb-Has-More": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hasMore": {
                      "type": "boolean"
                    },
                    "locations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "region",
                              "city",
                              "area_code"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "prefix": {
                            "type": "string",
                            "nullable": true
                          },
                          "parentId": {
                            "type": "string",
                            "nullable": true
                          },
                          "token": {
                            "type": "string",
                            "nullable": true
                          },
                          "locationRef": {
                            "type": "string",
                            "description": "Only with includeLocationRef=true; treat as opaque."
                          },
                          "needsRegistration": {
                            "type": "boolean"
                          },
                          "numbersListable": {
                            "type": "boolean"
                          },
                          "restrictions": {
                            "type": "string",
                            "nullable": true
                          },
                          "price": {
                            "type": "object",
                            "properties": {
                              "setup": {
                                "type": "number",
                                "nullable": true
                              },
                              "monthly": {
                                "type": "number",
                                "nullable": true
                              },
                              "currency": {
                                "type": "string"
                              }
                            },
                            "nullable": true
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid location query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingNumberRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Invalid location reference or carrier unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/tracking/numbers:search": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Numbers"
        ],
        "summary": "Search available tracking numbers",
        "description": "Searches provider inventory with organization plan pricing. This read does not reserve or buy a number. The existing pageNumber/pageSize contract is retained: page 1 and 50 results by default, with pageSize clamped to 1–250. An optional locationRef from location discovery preserves its country, number type, project, and SMS context. It cannot be combined with raw location selectors. Omitted SMS filters inherit the reference values; explicit conflicting values are rejected.",
        "operationId": "searchAvailableTrackingNumbers",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": true,
            "description": "ISO 3166-1 alpha-2 country code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "local",
                "toll_free",
                "mobile",
                "national"
              ]
            }
          },
          {
            "name": "contains",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          },
          {
            "name": "startsWith",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          },
          {
            "name": "endsWith",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          },
          {
            "name": "locality",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          },
          {
            "name": "administrativeArea",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          },
          {
            "name": "areaCode",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Opaque location selector: a location's token from discovery.",
            "schema": {
              "type": "string",
              "maxLength": 2048
            }
          },
          {
            "name": "locationRef",
            "in": "query",
            "description": "Opaque context-bound location reference. Reuse it unchanged with the same country and type.",
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "smsIn",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "smsOut",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching inventory and pagination information. Prices and total may be null when unavailable.",
            "headers": {
              "Nb-Page-Number": {
                "schema": {
                  "type": "integer"
                }
              },
              "Nb-Page-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "Nb-Has-More": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "numbers",
                    "total",
                    "hasMore"
                  ],
                  "properties": {
                    "numbers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Provider inventory identifier; not a project tracking-number UUID."
                          },
                          "e164": {
                            "type": "string"
                          },
                          "displayLocation": {
                            "type": "string"
                          },
                          "price": {
                            "type": "object",
                            "properties": {
                              "setup": {
                                "type": "number",
                                "nullable": true
                              },
                              "monthly": {
                                "type": "number",
                                "nullable": true
                              },
                              "currency": {
                                "type": "string"
                              }
                            },
                            "nullable": true
                          },
                          "features": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "token": {
                            "type": "string",
                            "description": "Opaque inventory selection token.",
                            "nullable": true
                          }
                        }
                      }
                    },
                    "total": {
                      "type": "integer",
                      "nullable": true
                    },
                    "hasMore": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid search parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingNumberRead permission and access to the project are required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The location reference is invalid for this request, or the carrier service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/numbers:order": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Numbers"
        ],
        "summary": "Order tracking numbers",
        "description": "Buys one or more tracking numbers for the project. Provide the country and number type plus geographic targeting: for the United States and Canada an optional area code, state, or city narrows the selection; for every other country the city (`locality`) is required and determines both availability and whether the number needs regulatory registration. Use `quantity` to order several matching numbers at once. Ordering is billable and requires a subscription in good standing. Send an optional `Nb-Idempotency-Key` header so a retried or duplicated submit is not charged twice. The result is `completed` when the numbers are active, `pending` when they were purchased but still need registration, or `failed` when nothing was ordered.",
        "operationId": "createTrackingNumberOrder",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Nb-Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional idempotency key. Replaying the same key returns 409 TrackingNumberOrderAlreadySubmitted instead of ordering again; a denied or failed order releases the key so the same submit can be retried.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateNumberOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The order outcome. `status` is `completed`, `pending` (purchased but awaiting registration), or `failed` (nothing was ordered; see `message`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NumberOrderResult"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid. Validation issues use JSON pointers such as /number_type, /selected_numbers/0, or /tracking_source, or the Nb-Idempotency-Key header. A tracking_source name with a refused character or HTML tag answers NameContainsDisallowedCharacters (400000155) at tracking_source/name, and, for paid, organic, social and AI sources, a partners, channels or paidchannels value that is not letters, digits, `-` and `_` answers ValueMustContainOnlyLettersDigitsDashesAndUnderscores (400000156) at tracking_source/params/<key>.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingNumberCreate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The order was not placed. TrackingNumberOrderAlreadySubmitted when the idempotency key was already used; TrackingNumberCannotBeAdded or NoPhoneNumbersAvailableToOrder when the plan, trial, or inventory does not allow it; TrackingNumberRequirementGroupRequired when numbers of this country and type need a fulfilled requirement group on the order; TrackingNumberNoLongerAvailable when a chosen number can no longer be ordered, so search again; CarrierServiceUnavailable when the numbering provider could not be reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body holds a field this operation does not read (UnexpectedBodyField), or `quantity`, `maximum_setup_cost` or `maximum_monthly_price` is not a number, each at its JSON pointer. A body field sent in the query string is refused at its query pointer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/numbers:register": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Numbers"
        ],
        "summary": "Submit tracking numbers for registration",
        "description": "Submits 1 to 100 of the project’s numbers for registration with one identity, as a single verification. Each number is given by ID (UUIDv7) or phone number, must be awaiting registration, and must share the requirement (country and number type) of the others. The identity may belong to any project where you hold IdentityRead and must have nothing `missing`. All or nothing: if any check fails, nothing is submitted. Requires IdentityUpdate.",
        "operationId": "registerTrackingNumbersWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterNumbersRequest"
              }
            }
          },
          "description": "The identity and the numbers to register with it.",
          "required": true
        },
        "responses": {
          "202": {
            "description": "Submitted as one verification. `items` has one entry per number, in request order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterNumbersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Malformed or non-object JSON body. Returns an InvalidJsonValue validation issue.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IdentityUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found, or no such identity among the identities you can read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Nothing was submitted. NumberNotAwaitingRegistration: the number in the `number` extension is not awaiting registration, or its registration is already pending or approved. IdentityVerificationFailed: the numbering provider refused the verification; see `details`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must be application/json. Returns an InvalidValue validation issue pointing to the Content-Type header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "422": {
            "description": "Nothing was submitted. Either a field is invalid (/identity_id, /numbers, or a /numbers/{index} entry that is blank, repeated, not in this project, or has another requirement than the first number: RegistrationRequirementDiffers), or the problem is IdentityNotReadyForRegistration and `missing` lists what the identity lacks.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblem"
                    },
                    {
                      "$ref": "#/components/schemas/IdentityNotReadyProblem"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Nothing was submitted: the numbering provider could not be read (IdentityCouldNotBeLoaded or TrackingNumberRegistrationDetailsUnavailable).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/numbers/orders": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Numbers"
        ],
        "summary": "List project numbers awaiting registration",
        "description": "Lists the project’s numbers that await registration, without paging. Numbers with the same `order_id` were ordered together and can be submitted in one `numbers:register` request.",
        "operationId": "getProjectPendingNumberOrdersWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Numbers awaiting registration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PendingNumberOrdersResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IdentityRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "IdentityPendingOrdersCouldNotBeLoaded: the numbering provider could not be read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/options/countries": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Reference data"
        ],
        "summary": "List supported countries",
        "description": "The countries where Nimbata supports phone numbers. Rows carry the ISO country code and whether the country has states, and deliberately omit provider identifiers.",
        "operationId": "getOptionCountriesWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Supported countries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OptionCountryListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingNumberRead permission is required in at least one project of this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/options/states": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Reference data"
        ],
        "summary": "List the states of a country",
        "description": "The states or provinces of a country that has them. Countries without states return an empty list rather than an error.",
        "operationId": "getOptionStatesWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code, for example US or CA.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "States of the country, or an empty list when it has none.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OptionStateListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingNumberRead permission is required in at least one project of this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/options/cities": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Reference data"
        ],
        "summary": "List the cities of a country",
        "description": "The cities in a country where numbers are available. Countries that are addressed by state, and countries outside the supported list, return an empty list rather than an error.",
        "operationId": "getOptionCitiesWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code, for example GB or DE.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cities of the country, or an empty list when none apply.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OptionCityListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingNumberRead permission is required in at least one project of this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/options/proofs": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Reference data"
        ],
        "summary": "List the proof types for an entity kind",
        "description": "The proof documents the numbering provider knows for one kind of registrant, reduced to an id and a name. This is a general catalogue: the document types a particular number accepts are in its registration requirements.",
        "operationId": "getOptionProofsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Which registrant the proofs are for.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "personal_id",
                "personal",
                "business_id",
                "business",
                "address"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Proof types for that entity kind.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OptionProofListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IdentityRead permission is required in at least one project of this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "type is missing or not one of the accepted values.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/options/registration-requirements": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Reference data"
        ],
        "summary": "Read the registration requirements for a country and number type",
        "description": "Returns what registering a number of this country and type requires, so it can be prepared before ordering. Same format as `requirements` on a number’s registration read; null when no registration is needed.",
        "operationId": "getOptionRegistrationRequirementsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code of the number, for example NL or DE.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number_type",
            "in": "query",
            "description": "Kind of number.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "local",
                "toll_free",
                "mobile",
                "national"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requirements, or null when the combination needs no registration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistrationRequirementsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IdentityRead permission is required in at least one project of this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid query: /country is missing or not a supported country code, or /number_type is missing or not an accepted value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "503": {
            "description": "IdentityNumberRequirementsCouldNotBeLoaded: the numbering provider could not be read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/options/document-encryption-keys": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Reference data"
        ],
        "summary": "Read the document encryption keys",
        "description": "Returns the two public keys (PEM) that identity documents must be encrypted with, and their `fingerprint`. Read them each time you encrypt documents, as they can change.",
        "operationId": "getDocumentEncryptionKeysWebApi",
        "x-guide": {
          "title": "How to build an encrypted file and its fingerprint",
          "text": "Documents must be PDF, JPG or PNG files of up to 10 MB each before encryption, with up to 5 files per upload.\n\nTo build an encrypted file:\n1. Generate a random 32-byte key and a random 16-byte IV.\n2. Encrypt the document with AES-256-CBC, using that key and IV, with PKCS#7 padding.\n3. Join the key and the IV (48 bytes) and encrypt them with RSA-OAEP, SHA-256 for both OAEP and MGF1, once with each public key.\n4. The encrypted file is the result for the first key, then the result for the second key, then the AES output, joined in that order.\n\nTo build the fingerprint: for each public key, base64-decode the text between the BEGIN PUBLIC KEY and END PUBLIC KEY lines (the key's DER bytes) and take its SHA-1 as lowercase hex. Join the two, in the keys' order, with `:::`. The result equals the `fingerprint` returned here."
        },
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "// Node.js: build an encrypted file and its fingerprint.\nimport crypto from 'node:crypto';\nimport fs from 'node:fs';\n\n// The fingerprint: SHA-1 (lowercase hex) of each key's DER bytes, joined with ':::'.\nfunction fingerprintOf(publicKeys) {\n    const der = (pem) => Buffer.from(pem.replace(/-----[^-]+-----|\\s+/g, ''), 'base64');\n    return publicKeys.map((pem) => crypto.createHash('sha1').update(der(pem)).digest('hex')).join(':::');\n}\n\n// The encrypted file: the key and IV wrapped for each public key, then the AES-256-CBC output.\nfunction encryptDocument(content, publicKeys) {\n    const key = crypto.randomBytes(32);\n    const iv = crypto.randomBytes(16);\n    const cipher = crypto.createCipheriv('aes-256-cbc', key, iv);\n    const encryptedContent = Buffer.concat([cipher.update(content), cipher.final()]);\n    const wrappedKeys = publicKeys.map((pem) =>\n        crypto.publicEncrypt(\n            { key: pem, padding: crypto.constants.RSA_PKCS1_OAEP_PADDING, oaepHash: 'sha256' },\n            Buffer.concat([key, iv])\n        )\n    );\n    return Buffer.concat([...wrappedKeys, encryptedContent]);\n}\n\n// publicKeys: the `public_keys` this endpoint returns, in the same order.\nconst encryptedFile = encryptDocument(fs.readFileSync('passport.pdf'), publicKeys);\nconst fingerprint = fingerprintOf(publicKeys);"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with `pip install cryptography`: build an encrypted file and its fingerprint.\nimport base64\nimport hashlib\nimport os\nimport re\n\nfrom cryptography.hazmat.primitives import hashes, padding, serialization\nfrom cryptography.hazmat.primitives.asymmetric import padding as rsa_padding\nfrom cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes\n\n\n# The fingerprint: SHA-1 (lowercase hex) of each key's DER bytes, joined with ':::'.\ndef fingerprint_of(public_keys):\n    der = lambda pem: base64.b64decode(re.sub(r\"-----[^-]+-----|\\s+\", \"\", pem))\n    return \":::\".join(hashlib.sha1(der(pem)).hexdigest() for pem in public_keys)\n\n\n# The encrypted file: the key and IV wrapped for each public key, then the AES-256-CBC output.\ndef encrypt_document(content, public_keys):\n    key, iv = os.urandom(32), os.urandom(16)\n    padder = padding.PKCS7(128).padder()\n    padded = padder.update(content) + padder.finalize()\n    encryptor = Cipher(algorithms.AES(key), modes.CBC(iv)).encryptor()\n    encrypted_content = encryptor.update(padded) + encryptor.finalize()\n    oaep = rsa_padding.OAEP(mgf=rsa_padding.MGF1(hashes.SHA256()), algorithm=hashes.SHA256(), label=None)\n    wrapped_keys = [serialization.load_pem_public_key(pem.encode()).encrypt(key + iv, oaep) for pem in public_keys]\n    return b\"\".join(wrapped_keys) + encrypted_content\n\n\n# public_keys: the `public_keys` this endpoint returns, in the same order.\nwith open(\"passport.pdf\", \"rb\") as document:\n    encrypted_file = encrypt_document(document.read(), public_keys)\nfingerprint = fingerprint_of(public_keys)"
          }
        ],
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The public keys and their fingerprint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentEncryptionKeys"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "IdentityCreate permission is required in at least one project of this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "DocumentEncryptionKeysCouldNotBeLoaded: the numbering provider could not be read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/forms/{formId}/fields": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Forms"
        ],
        "summary": "List the fields of a tracked form",
        "description": "Returns the field names captured by one form, together with the header labels used when its submissions are rendered or exported. Read this before selecting columns from the submissions endpoint.",
        "operationId": "getProjectTrackedFormFieldsWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "formId",
            "in": "path",
            "description": "Tracked-form ID (UUIDv7), the `id` returned by the forms list. Sample-mode rows carry fixture ids, which are accepted as returned.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dummy",
            "in": "query",
            "description": "Sample-data mode. Omitted or `off` returns real data; `on` returns fixture data and `auto` lets the endpoint choose based on setup eligibility.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "on",
                "off",
                "auto"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Field names and header labels of the form.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormFieldsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "FormsRead or ActivityFormsRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/numbers/{trackingNumber}/registration": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Tracking Numbers"
        ],
        "summary": "Read tracking-number registration details",
        "description": "Returns what registering the number requires, and the rejection reasons when a registration was rejected. Send `identity_id` to also get `missing`: what that identity still lacks, empty when it is ready to submit. The identity may belong to any project where you hold IdentityRead.",
        "operationId": "getTrackingNumberRegistrationWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "trackingNumber",
            "in": "path",
            "description": "The tracking number, as its ID (UUIDv7) or as the phone number itself.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "identity_id",
            "in": "query",
            "description": "Identity to check against the requirements; adds `missing` to the response.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Registration details for this number.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrackingNumberRegistration"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TrackingNumberRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Organization or project not found, or, with `identity_id`, no such identity among the identities you can read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "TrackingNumberNotFound: the number is not in this project. TrackingNumberRegistrationDetailsUnavailable: the number awaits registration, but its provider supplies no registration details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "`identity_id` was sent blank.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "503": {
            "description": "The numbering provider could not be read: IdentityCouldNotBeLoaded for the `identity_id` identity, TrackingNumberRegistrationDetailsUnavailable for the requirements.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/media-library": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Media Library"
        ],
        "summary": "Read a project’s whole media library",
        "description": "Returns greetings, surveys, and voicemail greetings using the same file resource as the single-type read. Greetings and surveys include organization-shared files alongside the project’s own; voicemail greetings are project-owned only. Use `include=voicemail-settings` for the project voicemail settings. Actual whisper data is served by the `callWhispers` media type.",
        "operationId": "getProjectMediaLibraryWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all timestamps for each file.\n• `meta.updated_at` — includes the last update timestamp in UTC for each file.\n• `usage` — includes all call-flow references for each file.\n• `usage.call_flow_ids` — includes the IDs of call flows that reference each file.\n• `voicemail-settings` — includes the project voicemail settings in `voicemail_settings`, including `default_password`.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta and usage apply to greetings, surveys, and voicemails. They are ignored when media_type is callWhispers.\n\nExample: `meta.updated_at,usage,voicemail-settings`",
            "x-placeholder": "Example: meta.updated_at,usage,voicemail-settings",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all timestamps for each file."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC for each file."
                    },
                    {
                      "value": "usage",
                      "description": "includes all call-flow references for each file."
                    },
                    {
                      "value": "usage.call_flow_ids",
                      "description": "includes the IDs of call flows that reference each file."
                    },
                    {
                      "value": "voicemail-settings",
                      "description": "includes the project voicemail settings in `voicemail_settings`, including `default_password`."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta and usage apply to greetings, surveys, and voicemails. They are ignored when media_type is callWhispers."
              ],
              "example": "meta.updated_at,usage,voicemail-settings"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The project’s media library.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaLibraryResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "MediaLibraryRead or CallFlowRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/media-library/{mediaType}": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Media Library"
        ],
        "summary": "List one kind of media in a project",
        "description": "Returns a single collection rather than the whole library. `greetings`, `surveys` and `voicemails` answer with an array of files; `callWhispers` answers with the whisper view: the recordings available for reuse, and every tracking number in the project with the whisper it currently plays.",
        "operationId": "getProjectMediaLibraryByTypeWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mediaType",
            "in": "path",
            "description": "Which media to return. `callWhispers` answers with the whisper view instead of a file list.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "greetings",
                "surveys",
                "voicemails",
                "callWhispers"
              ]
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `meta` — includes all timestamps for each file.\n• `meta.updated_at` — includes the last update timestamp in UTC for each file.\n• `usage` — includes all call-flow references for each file.\n• `usage.call_flow_ids` — includes the IDs of call flows that reference each file.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta and usage apply to greetings, surveys, and voicemails. They are ignored when media_type is callWhispers.\n\nExample: `meta.updated_at,usage`",
            "x-placeholder": "Example: meta.updated_at,usage",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "meta",
                      "description": "includes all timestamps for each file."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC for each file."
                    },
                    {
                      "value": "usage",
                      "description": "includes all call-flow references for each file."
                    },
                    {
                      "value": "usage.call_flow_ids",
                      "description": "includes the IDs of call flows that reference each file."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta and usage apply to greetings, surveys, and voicemails. They are ignored when media_type is callWhispers."
              ],
              "example": "meta.updated_at,usage"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested collection: an array of files, or the whisper view for `callWhispers`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaLibraryCollectionResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "MediaLibraryRead or CallFlowRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Media Library"
        ],
        "summary": "Set the whisper on tracking numbers",
        "description": "Sets a call whisper in one of two ways.\n\n- `text_to_speech`: send `number`, `text`, `language` and `voice`.\n- `reuse`: send `source_number` and `target_numbers` to copy an existing whisper.\n\nThe two field groups cannot be mixed and unknown fields are rejected. Reusing a whisper copies it, so the numbers remain independent afterwards. Target numbers outside this project are skipped. A source number that is not found, not readable or has no whisper is treated as a no-op so the endpoint does not reveal numbers outside the caller’s access.",
        "operationId": "updateProjectWhisperWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mediaType",
            "in": "path",
            "description": "The updatable media type. Only `callWhispers` is supported.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "callWhispers"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWhisperRequest"
              }
            }
          },
          "description": "The whisper to set, and the tracking numbers to set it on.",
          "required": true
        },
        "responses": {
          "204": {
            "description": "Whisper applied, or nothing needed changing."
          },
          "400": {
            "description": "Invalid request. This includes missing conditional fields, unsupported values, mixed operation fields and unknown body fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "MediaLibraryUpdate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The target tracking number was not found in this project, or the whisper could not be updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Media Library"
        ],
        "summary": "Remove media from a project",
        "description": "Removes a batch: `file_names` for greetings, surveys and voicemail greetings, or `tracking_numbers` for whispers. Files a call flow or an unpublished draft still references are kept, and so is anything shared across the organization, which this project does not own. The response is 204 either way, so read the collection back to see what remains.",
        "operationId": "deleteProjectMediaLibraryWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mediaType",
            "in": "path",
            "description": "Which media to return. `callWhispers` answers with the whisper view instead of a file list.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "greetings",
                "surveys",
                "voicemails",
                "callWhispers"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteMediaLibraryRequest"
              }
            }
          },
          "description": "What to remove.",
          "required": true
        },
        "responses": {
          "204": {
            "description": "Removal processed. Files that had to be kept are unchanged."
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "MediaLibraryDelete permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/media-library/audio": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Media Library"
        ],
        "summary": "Deprecated playback endpoint without a media type",
        "deprecated": true,
        "description": "Retained for existing callers. This endpoint always returns an empty body. Use /media-library/{mediaType}/audio to get a playback link.",
        "operationId": "getProjectMediaLibraryAudioWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Always an empty body, since no media type is named.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "MediaLibraryRead or CallFlowRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/media-library/{mediaType}/audio": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Media Library"
        ],
        "summary": "Get a playback link for one media file",
        "description": "Returns a time-limited URL the browser can play directly, as a bare JSON string. Identify the file with `storage_name` for a greeting, survey or voicemail greeting, or with `tracking_number` for `callWhispers`. The `t2s` media type is different: it returns the text-to-speech service’s own URL so spoken text can be previewed before it is saved, and takes `text`, `language` and `voice` instead. An empty body means there is nothing to play, including when the named file is not in this project.",
        "operationId": "getProjectMediaLibraryAudioByTypeWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mediaType",
            "in": "path",
            "description": "Which media to play. `t2s` previews spoken text instead of a stored file.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "greetings",
                "surveys",
                "voicemails",
                "callWhispers",
                "t2s"
              ]
            }
          },
          {
            "name": "storage_name",
            "in": "query",
            "description": "The file to play, for greetings, surveys and voicemail greetings. Use the `id` returned by the listing.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tracking_number",
            "in": "query",
            "description": "The tracking number whose whisper to play, for callWhispers.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "text",
            "in": "query",
            "description": "The text to speak, for t2s.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "description": "Language of the spoken text, for t2s. Defaults to en-US.",
            "required": false,
            "example": "en-US",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "voice",
            "in": "query",
            "description": "Voice of the spoken text, for t2s. Defaults to female.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "female",
                "male"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The playback URL, or an empty body when there is nothing to play.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "MediaLibraryRead or CallFlowRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/media-library/{mediaType}:upload": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Media Library"
        ],
        "summary": "Upload media to a project",
        "description": "Uploads one audio file. Greetings, surveys and whispers are mp3 up to 8 MB; voicemail greetings are wav up to 2 MB. Greetings and surveys are re-encoded down to 128 kbit/s when they exceed it. A voicemail greeting takes one of nine numbered slots and is refused once they are all in use. A whisper attaches to a single tracking number, named by `s3Name` as `<tracking number>.mp3`; the number must belong to this project.",
        "operationId": "uploadProjectMediaLibraryWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mediaType",
            "in": "path",
            "description": "The kind of media being uploaded.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "greeting",
                "survey",
                "voicemail",
                "whisper"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "description": "The audio file. mp3, except for voicemail greetings, which are wav.",
                    "type": "string",
                    "format": "binary"
                  },
                  "number": {
                    "description": "Whisper only: the tracking number this whisper belongs to. A trailing `.mp3` is accepted and ignored. Ignored for other media types.",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Media stored."
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "MediaLibraryCreate permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Wrong container for the media type, file too large, no free voicemail slot, or the whisper’s tracking number is not in scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/spam-caller-filter:copy-to-brand": {
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Blocked callers"
        ],
        "summary": "Copy blocked callers to another project",
        "description": "Copies effective source blocks to another project in the same organization. Requires CallSpamFilterCreate in both projects. Organization-wide source blocks are copied as independent target-project blocks that survive removal of the organization-wide block. Existing target-project blocks and callers absent from the source do not create new blocks. Numeric callers are matched with or without a legacy + prefix; new blocks are stored without +. Anonymous callers are matched case-insensitively; new copies store lowercase anonymous. Surrounding whitespace in legacy stored callers is ignored when matching; existing rows are not rewritten. The existing frontend request names are retained for all clients. Default response is 204; include=results returns per-caller outcomes. History is preserved unless deletePastCalls is true, in which case matching call history in the target project is permanently deleted only for newly copied blocks, including independent copies of organization-wide blocks. History matching accepts either number format, anonymous case variants, and surrounding whitespace, without removing internal whitespace. Existing target-project blocks and callers absent from the source do not trigger history deletion.",
        "operationId": "copyProjectSpamCallersWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "description": "Organization ID (UUIDv7).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "Source project ID (UUIDv7).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `results` — returns a per-caller outcome instead of the default empty response.\n\nExample: `results`",
            "x-placeholder": "Example: results",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "results",
                      "description": "returns a per-caller outcome instead of the default empty response."
                    }
                  ]
                }
              ],
              "notes": [],
              "example": "results"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CopySpamCallersRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Per-caller outcomes when include=results is requested.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CopySpamCallersResult"
                }
              }
            }
          },
          "204": {
            "description": "Copy completed; existing target-project blocks and unavailable source callers are skipped."
          },
          "401": {
            "description": "Authentication required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Block creation permission is required in both projects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Source and target projects must differ.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid target, caller list, boolean, or unknown field.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{orgId}/projects/{projectId}/spam-caller-filter": {
      "get": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Blocked callers"
        ],
        "summary": "List the blocked callers of a project",
        "description": "Returns the callers blocked for this project, together with those blocked across the whole organization. `scope` is `project` or `organization`. `project_id` is the project ID (UUIDv7) for a project block, or null for an organization-wide block. Each item contains `number`, `scope`, and `project_id` by default. Add include=page.total_count to return the matching total; it is omitted otherwise.",
        "operationId": "getProjectSpamCallersWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `capabilities` — includes all allowed actions.\n• `capabilities.can_delete` — includes whether the authenticated user can unblock this caller in its scope.\n• `meta` — includes all timestamps.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n\nCollection-only expansions:\n\n• `page.total_count` — includes all effective project and organization blocks before pagination. Omitted by default.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta and capabilities are omitted unless requested.\n\nExample: `meta,capabilities.can_delete`",
            "x-placeholder": "Example: meta,capabilities.can_delete",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "capabilities",
                      "description": "includes all allowed actions."
                    },
                    {
                      "value": "capabilities.can_delete",
                      "description": "includes whether the authenticated user can unblock this caller in its scope."
                    },
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    }
                  ]
                },
                {
                  "title": "Collection-only expansions",
                  "options": [
                    {
                      "value": "page.total_count",
                      "description": "includes all effective project and organization blocks before pagination. Omitted by default."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta and capabilities are omitted unless requested."
              ],
              "example": "meta,capabilities.can_delete"
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Maximum blocked callers to return. Defaults to the configured API page size when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous response’s page.next URL. Do not construct or modify it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Blocked callers visible to this project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpamCallerListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "CallSpamFilterRead permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The pagination cursor is invalid or belongs to a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Blocked callers"
        ],
        "summary": "Block a caller",
        "description": "Blocks one caller so its future calls are filtered out. Set `scope` to `organization` to block across all projects; this requires access to every project in the organization. The default scope is `project`. For project-scoped blocks, `delete_past_calls=true` also permanently removes calls already recorded from that caller in this project. It defaults to false and has no effect for organization-wide blocks.",
        "operationId": "createProjectSpamCallerWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated includes. Omit this parameter to use the default response.\n\nSupported includes:\n\n• `capabilities` — includes all allowed actions.\n• `capabilities.can_delete` — includes whether the authenticated user can unblock this caller in its scope.\n• `meta` — includes all timestamps.\n• `meta.updated_at` — includes the last update timestamp in UTC.\n\nAn object name includes all its fields. A dotted field path includes only that field.\n\nMeta and capabilities are omitted unless requested.\n\nExample: `meta,capabilities.can_delete`",
            "x-placeholder": "Example: meta,capabilities.can_delete",
            "x-documentation": {
              "summary": "Add fields to the response using comma-separated values. Omit this parameter to receive the default response.",
              "groups": [
                {
                  "title": "Supported includes",
                  "options": [
                    {
                      "value": "capabilities",
                      "description": "includes all allowed actions."
                    },
                    {
                      "value": "capabilities.can_delete",
                      "description": "includes whether the authenticated user can unblock this caller in its scope."
                    },
                    {
                      "value": "meta",
                      "description": "includes all timestamps."
                    },
                    {
                      "value": "meta.updated_at",
                      "description": "includes the last update timestamp in UTC."
                    }
                  ]
                }
              ],
              "notes": [
                "An object name includes all its fields. A dotted field path includes only that field.",
                "Meta and capabilities are omitted unless requested."
              ],
              "example": "meta,capabilities.can_delete"
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSpamCallerRequest"
              }
            }
          },
          "description": "Caller to block.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "The blocked caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpamCaller"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "CallSpamFilterCreate permission is required. Organization scope also requires access to every project in the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The caller is already blocked in this project or across all projects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid number, scope, boolean, or unknown request field.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Blocked callers"
        ],
        "summary": "Unblock callers",
        "description": "Removes one or more callers from the filter. Each entry names the caller and its `scope`: `project` (the default) removes the block from this project, `organization` removes the organization-wide block. Organization scope requires access to every project in the organization.",
        "operationId": "deleteProjectSpamCallersWebApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "description": "Organization ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID (UUIDv7).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteSpamCallersRequest"
              }
            }
          },
          "description": "Callers to unblock.",
          "required": true
        },
        "responses": {
          "204": {
            "description": "Callers unblocked."
          },
          "401": {
            "description": "Authentication required or token expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "CallSpamFilterDelete permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "One of the named callers is not blocked in the given scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.nimbata.com"
    }
  ],
  "components": {
    "requestBodies": {
      "WriteTagCategoryRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/WriteTagCategoryRequest"
            }
          }
        },
        "required": true
      },
      "FormSubmissionTagIdsRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/FormSubmissionTagIdsRequest"
            }
          }
        },
        "required": true
      },
      "CallTagIdsRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CallTagIdsRequest"
            }
          }
        },
        "required": true
      },
      "CustomFieldValueRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CustomFieldValueRequest"
            }
          }
        },
        "required": true
      },
      "FieldIdsRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/FieldIdsRequest"
            }
          }
        },
        "required": true
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "description": "Enter your bearer token in the format Bearer <token>."
      }
    },
    "schemas": {
      "CursorPage": {
        "title": "Pagination links",
        "description": "Link to the next page of a collection. The next value is null when there are no more results.",
        "type": "object",
        "required": [
          "next"
        ],
        "properties": {
          "next": {
            "type": "string",
            "description": "Relative URL for the next page, or null when the collection is complete.",
            "nullable": true
          }
        }
      },
      "TrackingCode": {
        "title": "Tracking code",
        "type": "object",
        "required": [
          "published",
          "script",
          "group_tracking",
          "website_url",
          "call_tracking",
          "form_tracking"
        ],
        "properties": {
          "published": {
            "type": "boolean",
            "description": "Whether the script is published and served."
          },
          "script": {
            "$ref": "#/components/schemas/TrackingCodeScript"
          },
          "group_tracking": {
            "type": "object",
            "required": [
              "enabled",
              "shared_fields"
            ],
            "properties": {
              "enabled": {
                "type": "boolean",
                "description": "True when the organization serves all its projects with one shared script."
              },
              "shared_fields": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Under group tracking, the fields every project of the organization shares, as JSON pointers into this representation (for example `/website_url` or `/call_tracking/cookie_days`): changing one changes it for all. Empty otherwise."
              }
            }
          },
          "website_url": {
            "type": "string",
            "description": "The site the script runs on: a domain or a URL. Used by the Tracking Code page’s install check.",
            "nullable": true
          },
          "call_tracking": {
            "$ref": "#/components/schemas/TrackingCodeCallTracking"
          },
          "form_tracking": {
            "$ref": "#/components/schemas/TrackingCodeFormTracking"
          },
          "project_numbers": {
            "type": "array",
            "description": "Requires include=project_numbers. Every tracking number of the project, ordered by name and then display number, including those in no swap group and those of sources that are not tracked on the site. A swap target equal to one of the project’s numbers can be flagged with it.",
            "items": {
              "$ref": "#/components/schemas/TrackingCodeProjectNumber"
            }
          },
          "source_options": {
            "$ref": "#/components/schemas/TrackingCodeSourceOptions"
          },
          "status": {
            "type": "object",
            "description": "Requires include=status.",
            "required": [
              "stale"
            ],
            "properties": {
              "stale": {
                "type": "boolean",
                "description": "True when the published script is behind the project’s settings: its numbers or sources changed, or it does not report the responses of an embedded Typeform that form tracking captures. Publish again to update it."
              }
            }
          },
          "activity": {
            "$ref": "#/components/schemas/TrackingCodeActivity"
          }
        }
      },
      "TrackingCodeCallTracking": {
        "title": "Tracking code call tracking",
        "type": "object",
        "description": "What the script swaps, and how it attributes and keeps the visitor’s source. Form tracking uses `cookie_days`, `cookie_expiration` and `ga_client_id_cookie_name` too while call tracking runs; a script that only tracks forms keeps the source 21 days from the most recent visit and reads `_ga`.",
        "required": [
          "swap_type",
          "swap_groups",
          "unassigned_tracking_numbers",
          "attribution_model",
          "priority_source_ids",
          "use_cookie",
          "cookie_days",
          "cookie_expiration",
          "cookie_domain",
          "redact_texts",
          "spa_delay_seconds",
          "remove_country_code_from_links",
          "observe_dom_changes",
          "page_exclusions",
          "geo_swap",
          "ga_client_id_cookie_name"
        ],
        "properties": {
          "swap_type": {
            "type": "string",
            "enum": [
              "number",
              "span"
            ],
            "description": "`number` replaces the target phone numbers wherever they appear on the page; `span` replaces the contents of elements carrying a group’s `span_class`."
          },
          "swap_groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TrackingCodeSwapGroup"
            },
            "description": "Groups of tracking numbers, each replacing its own targets, for pages that show several phone numbers. Most sites need one. These are the saved groups (one group while none is saved), padded as the Tracking Code page pads them: while the project’s DNI numbers are stored in more distinct groups than the list has, empty groups named `Swap Group n` (n is the position) are added. Numbers never placed in a group, or taken out of their group, do not count toward that. A number is listed in the group it is stored in."
          },
          "unassigned_tracking_numbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TrackingCodeTrackingNumber"
            },
            "description": "The project’s DNI numbers that are in none of `swap_groups`: numbers never placed in a group, taken out of their group, or stored in a group at or past the end of `swap_groups` (after its padding). The Tracking Code page shows them as unassigned and asks for each to be placed before it publishes. The published script treats a number never placed in a group as the first group’s. A `PUT` that sends `swap_groups` and does not list one of them in a group’s `tracking_number_ids` puts it in the first group, except a number stored in a group past the end of `swap_groups`: it stays in that group when the list sent is long enough to include it."
          },
          "attribution_model": {
            "type": "string",
            "enum": [
              "first_click",
              "last_click"
            ],
            "description": "Whether a visitor keeps the source of the first visit or takes the most recent one."
          },
          "priority_source_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Tracking sources that override the first visit’s source under `first_click` (Source Override on the page). Each is the source of one of the project’s DNI numbers."
          },
          "use_cookie": {
            "type": "boolean",
            "description": "Whether the visitor’s source is kept between visits."
          },
          "cookie_days": {
            "type": "integer",
            "minimum": 0,
            "maximum": 365,
            "description": "How many days the source is kept. A save stores at least 1."
          },
          "cookie_expiration": {
            "type": "string",
            "enum": [
              "first",
              "last"
            ],
            "description": "Whether `cookie_days` counts from the first or from the most recent visit."
          },
          "cookie_domain": {
            "type": "string",
            "description": "Domain the cookie is set on, to share it across subdomains (for example `example.com`; a leading dot is optional).",
            "nullable": true
          },
          "redact_texts": {
            "type": "string",
            "description": "Numbers and texts the script removes from the site, so that only tracking numbers show (Numbers to redact on the page): phone numbers or leading texts, separated by commas. A `#` ends that list and starts comma separated CSS selectors, whose elements the script removes from the page too (for example `555-0100, Call us#.header-phone,.promo-bar`). Null when there are none.",
            "nullable": true
          },
          "spa_delay_seconds": {
            "type": "integer",
            "minimum": 1,
            "maximum": 3,
            "description": "For single page applications: seconds to wait after a page change before swapping again. Null turns this off.",
            "nullable": true
          },
          "remove_country_code_from_links": {
            "type": "boolean",
            "description": "Whether swapped `tel:` links leave out the country code."
          },
          "observe_dom_changes": {
            "type": "boolean",
            "description": "Whether numbers added to the page after it loads are swapped too."
          },
          "page_exclusions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Paths, starting with `/`, of pages where no numbers are swapped."
          },
          "geo_swap": {
            "type": "boolean",
            "description": "Whether visitors get a number local to them (Geo Swap). Turning it on needs the Geo Swap plan feature."
          },
          "ga_client_id_cookie_name": {
            "type": "string",
            "description": "Cookie holding the Google Analytics client id: `_ga`, or another name with server-side tagging."
          }
        }
      },
      "TrackingCodeScript": {
        "title": "Tracking code script",
        "type": "object",
        "required": [
          "id",
          "src",
          "embed_srcs",
          "snippet_ids",
          "published_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The script id, as in its file name."
          },
          "src": {
            "type": "string",
            "description": "URL the script is served from."
          },
          "embed_srcs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The script URLs to embed on every page of the site, each in its own `<script type=\"text/javascript\" src=\"…\"></script>` tag before `</body>`; the script of `id` comes first. Older setups may list more than one script."
          },
          "snippet_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The ids of the scripts the project’s snippet embeds, as the Tracking Code page lists them: one tag per id, in no particular order. They come from the project’s script rows (its saved settings, its form tracking, or the bare row a number purchase or a collected data change creates), else from the script ids its numbers are stored with. The page assigns the project’s DNI numbers to its script before it lists them, so while no script row exists and the project has DNI numbers that publishing would assign, the list holds that script’s id; reading assigns nothing. Empty when there is no script row and no such number, so there is nothing to embed yet; `embed_srcs` still holds the URL of `id`. Under group tracking the id is the organization’s shared script."
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the served script was last published, in UTC; null when none is published.",
            "nullable": true
          }
        }
      },
      "TrackingCodeSwapGroup": {
        "title": "Tracking code swap group",
        "type": "object",
        "required": [
          "name",
          "targets",
          "span_class",
          "tracking_numbers"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "targets": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Phone numbers as the site shows them, which this group’s tracking numbers replace. Empty with `span` swapping."
          },
          "span_class": {
            "type": "string",
            "description": "The HTML class the published script swaps for this group under `span` swapping: put it on the element that shows the group’s number, for example `<span class=\"nimbata_number\">555-555-5555</span>`. It is `{name}_number` while the project has one group and `{name}_number_{n}` with several, where n is the group’s position in `swap_groups` counted from 1 and the name is the white label’s subdomain (`nimbata` for Nimbata’s own). A published script keeps the name it was published with, so the class follows that script rather than the organization’s current white label. Always present, whatever `swap_type` is."
          },
          "tracking_numbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TrackingCodeTrackingNumber"
            },
            "description": "The DNI numbers stored in this group. Numbers in no group are in `unassigned_tracking_numbers` instead."
          }
        }
      },
      "TrackingCodeTrackingNumber": {
        "title": "Tracking code tracking number",
        "type": "object",
        "required": [
          "id",
          "number",
          "display_number",
          "name",
          "country",
          "tracking_source_id",
          "tracking_source_name",
          "served"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Tracking number ID (UUIDv7)."
          },
          "number": {
            "type": "string",
            "description": "E.164 phone number."
          },
          "display_number": {
            "type": "string",
            "description": "The number as it is formatted for people, for example `(817) 555-0101`. Null when none is stored.",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "country": {
            "type": "string",
            "description": "Upper case ISO 3166-1 alpha-2 code of the number’s country. Null when none is stored.",
            "nullable": true
          },
          "tracking_source_id": {
            "type": "string",
            "format": "uuid",
            "description": "The number’s tracking source. Null when no source row resolves.",
            "nullable": true
          },
          "tracking_source_name": {
            "type": "string",
            "description": "The name of the number’s tracking source, as the Tracking Code page shows it: the shared source’s name, else the project’s own source’s. When no source resolves (`tracking_source_id` is null) it is the source key stored on the number. Null when the number has no source.",
            "nullable": true
          },
          "served": {
            "type": "boolean",
            "description": "True when the number is active and has a call flow, so visitors can be shown it."
          },
          "location": {
            "type": "object",
            "description": "Requires include=number_locations. Null when the number’s area is unknown.",
            "properties": {
              "area_key": {
                "type": "string",
                "description": "Identifies the area Geo Swap groups numbers by, such as `817` or `117`. Equal for numbers of one area, so use it to group them; `area_code` is the form to show."
              },
              "area_code": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "region": {
                "type": "string",
                "nullable": true
              },
              "country": {
                "type": "string"
              }
            },
            "nullable": true
          }
        }
      },
      "TrackingCodeProjectNumber": {
        "title": "Tracking code project number",
        "type": "object",
        "required": [
          "id",
          "number",
          "display_number",
          "name",
          "country",
          "tracking_source_id",
          "dni_compatible"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Tracking number ID (UUIDv7)."
          },
          "number": {
            "type": "string",
            "description": "E.164 phone number."
          },
          "display_number": {
            "type": "string",
            "description": "The number as it is formatted for people, for example `(817) 555-0101`. Null when none is stored.",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "country": {
            "type": "string",
            "description": "Upper case ISO 3166-1 alpha-2 code of the number’s country. Null when none is stored.",
            "nullable": true
          },
          "tracking_source_id": {
            "type": "string",
            "format": "uuid",
            "description": "The number’s tracking source. Null when no source row resolves.",
            "nullable": true
          },
          "dni_compatible": {
            "type": "boolean",
            "description": "True when the number’s source is one the script attributes visits to, so the number can be swapped onto the site. A swap target may not be such a number."
          }
        }
      },
      "TrackingCodeSourceOptions": {
        "title": "Tracking code source options",
        "type": "object",
        "description": "Requires include=source_options. The tracking sources a save can name, which are the lists it validates against: a source listed here is accepted, any other is refused.",
        "required": [
          "priority",
          "form_tracking"
        ],
        "properties": {
          "priority": {
            "type": "array",
            "description": "The sources `call_tracking.priority_source_ids` accepts: those of the project’s tracking numbers that are in the script’s pool and whose source type the script attributes visits to.",
            "items": {
              "$ref": "#/components/schemas/TrackingCodeSourceOption"
            }
          },
          "form_tracking": {
            "type": "array",
            "description": "The sources `form_tracking.source_ids` accepts: the shared sources and the project’s own, except REST sources and types the script does not attribute visits to.",
            "items": {
              "$ref": "#/components/schemas/TrackingCodeSourceOption"
            }
          }
        }
      },
      "TrackingCodeSourceOption": {
        "title": "Tracking code source option",
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Tracking source ID (UUIDv7)."
          },
          "name": {
            "type": "string",
            "description": "The name of the tracking source."
          }
        }
      },
      "TrackingCodeFormTracking": {
        "title": "Tracking code form tracking",
        "type": "object",
        "required": [
          "enabled",
          "pages",
          "forms",
          "source_ids",
          "vendors"
        ],
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether the script captures form submissions."
          },
          "pages": {
            "type": "object",
            "required": [
              "mode",
              "paths"
            ],
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "all",
                  "include",
                  "exclude"
                ],
                "description": "All pages, only the listed paths, or all but the listed paths."
              },
              "paths": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "forms": {
            "type": "object",
            "required": [
              "mode",
              "selectors"
            ],
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "all",
                  "include",
                  "exclude"
                ],
                "description": "All forms, only the listed ones, or all but the listed ones."
              },
              "selectors": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Form ids or names."
              }
            }
          },
          "source_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Tracking sources whose visitors’ submissions are captured; empty captures every source."
          },
          "vendors": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "native_html",
                "calendly",
                "cf7",
                "duda",
                "fluent_forms",
                "gohighlevel",
                "gravity_forms",
                "gutena",
                "hubspot",
                "ninja_forms",
                "squarespace",
                "typeform",
                "wix",
                "wpforms"
              ]
            },
            "description": "Form builders whose embedded forms are captured. Plain HTML forms (`native_html`) always are. Under group tracking the shared script captures the form builders of every project with form tracking on."
          }
        }
      },
      "TrackingCodeActivity": {
        "title": "Tracking code activity",
        "type": "object",
        "description": "Requires include=activity.",
        "required": [
          "visit_status",
          "last_visit",
          "last_activity"
        ],
        "properties": {
          "visit_status": {
            "type": "string",
            "enum": [
              "never",
              "active",
              "idle"
            ],
            "description": "`active` when the last visit is at most 48 hours old."
          },
          "last_visit": {
            "$ref": "#/components/schemas/TrackingCodeActivityEvent"
          },
          "last_activity": {
            "type": "object",
            "description": "The most recent visit, form submission or install check, with its `kind`.",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "visit",
                  "form_submission",
                  "verification_check"
                ]
              },
              "at": {
                "type": "string",
                "format": "date-time"
              },
              "host": {
                "type": "string",
                "nullable": true
              },
              "path_query": {
                "type": "string",
                "nullable": true
              }
            },
            "nullable": true
          }
        }
      },
      "TrackingCodeActivityEvent": {
        "title": "Tracking code activity event",
        "type": "object",
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time",
            "description": "When it happened, in UTC."
          },
          "host": {
            "type": "string",
            "description": "Host of the page.",
            "nullable": true
          },
          "path_query": {
            "type": "string",
            "description": "Path and query of the page.",
            "nullable": true
          }
        },
        "nullable": true
      },
      "UnpublishTrackingCodeResult": {
        "title": "Tracking code unpublish result",
        "type": "object",
        "required": [
          "removed"
        ],
        "properties": {
          "removed": {
            "type": "boolean",
            "description": "True when a published script was removed; false when none was published."
          }
        }
      },
      "UpdateTrackingCodeRequest": {
        "title": "Update tracking code request",
        "type": "object",
        "description": "Every field is optional; send only the ones to change. The fields mean what they mean in the response.",
        "properties": {
          "website_url": {
            "type": "string",
            "maxLength": 2048,
            "description": "The site’s address, with `http://` or `https://` or as a bare domain; its host must be a domain, an IP address or `localhost`. `null` clears it.",
            "nullable": true
          },
          "call_tracking": {
            "type": "object",
            "description": "Send only the fields to change; omitted ones stay as they are.",
            "properties": {
              "swap_type": {
                "type": "string",
                "enum": [
                  "number",
                  "span"
                ]
              },
              "swap_groups": {
                "type": "array",
                "minItems": 1,
                "maxItems": 50,
                "description": "Replaces every swap group.",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100,
                      "description": "Defaults to `Swap Group n` when left out; a blank name is refused."
                    },
                    "targets": {
                      "type": "array",
                      "maxItems": 100,
                      "items": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "description": "Phone numbers as the site shows them, each with at least one digit, since the script replaces the text exactly as written. Must be empty with `span` swapping."
                    },
                    "tracking_number_ids": {
                      "type": "array",
                      "maxItems": 1000,
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "description": "DNI numbers to move into this group, including those the representation lists in `call_tracking.unassigned_tracking_numbers`. A DNI number that no group lists keeps its group while the list sent still has it, and otherwise joins the first group."
                    }
                  }
                }
              },
              "attribution_model": {
                "type": "string",
                "enum": [
                  "first_click",
                  "last_click"
                ]
              },
              "priority_source_ids": {
                "type": "array",
                "maxItems": 1000,
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "use_cookie": {
                "type": "boolean"
              },
              "cookie_days": {
                "type": "integer",
                "minimum": 0,
                "maximum": 365,
                "description": "Days the visitor’s source is kept, 0 to 365. A 0 is saved as 1 (one day), as on the Tracking Code page. To keep none, turn `use_cookie` off."
              },
              "cookie_expiration": {
                "type": "string",
                "enum": [
                  "first",
                  "last"
                ]
              },
              "cookie_domain": {
                "type": "string",
                "minLength": 1,
                "maxLength": 253,
                "description": "A host name, optionally with a leading dot (for example `example.com`), saved in lower case. The script sets the cookie on the host and its subdomains either way. `null` clears it.",
                "nullable": true
              },
              "redact_texts": {
                "type": "string",
                "maxLength": 2048,
                "description": "Phone numbers or leading texts to remove from the site, separated by commas, on one line. A `#` ends that list and starts comma separated CSS selectors, whose elements are removed from the page too (for example `555-0100, Call us#.header-phone,.promo-bar`); a selector cannot contain a `#`, so use classes or attributes rather than ids. Surrounding spaces are trimmed; an empty text or `null` clears it.",
                "nullable": true
              },
              "spa_delay_seconds": {
                "type": "integer",
                "minimum": 1,
                "maximum": 3,
                "nullable": true
              },
              "remove_country_code_from_links": {
                "type": "boolean"
              },
              "observe_dom_changes": {
                "type": "boolean"
              },
              "page_exclusions": {
                "type": "array",
                "maxItems": 100,
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500,
                  "pattern": "^[a-zA-Z0-9/\\-_~]*(?:\\.(php|html|htm|asp|aspx|jsp|cgi|pl|py|rb))?$"
                },
                "description": "Page paths: letters, digits and `/ - _ ~`, optionally ending in a page extension such as `.html` or `.php`. A missing leading `/` is added and repeats are dropped."
              },
              "geo_swap": {
                "type": "boolean"
              },
              "ga_client_id_cookie_name": {
                "type": "string",
                "maxLength": 100,
                "pattern": "^[A-Za-z0-9#$%&*+\\-.^_|~]+$",
                "description": "A cookie name: letters, digits and `# $ % & * + - . ^ _ | ~`."
              }
            }
          },
          "form_tracking": {
            "type": "object",
            "description": "Send only the parts to change. `pages` and `forms`, when sent, replace their rule. While form tracking is off, only the `all` rules and an empty `source_ids` are accepted.",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "pages": {
                "type": "object",
                "required": [
                  "mode"
                ],
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "all",
                      "include",
                      "exclude"
                    ]
                  },
                  "paths": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500,
                      "pattern": "^[a-zA-Z0-9/\\-_~]*(?:\\.(php|html|htm|asp|aspx|jsp|cgi|pl|py|rb))?$"
                    },
                    "description": "Page paths, as for `call_tracking.page_exclusions`. Required for `include` and `exclude`; empty or left out for `all`."
                  }
                }
              },
              "forms": {
                "type": "object",
                "required": [
                  "mode"
                ],
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "all",
                      "include",
                      "exclude"
                    ]
                  },
                  "selectors": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "description": "Required for `include` and `exclude`; empty or left out for `all`."
                  }
                }
              },
              "source_ids": {
                "type": "array",
                "maxItems": 1000,
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "vendors": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "native_html",
                    "calendly",
                    "cf7",
                    "duda",
                    "fluent_forms",
                    "gohighlevel",
                    "gravity_forms",
                    "gutena",
                    "hubspot",
                    "ninja_forms",
                    "squarespace",
                    "typeform",
                    "wix",
                    "wpforms"
                  ]
                },
                "description": "Plain HTML forms (`native_html`) are always captured, whether listed or not."
              }
            }
          }
        },
        "example": {
          "website_url": "https://client-site.com",
          "call_tracking": {
            "swap_type": "number",
            "swap_groups": [
              {
                "name": "Main site",
                "targets": [
                  "(555) 010-0000"
                ]
              }
            ]
          }
        }
      },
      "Webhook": {
        "title": "Webhook",
        "type": "object",
        "required": [
          "id",
          "project_id",
          "name",
          "event_type",
          "endpoint_url",
          "is_valid",
          "auth",
          "extra_params",
          "payload"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Webhook ID (UUIDv7)."
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Project ID (UUIDv7)."
          },
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "How the webhook is listed in the app and in workflow steps. Up to 100 characters."
          },
          "event_type": {
            "type": "string",
            "enum": [
              "call",
              "form",
              "sms"
            ],
            "description": "The event data the webhook sends: `call` for workflows that run on calls (when a call starts, when it ends, or on a user action on a call), `form` for form submissions, `sms` for SMS messages. Cannot change while a workflow uses it."
          },
          "endpoint_url": {
            "type": "string",
            "description": "https URL on a public host. Null only for webhooks created before the API without a URL.",
            "nullable": true
          },
          "is_valid": {
            "type": "boolean",
            "description": "False when the webhook cannot deliver, for example without a URL."
          },
          "auth": {
            "$ref": "#/components/schemas/WebhookAuth"
          },
          "extra_params": {
            "type": "array",
            "description": "Fixed headers or query parameters added to every request the webhook sends, besides its authentication: for example a static key, an account id or a source tag the receiving endpoint expects. Values are never returned; `value_set` says whether one is saved.",
            "items": {
              "$ref": "#/components/schemas/WebhookExtraParam"
            }
          },
          "payload": {
            "$ref": "#/components/schemas/WebhookPayload"
          },
          "meta": {
            "type": "object",
            "description": "Include-only meta.",
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Creation timestamp in UTC. Requires include=meta or include=meta.created_at."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Last update timestamp in UTC. Requires include=meta or include=meta.updated_at."
              }
            }
          }
        }
      },
      "WebhookAuth": {
        "title": "Webhook authentication",
        "description": "In requests, send the secret field of the chosen type: `token` (bearer_token), `value` (api_key) or `password` (basic_auth). Leave it out to keep the saved secret; it must be sent again after the endpoint URL or the type changes. Responses never contain secrets.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "none",
              "bearer_token",
              "api_key",
              "basic_auth",
              "other"
            ]
          },
          "key": {
            "type": "string",
            "description": "api_key: header or query parameter name."
          },
          "position": {
            "type": "string",
            "enum": [
              "header",
              "query"
            ],
            "description": "api_key: where the key is sent."
          },
          "username": {
            "type": "string",
            "description": "basic_auth user name."
          },
          "token": {
            "type": "string",
            "description": "bearer_token secret. Write-only."
          },
          "value": {
            "type": "string",
            "description": "api_key secret. Write-only."
          },
          "password": {
            "type": "string",
            "description": "basic_auth secret. Write-only."
          },
          "secret_set": {
            "type": "boolean",
            "readOnly": true,
            "description": "Whether a secret is saved."
          }
        }
      },
      "WebhookExtraParam": {
        "title": "Webhook extra parameter",
        "description": "A fixed header or query parameter added to every request the webhook sends, besides its authentication: for example a static key, an account id or a source tag the receiving endpoint expects. Its value is write-only.",
        "type": "object",
        "required": [
          "key",
          "position"
        ],
        "properties": {
          "key": {
            "type": "string",
            "description": "The header name when `position` is `header`, or the query parameter name when it is `query`."
          },
          "position": {
            "type": "string",
            "enum": [
              "header",
              "query"
            ],
            "description": "`header` sends the parameter as an HTTP request header; `query` adds it to the endpoint URL’s query string."
          },
          "value": {
            "type": "string",
            "description": "The value sent. Write-only. Leave it out to keep the saved value of the same key while the endpoint URL is unchanged."
          },
          "value_set": {
            "type": "boolean",
            "readOnly": true,
            "description": "Whether a value is saved."
          }
        }
      },
      "WebhookPayload": {
        "title": "Webhook payload",
        "description": "Some payloads, such as Google Analytics 4 events, can only be set up in the app; a webhook with one shows no fields here.",
        "type": "object",
        "required": [
          "use_data_object",
          "fields"
        ],
        "properties": {
          "use_data_object": {
            "type": "boolean",
            "description": "Wrap the fields in a `data` object."
          },
          "fields": {
            "type": "array",
            "description": "Body fields: `name` is the JSON key sent; `field` is an event field, as listed by GET /orgs/{orgId}/projects/{projectId}/webhooks:fields for the webhook’s event type, and any other text is sent as a fixed value. A field saved under an earlier name of an event field is returned under its current name.",
            "items": {
              "type": "object",
              "required": [
                "name",
                "field"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "field": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "WebhookField": {
        "title": "Webhook field",
        "type": "object",
        "required": [
          "field",
          "label",
          "event_type",
          "kind"
        ],
        "properties": {
          "field": {
            "type": "string",
            "description": "The name to use in a webhook’s `payload.fields[].field`.",
            "example": "caller_id"
          },
          "label": {
            "type": "string",
            "description": "The field’s name in the app.",
            "example": "Caller ID"
          },
          "event_type": {
            "type": "string",
            "enum": [
              "call",
              "form",
              "sms"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "system",
              "custom_field",
              "custom_parameter",
              "tracking_cookie",
              "local_storage"
            ],
            "description": "`system` for built-in fields; the others are the project’s own custom fields, custom tracking parameters, tracking cookies and local storage keys."
          }
        }
      },
      "WebhookFieldListResponse": {
        "title": "Webhook field list response",
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookField"
            }
          }
        }
      },
      "WebhookListResponse": {
        "title": "Webhook list response",
        "type": "object",
        "required": [
          "items",
          "page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Webhook"
            }
          },
          "page": {
            "$ref": "#/components/schemas/CursorPage"
          }
        }
      },
      "IntegrationEvent": {
        "title": "Integration event",
        "description": "One delivery attempt to an integration, one Google Ads conversion waiting for upload, or one project-level integration event.",
        "type": "object",
        "required": [
          "id",
          "integration",
          "event_id",
          "result",
          "response_code",
          "attempted_at",
          "subject",
          "detail",
          "project_id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Opaque identifier of the event, for removing duplicates while polling. Stable for delivered events; the id of a queued conversion can change if its Google Ads conversion settings change. It cannot be used to read the event."
          },
          "integration": {
            "type": "string",
            "enum": [
              "cometly",
              "criteo",
              "dynamics",
              "email",
              "facebook",
              "ga",
              "gohighlevel",
              "googleads",
              "gsheets",
              "hubspot",
              "jobber",
              "make",
              "microsoft",
              "openai_ads",
              "pipedrive",
              "salesforce",
              "slack",
              "webhook",
              "zapier",
              "zoho"
            ],
            "description": "The integration: `cometly` (Cometly), `criteo` (Criteo), `dynamics` (Microsoft Dynamics), `email` (Email Alerts), `facebook` (Meta), `ga` (Google Analytics), `gohighlevel` (GoHighLevel), `googleads` (Google Ads), `gsheets` (Google Sheets), `hubspot` (HubSpot), `jobber` (Jobber), `make` (Make), `microsoft` (Microsoft Ads), `openai_ads` (OpenAI Ads), `pipedrive` (Pipedrive), `salesforce` (Salesforce), `slack` (Slack), `webhook` (Webhook), `zapier` (Zapier), `zoho` (Zoho)."
          },
          "event_id": {
            "type": "string",
            "description": "The configured target the event was sent to. `webhook`: the webhook ID (UUIDv7), or null once the webhook is deleted. `email`: the email alert ID (UUIDv7), or null once the alert is deleted. `slack`: the Slack alert ID (UUIDv7), or null once the alert is deleted. `zapier`: an opaque, stable reference (`zap_` and 20 hexadecimal characters), never the Zap URL. `googleads`: the conversion action ID, the same for a queued conversion and its upload. Every other integration: the identifier the app shows for the configuration, such as a pixel, account or event name. Null for project-level events.",
            "nullable": true
          },
          "result": {
            "type": "string",
            "enum": [
              "success",
              "failed",
              "skipped",
              "queued",
              "unknown"
            ],
            "description": "`success`: delivered. `failed`: the integration refused it or could not be reached. `skipped`: not sent, for example because the configuration had no URL. `queued`: a Google Ads conversion waiting for upload. `unknown`: any other outcome."
          },
          "response_code": {
            "type": "integer",
            "description": "The HTTP status the integration answered with, when there was one.",
            "nullable": true
          },
          "attempted_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the attempt was made, in UTC. For a queued conversion, when it was queued."
          },
          "subject": {
            "type": "object",
            "description": "What was sent: a call by its `uu_id_a`, a form submission by its ID, or an SMS message by its ID (null when the message is no longer the project’s). Null for project-level events.",
            "required": [
              "type",
              "id"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "call",
                  "form",
                  "sms"
                ]
              },
              "id": {
                "type": "string",
                "nullable": true
              }
            },
            "nullable": true
          },
          "detail": {
            "type": "string",
            "maxLength": 500,
            "description": "A short description of a project-level event. Null for delivery attempts.",
            "nullable": true
          },
          "details": {
            "type": "object",
            "additionalProperties": true,
            "description": "Only with `include=details`: what a project-level event stored beyond its `detail`, with credentials redacted. An empty object for delivery attempts."
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "The project the event belongs to (UUIDv7), or null once the project is deleted.",
            "nullable": true
          },
          "upload_due_at": {
            "type": "string",
            "format": "date-time",
            "description": "Queued conversions only: when the conversion becomes due for upload, in UTC.",
            "nullable": true
          },
          "expected_upload_at": {
            "type": "string",
            "format": "date-time",
            "description": "Queued conversions only: when the upload run expected to send it starts, in UTC.",
            "nullable": true
          }
        }
      },
      "IntegrationEventListResponse": {
        "title": "Integration event list response",
        "type": "object",
        "required": [
          "items",
          "page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationEvent"
            }
          },
          "page": {
            "$ref": "#/components/schemas/CursorPage"
          }
        }
      },
      "IntegrationDelivery": {
        "title": "Integration delivery",
        "description": "What Nimbata sent to one integration, for one configured target, for a call or form submission, with the attempts made to send it.",
        "type": "object",
        "required": [
          "integration",
          "event_id",
          "result",
          "last_attempted_at",
          "attempts"
        ],
        "properties": {
          "integration": {
            "type": "string",
            "enum": [
              "cometly",
              "criteo",
              "dynamics",
              "email",
              "facebook",
              "ga",
              "gohighlevel",
              "googleads",
              "gsheets",
              "hubspot",
              "jobber",
              "make",
              "microsoft",
              "openai_ads",
              "pipedrive",
              "salesforce",
              "slack",
              "webhook",
              "zapier",
              "zoho"
            ],
            "description": "The integration: `cometly` (Cometly), `criteo` (Criteo), `dynamics` (Microsoft Dynamics), `email` (Email Alerts), `facebook` (Meta), `ga` (Google Analytics), `gohighlevel` (GoHighLevel), `googleads` (Google Ads), `gsheets` (Google Sheets), `hubspot` (HubSpot), `jobber` (Jobber), `make` (Make), `microsoft` (Microsoft Ads), `openai_ads` (OpenAI Ads), `pipedrive` (Pipedrive), `salesforce` (Salesforce), `slack` (Slack), `webhook` (Webhook), `zapier` (Zapier), `zoho` (Zoho)."
          },
          "event_id": {
            "type": "string",
            "description": "The configured target the delivery was sent to. `webhook`: the webhook ID (UUIDv7), or null once the webhook is deleted. `email`: the email alert ID (UUIDv7), or null once the alert is deleted. `slack`: the Slack alert ID (UUIDv7), or null once the alert is deleted. `zapier`: an opaque, stable reference (`zap_` and 20 hexadecimal characters), never the Zap URL. `googleads`: the conversion action ID, the same for a queued conversion and its upload. Every other integration: the identifier the app shows for the configuration, such as a pixel, account or event name. Null for an integration that recorded an outcome without naming a target.",
            "nullable": true
          },
          "result": {
            "type": "string",
            "enum": [
              "success",
              "failed",
              "skipped",
              "queued",
              "unknown"
            ],
            "description": "The outcome of the newest attempt. `success`: delivered. `failed`: the integration refused it or could not be reached. `skipped`: not sent, for example because the configuration had no URL. `queued`: a Google Ads conversion waiting for upload. `unknown`: any other outcome."
          },
          "last_attempted_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the newest attempt was made, in UTC. For a queued conversion, when it was queued."
          },
          "attempts": {
            "type": "array",
            "description": "Every attempt, oldest first. Empty when only the outcome of the delivery was recorded.",
            "items": {
              "$ref": "#/components/schemas/IntegrationAttempt"
            }
          }
        }
      },
      "IntegrationAttempt": {
        "title": "Integration attempt",
        "description": "One attempt to send a call or form submission to an integration.",
        "type": "object",
        "required": [
          "result",
          "response_code",
          "attempted_at",
          "error",
          "workflow"
        ],
        "properties": {
          "result": {
            "type": "string",
            "enum": [
              "success",
              "failed",
              "skipped",
              "queued",
              "unknown"
            ],
            "description": "`success`: delivered. `failed`: the integration refused it or could not be reached. `skipped`: not sent, for example because the configuration had no URL. `queued`: a Google Ads conversion waiting for upload. `unknown`: any other outcome."
          },
          "response_code": {
            "type": "integer",
            "description": "The HTTP status the integration answered with, when there was one.",
            "nullable": true
          },
          "attempted_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the attempt was made, in UTC. For a queued conversion, when it was queued."
          },
          "error": {
            "type": "string",
            "maxLength": 500,
            "description": "A short reason lifted from the integration’s response, which is the integration’s own text. Null for an attempt that did not fail or skip, and when the response gave no reason.",
            "nullable": true
          },
          "workflow": {
            "type": "object",
            "description": "The workflow step that sent the attempt. Null when no workflow sent it.",
            "required": [
              "id",
              "step_id",
              "run_id"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "The workflow ID, or null once the workflow is deleted.",
                "nullable": true
              },
              "step_id": {
                "type": "string",
                "description": "The step of the workflow that sent the attempt.",
                "nullable": true
              },
              "run_id": {
                "type": "string",
                "description": "Opaque, stable reference of the workflow run that sent the attempt (`wr_` and 20 hexadecimal characters), the `id` of the run in the workflow runs of the call or form submission.",
                "nullable": true
              }
            },
            "nullable": true
          },
          "upload_due_at": {
            "type": "string",
            "format": "date-time",
            "description": "Queued attempts only: when the conversion becomes due for upload, in UTC.",
            "nullable": true
          },
          "expected_upload_at": {
            "type": "string",
            "format": "date-time",
            "description": "Queued attempts only: when the upload run expected to send it starts, in UTC.",
            "nullable": true
          },
          "request_payload": {
            "description": "Only with `include=attempts.request_payload`: the body sent to the integration, with credentials redacted. Null when none was recorded.",
            "nullable": true
          },
          "response": {
            "description": "Only with `include=attempts.response`: what the integration answered with, usually an object and sometimes text. Null when none was recorded.",
            "nullable": true
          },
          "request_details": {
            "type": "object",
            "additionalProperties": true,
            "description": "Only with `include=attempts.request_details`: request metadata such as the endpoint and method, with credentials redacted. The target URL of a Zapier, Make or Cometly delivery is never included. Null when none was recorded.",
            "nullable": true
          }
        }
      },
      "IntegrationDeliveryListResponse": {
        "title": "Integration delivery list response",
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationDelivery"
            }
          }
        }
      },
      "Workflow": {
        "title": "Workflow",
        "description": "A workflow in the shape every workflow endpoint returns it. `name`, `triggering_event`, `call_direction`, `trigger_options` and `stages` are the fields create and update take.",
        "type": "object",
        "required": [
          "id",
          "org_id",
          "project_id",
          "name",
          "triggering_event",
          "call_direction",
          "trigger_options",
          "stages",
          "is_active",
          "is_valid",
          "execution_order",
          "etag"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Workflow ID (UUIDv7)."
          },
          "org_id": {
            "type": "string",
            "format": "uuid",
            "description": "Organization ID (UUIDv7)."
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Project ID (UUIDv7)."
          },
          "name": {
            "type": "string",
            "description": "The workflow’s name."
          },
          "triggering_event": {
            "$ref": "#/components/schemas/WorkflowTriggeringEvent"
          },
          "call_direction": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ],
            "description": "The calls a call workflow runs on. A call workflow without a direction runs on inbound calls; other workflows have none.",
            "nullable": true
          },
          "trigger_options": {
            "$ref": "#/components/schemas/WorkflowTriggerOptions"
          },
          "stages": {
            "type": "array",
            "description": "The steps of the workflow, each with the stages that follow it in `children`.",
            "items": {
              "$ref": "#/components/schemas/WorkflowStage"
            }
          },
          "is_active": {
            "type": "boolean",
            "description": "Whether the workflow is on."
          },
          "is_valid": {
            "type": "boolean",
            "description": "False while the definition names something the project lacks, such as a copy that needs review. A workflow runs only while this and `is_active` are both true."
          },
          "execution_order": {
            "type": "integer",
            "description": "Its place in the project’s run order, lowest first. Change it with :reorder."
          },
          "etag": {
            "type": "string",
            "description": "The workflow’s version as an opaque strong ETag, such as `\"3\"`. Send it back unchanged in `If-Match`, and do not parse it. Turning a workflow on or off and reordering do not change it."
          },
          "meta": {
            "type": "object",
            "description": "Only with `include=meta` or one of its fields.",
            "properties": {
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the workflow last changed, in UTC.",
                "nullable": true
              },
              "updated_by": {
                "type": "string",
                "format": "uuid",
                "description": "The user who last changed it. Null for a change the system made.",
                "nullable": true
              }
            }
          },
          "review": {
            "type": "array",
            "description": "Only with `include=review`: what a workflow that is not valid must fix before it can be turned on. Empty for a valid workflow.",
            "items": {
              "$ref": "#/components/schemas/WorkflowReviewItem"
            }
          }
        }
      },
      "WorkflowTriggeringEvent": {
        "type": "string",
        "enum": [
          "call_end",
          "call_start",
          "user_action",
          "sms_in",
          "sms_user_action",
          "form_submitted",
          "form_user_action"
        ],
        "description": "What starts the workflow: a call ending or starting, a user changing a call (`user_action`), a text message arriving or a user changing one (`sms_user_action`), or a form being submitted or a user changing a submission (`form_user_action`)."
      },
      "WorkflowTriggerOptions": {
        "title": "Workflow trigger options",
        "description": "Options the trigger offers, as `catalog.trigger_options` of workflows:describe describes them. A workflow reads back with every option, whatever its trigger.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "fire_immediately": {
            "type": "boolean",
            "description": "A `form_submitted` workflow runs as soon as the form is received instead of after the 10-minute resubmission window. Offered only on that trigger."
          }
        }
      },
      "WorkflowStage": {
        "title": "Workflow stage",
        "description": "One step of a workflow. Run state is never shown, and a stage has no ID of its own. Lists a stage does not use are left out. The catalog of workflows:describe says what each field can hold.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "condition",
              "task",
              "draft"
            ],
            "description": "`condition` checks `rules`; `task` runs `actions` and `integrations`; `draft` is an unfinished step, which never runs."
          },
          "dependencies": {
            "type": "array",
            "description": "What the stage waits for.",
            "items": {
              "$ref": "#/components/schemas/WorkflowStageDependency"
            }
          },
          "rules": {
            "type": "object",
            "description": "Condition stages: the rules to check, keyed by rule key, one rule per key. Left out, the stage matches every event.",
            "additionalProperties": {
              "$ref": "#/components/schemas/WorkflowRule"
            }
          },
          "rules_logical_operator": {
            "type": "string",
            "enum": [
              "and",
              "or"
            ],
            "description": "Condition stages: how the rules combine."
          },
          "actions": {
            "type": "array",
            "description": "Task stages: the field actions to run. Text message workflows run integrations only.",
            "items": {
              "$ref": "#/components/schemas/WorkflowAction"
            }
          },
          "integrations": {
            "type": "array",
            "description": "Task stages: the integrations to send to.",
            "items": {
              "$ref": "#/components/schemas/WorkflowIntegrationStep"
            }
          },
          "children": {
            "type": "array",
            "description": "The stages that follow this one.",
            "items": {
              "$ref": "#/components/schemas/WorkflowStage"
            }
          }
        }
      },
      "WorkflowStageDependency": {
        "title": "Workflow stage dependency",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "parent_evaluation",
              "wait_transcription"
            ],
            "description": "`parent_evaluation` runs the stage on the result of the condition above it, so only a child of a condition stage can hold it. `wait_transcription` waits for the call’s transcription."
          },
          "value": {
            "type": "boolean",
            "description": "Required with `parent_evaluation`: true to run when the condition matches, false when it does not."
          }
        }
      },
      "WorkflowRule": {
        "title": "Workflow rule",
        "description": "One condition rule. Its shape depends on the rule’s kind: `catalog.condition_rules` of workflows:describe says which kinds a rule key takes, and `catalog.rule_shapes` shows one example of each, including the word spotting, past calls and call capping shapes, whose fields are listed there.",
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "type": {
            "type": "string",
            "description": "The rule’s kind: `list`, `custom`, `custom_speech_kw_spotting`, `past_calls` or `call_capping`. An AI question has none."
          },
          "list": {
            "type": "array",
            "description": "A `list` rule: the values to match, from the list `values_from` names.",
            "items": {
              "description": "A value, whose type depends on the rule."
            }
          },
          "list_matching_operator": {
            "type": "string",
            "description": "A tag rule: how the listed tags match, such as `any`."
          },
          "operA": {
            "type": "string",
            "description": "A `custom` rule: the first comparison’s operator, from the `operators` of the rule’s data type."
          },
          "valA": {
            "description": "A `custom` rule: the value `operA` compares with. A list for `inlist`."
          },
          "join": {
            "type": "string",
            "enum": [
              "and",
              "or"
            ],
            "description": "A `custom` rule: how a second comparison joins the first."
          },
          "operB": {
            "type": "string",
            "description": "A `custom` rule: the second comparison’s operator."
          },
          "valB": {
            "description": "A `custom` rule: the value `operB` compares with; the second comparison counts only when it is not empty. With `btwn`, the end of the range."
          },
          "use_ai": {
            "type": "boolean",
            "description": "An AI question: always true."
          },
          "ai_user_prompt": {
            "type": "string",
            "description": "An AI question: the question to ask."
          },
          "value": {
            "description": "A word spotting rule: the phrases to listen for."
          }
        }
      },
      "WorkflowAction": {
        "title": "Workflow action",
        "description": "One field action of a task stage. `catalog.task_steps` of workflows:describe lists what each field takes.",
        "type": "object",
        "required": [
          "action_type"
        ],
        "properties": {
          "action_type": {
            "type": "string",
            "enum": [
              "update_property",
              "process"
            ],
            "description": "The kind of action."
          },
          "process_name": {
            "type": "string",
            "enum": [
              "add_to_spam",
              "generate_call_transcription",
              "generate_call_summary"
            ],
            "description": "A `process` action: what to run."
          },
          "field": {
            "type": "string",
            "description": "An `update_property` action: the field to set, such as `call_tags` or a `cpf_` custom field key."
          },
          "type": {
            "type": "string",
            "description": "The field’s type, such as `tags`, `text` or `number`."
          },
          "value": {
            "description": "The value to set, whose type depends on `type`."
          },
          "mode": {
            "type": "string",
            "enum": [
              "manual",
              "ai",
              "crm"
            ],
            "description": "Where the value comes from: the action itself, the AI or a connected CRM."
          },
          "use_ai": {
            "type": "boolean",
            "description": "Returned as true for `ai` mode. Set `mode` instead."
          },
          "ai_user_prompt": {
            "type": "string",
            "description": "`ai` mode: the instruction for the AI."
          },
          "generate_missing_tags": {
            "type": "boolean",
            "description": "`ai` mode on `call_tags`: create the tags the prompt names that the project lacks. A changed prompt asks the AI when the workflow is saved, and the result appears in `tag_generation`."
          },
          "generated_tags_prompt_hash": {
            "type": "string",
            "pattern": "^([a-f0-9]{64})?$",
            "description": "Read only, set by the server for an analyzed prompt. Send it back unchanged with its action, or a changed tag selection asks the AI again. Any value other than the one the server gave, null or an empty string answers 422."
          },
          "crm": {
            "type": "string",
            "description": "`crm` mode: the connected CRM."
          },
          "crm_entity": {
            "type": "string",
            "description": "`crm` mode: the CRM entity to read."
          },
          "crm_field": {
            "type": "string",
            "description": "`crm` mode: the CRM field to read."
          }
        }
      },
      "WorkflowIntegrationStep": {
        "title": "Workflow integration step",
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The integration’s `id` in `values.integrations` of workflows:describe, or `restricted` for a step of an integration the caller cannot read."
          },
          "configurations": {
            "type": "array",
            "description": "The `id`s of the integration’s `configurations` the step sends to. A step whose integration needs none leaves this out.",
            "items": {
              "description": "An opaque configuration ID, a string or an integer. Send it back as read."
            }
          },
          "ref": {
            "type": "string",
            "description": "A `restricted` step only: an opaque reference. Send the step back unchanged."
          }
        }
      },
      "WorkflowReviewItem": {
        "title": "Workflow review item",
        "description": "One thing a workflow must fix before it can run, in the validation problem shape. A problem may add fields of its own, such as `reference`, `integration` or `allowed_values`. Inside a `restricted` step `value` and `name` are null.",
        "type": "object",
        "required": [
          "code",
          "title",
          "pointer",
          "value",
          "name"
        ],
        "additionalProperties": true,
        "properties": {
          "code": {
            "type": "integer",
            "description": "Machine-readable validation code."
          },
          "title": {
            "type": "string",
            "description": "Name of the validation code."
          },
          "pointer": {
            "type": "string",
            "description": "JSON pointer into the workflow, such as `/stages/0/rules/call_flow_id/list/1`."
          },
          "value": {
            "description": "The value at the pointer as a read shows it; for a rule, its key.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "What the value names, when that can be told, such as a call flow’s name.",
            "nullable": true
          }
        }
      },
      "WorkflowListResponse": {
        "title": "Workflow list response",
        "type": "object",
        "required": [
          "items",
          "page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Workflow"
            }
          },
          "page": {
            "type": "object",
            "required": [
              "next"
            ],
            "properties": {
              "next": {
                "type": "string",
                "description": "Relative URL of the next page, or null on the last page.",
                "nullable": true
              }
            }
          }
        }
      },
      "WorkflowSavedResponse": {
        "title": "Saved workflow",
        "allOf": [
          {
            "$ref": "#/components/schemas/Workflow"
          },
          {
            "type": "object",
            "required": [
              "tag_generation"
            ],
            "properties": {
              "tag_generation": {
                "$ref": "#/components/schemas/WorkflowTagGeneration"
              }
            }
          }
        ]
      },
      "WorkflowTagGeneration": {
        "title": "Workflow tag generation",
        "description": "What the save’s AI tag prompts did to the project’s tags.",
        "type": "object",
        "required": [
          "new_tags",
          "tag_id_mapping"
        ],
        "properties": {
          "new_tags": {
            "type": "array",
            "description": "The tags this save created.",
            "items": {
              "type": "object",
              "required": [
                "name",
                "category"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The tag’s name."
                },
                "category": {
                  "type": "string",
                  "description": "The name of its category."
                }
              }
            }
          },
          "tag_id_mapping": {
            "type": "object",
            "description": "Old tag ID to new tag ID, when this save gave the project its own copy of the default tags. Rewrite any tag IDs you still hold.",
            "additionalProperties": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "CreateWorkflowRequest": {
        "title": "Create workflow request",
        "description": "Unknown fields are refused, so send only these fields, not a whole read.",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "triggering_event"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The workflow’s name. Surrounding spaces are removed."
          },
          "triggering_event": {
            "$ref": "#/components/schemas/WorkflowTriggeringEvent"
          },
          "call_direction": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ],
            "description": "Call workflows only. A call workflow without one runs on inbound calls.",
            "nullable": true
          },
          "trigger_options": {
            "$ref": "#/components/schemas/WorkflowTriggerOptions"
          },
          "stages": {
            "type": "array",
            "description": "The workflow’s stages. Defaults to none.",
            "items": {
              "$ref": "#/components/schemas/WorkflowStage"
            }
          }
        }
      },
      "UpdateWorkflowRequest": {
        "title": "Update workflow request",
        "description": "Send only the fields to change; a field left out keeps its stored value. Unknown fields are refused, so send only these fields, not a whole read. An empty body changes nothing. `trigger_options`, when sent, replaces the options: an option it leaves out is turned off.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "The workflow’s name. Surrounding spaces are removed."
          },
          "triggering_event": {
            "$ref": "#/components/schemas/WorkflowTriggeringEvent"
          },
          "call_direction": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ],
            "description": "Null clears it.",
            "nullable": true
          },
          "trigger_options": {
            "$ref": "#/components/schemas/WorkflowTriggerOptions"
          },
          "stages": {
            "type": "array",
            "description": "Replaces every stage. Send each `restricted` step back where the read showed it, and keep each `generated_tags_prompt_hash`.",
            "items": {
              "$ref": "#/components/schemas/WorkflowStage"
            }
          }
        }
      },
      "DeleteWorkflowsRequest": {
        "title": "Delete workflows request",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workflow_ids"
        ],
        "properties": {
          "workflow_ids": {
            "type": "array",
            "minItems": 1,
            "description": "The workflows to delete.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "ReorderWorkflowsRequest": {
        "title": "Reorder workflows request",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workflow_ids"
        ],
        "properties": {
          "workflow_ids": {
            "type": "array",
            "description": "Every workflow of the project once, first to run first.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "DuplicateWorkflowRequest": {
        "title": "Duplicate workflow request",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "The copy’s name. Left out, it is the source’s with ` (Duplicate)` added."
          }
        }
      },
      "CopyWorkflowsRequest": {
        "title": "Copy workflows request",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workflow_ids",
          "target_project_ids"
        ],
        "properties": {
          "workflow_ids": {
            "type": "array",
            "minItems": 1,
            "description": "The workflows of this project to copy.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "target_project_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "description": "The projects to copy into. Never this project: :duplicate copies inside it.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "preserve_status": {
            "type": "boolean",
            "default": false,
            "description": "Turn on the copies of workflows that are on, when they are `exact`."
          },
          "dry_run": {
            "type": "boolean",
            "default": false,
            "description": "Report what the copy would do and write nothing."
          }
        }
      },
      "CopyWorkflowsResult": {
        "title": "Copy workflows result",
        "type": "object",
        "required": [
          "dry_run",
          "targets"
        ],
        "properties": {
          "dry_run": {
            "type": "boolean",
            "description": "Whether this was a dry run, so nothing was written."
          },
          "targets": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "project_id",
                "created_tags",
                "created_fields",
                "created_webhooks",
                "workflows"
              ],
              "properties": {
                "project_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The target project."
                },
                "created_tags": {
                  "type": "array",
                  "description": "The tags added to the target.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The tag’s name."
                      },
                      "category": {
                        "type": "string",
                        "description": "The name of its category."
                      }
                    }
                  }
                },
                "created_fields": {
                  "type": "array",
                  "description": "The custom fields added to the target, or shown again after being archived.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The field’s name."
                      },
                      "type": {
                        "type": "string",
                        "description": "The field’s type."
                      }
                    }
                  }
                },
                "created_webhooks": {
                  "type": "array",
                  "description": "The webhooks copied to the target.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The webhook’s name."
                      }
                    }
                  }
                },
                "workflows": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "source_id",
                      "id",
                      "status",
                      "is_active",
                      "changes"
                    ],
                    "properties": {
                      "source_id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "The copied workflow."
                      },
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "The new workflow. Null in a dry run.",
                        "nullable": true
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "exact",
                          "needs_review"
                        ],
                        "description": "`exact`: every reference matched. `needs_review`: an off, not valid draft until a save or :publish finds nothing missing."
                      },
                      "is_active": {
                        "type": "boolean",
                        "description": "Whether the copy is on."
                      },
                      "changes": {
                        "type": "array",
                        "description": "What the copy kept without a match in the target.",
                        "items": {
                          "$ref": "#/components/schemas/WorkflowReviewItem"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "WorkflowDescribeResponse": {
        "title": "Workflow describe response",
        "type": "object",
        "required": [
          "catalog",
          "values",
          "readiness"
        ],
        "properties": {
          "catalog": {
            "$ref": "#/components/schemas/WorkflowCatalog"
          },
          "values": {
            "$ref": "#/components/schemas/WorkflowProjectValues"
          },
          "readiness": {
            "$ref": "#/components/schemas/WorkflowReadiness"
          }
        }
      },
      "WorkflowCatalog": {
        "title": "Workflow catalog",
        "description": "What a definition can hold, the same for every project. It reads what saves are checked against.",
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "triggering_events": {
            "type": "array",
            "description": "Each trigger, with the call directions and trigger options it offers.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "trigger_options": {
            "type": "array",
            "description": "What each trigger option does, with its default and an example.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "data_types": {
            "type": "array",
            "description": "Each rule data type, with its value format and operators.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "operators": {
            "type": "object",
            "description": "The operators that take no value, no second comparison or a list, the joins and the tag matching operators.",
            "additionalProperties": true
          },
          "condition_rules": {
            "type": "array",
            "description": "Each rule key, with its kinds, data type, triggers and allowed values.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "condition_rule_patterns": {
            "type": "array",
            "description": "The rule keys built from a prefix, such as `cpf_` for a custom field.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "task_steps": {
            "type": "object",
            "description": "The action types, field actions, process steps and integrations a task stage can hold, with examples.",
            "additionalProperties": true
          },
          "rule_shapes": {
            "type": "object",
            "description": "An example of each rule shape.",
            "additionalProperties": true
          },
          "notes": {
            "type": "array",
            "description": "How the pieces fit together.",
            "items": {
              "type": "string"
            }
          },
          "examples": {
            "type": "array",
            "description": "Whole definitions: each `configuration` holds the fields a create takes.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      },
      "WorkflowProjectValues": {
        "title": "Workflow project values",
        "description": "The project’s values a definition can name, each list named after its route. A catalog `values_from` or `keys_from` says which field of an item the definition stores, such as a tag’s `id` or a number’s `number`.",
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "tags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string",
                  "nullable": true
                },
                "color": {
                  "type": "string",
                  "nullable": true
                },
                "background_tint": {
                  "type": "integer"
                },
                "category_id": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                }
              }
            }
          },
          "tag_categories": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "key": {
                  "type": "string",
                  "description": "What a definition stores, such as `cpf_lead_stage`."
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string",
                  "nullable": true
                },
                "type": {
                  "type": "string"
                },
                "options": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "numbers": {
            "type": "array",
            "description": "The project’s tracking numbers. A rule stores `number`.",
            "items": {
              "$ref": "#/components/schemas/WorkflowProjectNumber"
            }
          },
          "destinations": {
            "type": "array",
            "description": "The project’s destinations. A rule stores `number`.",
            "items": {
              "$ref": "#/components/schemas/WorkflowProjectNumber"
            }
          },
          "tracking_sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "key": {
                  "type": "string",
                  "description": "What a rule stores."
                },
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "call_flows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "swap_groups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "countries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "forms": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "form_id": {
                  "type": "string",
                  "description": "The form’s HTML id.",
                  "nullable": true
                }
              }
            }
          },
          "integrations": {
            "type": "array",
            "description": "The integrations the caller can read.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "What a step stores in its `id`."
                },
                "is_available": {
                  "type": "boolean",
                  "description": "Whether the project has set it up."
                },
                "configurations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "description": "What a step lists in `configurations`: opaque, a string or an integer."
                      },
                      "name": {
                        "type": "string",
                        "nullable": true
                      },
                      "event_type": {
                        "type": "string",
                        "nullable": true
                      },
                      "ads_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "includes_transcription": {
                        "type": "boolean"
                      },
                      "includes_summary": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              }
            }
          },
          "custom_parameters": {
            "$ref": "#/components/schemas/WorkflowKeyedNameList"
          },
          "tracking_cookies": {
            "$ref": "#/components/schemas/WorkflowKeyedNameList"
          },
          "local_storage_keys": {
            "$ref": "#/components/schemas/WorkflowKeyedNameList"
          }
        }
      },
      "WorkflowProjectNumber": {
        "title": "Workflow project number",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "number": {
            "type": "string",
            "description": "The phone number, as a rule stores it."
          },
          "number_display": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "WorkflowKeyedNameList": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "key": {
              "type": "string",
              "description": "The rule key a definition stores."
            },
            "name": {
              "type": "string"
            }
          }
        }
      },
      "WorkflowReadiness": {
        "title": "Workflow readiness",
        "description": "What recording and transcription steps depend on.",
        "type": "object",
        "properties": {
          "outbound_call_recording_enabled": {
            "type": "boolean",
            "description": "Whether the project records outbound calls."
          },
          "call_flows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "name": {
                  "type": "string"
                },
                "is_in_use": {
                  "type": "boolean"
                },
                "has_recording": {
                  "type": "boolean"
                },
                "has_call_start_event": {
                  "type": "boolean"
                }
              }
            }
          },
          "workflows_with_transcription": {
            "type": "array",
            "description": "The active workflows with a transcription step.",
            "items": {
              "type": "object",
              "properties": {
                "triggering_event": {
                  "type": "string"
                },
                "execution_order": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "WorkflowRunListResponse": {
        "title": "Workflow run list response",
        "type": "object",
        "required": [
          "items",
          "unassigned"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowRun"
            }
          },
          "unassigned": {
            "type": "array",
            "description": "The attempts no run step claims, by integration and event, so nothing recorded is lost.",
            "items": {
              "type": "object",
              "required": [
                "integration",
                "event_id",
                "attempts"
              ],
              "properties": {
                "integration": {
                  "type": "string",
                  "description": "The integration."
                },
                "event_id": {
                  "type": "string",
                  "description": "The configured target.",
                  "nullable": true
                },
                "attempts": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IntegrationAttempt"
                  }
                }
              }
            }
          }
        }
      },
      "WorkflowRun": {
        "title": "Workflow run",
        "description": "One run of the workflows that matched a call or form submission.",
        "type": "object",
        "required": [
          "id",
          "type",
          "triggering_action",
          "triggered_at",
          "completed_at",
          "status",
          "workflows"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Opaque, stable reference of the run (`wr_` and 20 hexadecimal characters), the same value as the `workflow.run_id` of each of its attempts.",
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "call",
              "form",
              "sms"
            ],
            "description": "What the run ran on."
          },
          "triggering_action": {
            "type": "string",
            "enum": [
              "call-init",
              "call-finish",
              "transcription-start",
              "user-action",
              "sms-in",
              "sms-user-action",
              "form-submission",
              "form-submission-immediate",
              "form-user-action"
            ],
            "description": "What started the run."
          },
          "triggered_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the run started, in UTC.",
            "nullable": true
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it finished, in UTC. Null while it runs.",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/WorkflowRunStatus"
          },
          "workflows": {
            "type": "array",
            "description": "The workflows that ran.",
            "items": {
              "type": "object",
              "required": [
                "id",
                "name",
                "status",
                "nodes"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The workflow ID, or null once the workflow is deleted.",
                  "nullable": true
                },
                "name": {
                  "type": "string",
                  "description": "Its name when it ran.",
                  "nullable": true
                },
                "status": {
                  "$ref": "#/components/schemas/WorkflowRunStatus"
                },
                "nodes": {
                  "type": "array",
                  "description": "Its steps, each followed by the steps below it. Draft steps are left out.",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowRunNode"
                  }
                }
              }
            }
          }
        }
      },
      "WorkflowRunStatus": {
        "type": "string",
        "enum": [
          "new",
          "executing",
          "waiting",
          "completed",
          "failed",
          "canceled"
        ],
        "description": "Where the run or workflow stands."
      },
      "WorkflowRunNode": {
        "title": "Workflow run step",
        "type": "object",
        "required": [
          "step_id",
          "parent_step_id",
          "type",
          "status",
          "condition_result",
          "waiting_on",
          "label",
          "actions",
          "integrations"
        ],
        "properties": {
          "step_id": {
            "type": "string",
            "description": "The step’s ID in this run, the same value as `workflow.step_id` of its attempts. It does not carry over to other runs.",
            "nullable": true
          },
          "parent_step_id": {
            "type": "string",
            "description": "The step above this one, or null at the top of the workflow.",
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "condition",
              "task"
            ],
            "description": "The kind of step."
          },
          "status": {
            "type": "string",
            "enum": [
              "not_discovered",
              "waiting_on_dependency",
              "pending",
              "ignored",
              "executed"
            ],
            "description": "`not_discovered`: the run has not reached the step. `ignored`: it was skipped."
          },
          "condition_result": {
            "type": "boolean",
            "description": "Whether a condition matched. Null before it is checked, and for a task.",
            "nullable": true
          },
          "waiting_on": {
            "type": "string",
            "enum": [
              "wait_transcription",
              "parent_evaluation"
            ],
            "description": "What the step is waiting for.",
            "nullable": true
          },
          "label": {
            "type": "string",
            "maxLength": 160,
            "description": "A readable summary, written when the run was recorded, for showing to people. Do not parse it."
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "kind",
                "label",
                "executed",
                "ignored",
                "outcome"
              ],
              "properties": {
                "kind": {
                  "type": "string",
                  "description": "`update_property`, or the process that ran, such as `generate_call_summary`."
                },
                "label": {
                  "type": "string",
                  "maxLength": 160,
                  "description": "A readable summary of the action."
                },
                "executed": {
                  "type": "boolean",
                  "description": "Whether the action ran."
                },
                "ignored": {
                  "type": "boolean",
                  "description": "Whether it was skipped."
                },
                "outcome": {
                  "description": "Reserved, and null for now.",
                  "nullable": true
                }
              }
            }
          },
          "integrations": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "config_ids",
                "executed",
                "ignored",
                "events"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The integration."
                },
                "config_ids": {
                  "type": "array",
                  "description": "The configured targets of the step. An item is null once its target is gone.",
                  "items": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "executed": {
                  "type": "boolean",
                  "description": "Whether the step sent."
                },
                "ignored": {
                  "type": "boolean",
                  "description": "Whether it was skipped."
                },
                "events": {
                  "type": "array",
                  "description": "What it sent, by target.",
                  "items": {
                    "type": "object",
                    "required": [
                      "event_id",
                      "attempts"
                    ],
                    "properties": {
                      "event_id": {
                        "type": "string",
                        "description": "The configured target, as on a delivery.",
                        "nullable": true
                      },
                      "attempts": {
                        "type": "array",
                        "description": "Every attempt, oldest first.",
                        "items": {
                          "$ref": "#/components/schemas/IntegrationAttempt"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "CreateWebhookRequest": {
        "title": "Create webhook request",
        "description": "Unknown fields are refused. `auth` defaults to `{ \"type\": \"none\" }`, `extra_params` to an empty list and `payload` to no fields.",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "event_type",
          "endpoint_url"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "How the webhook is listed in the app and in workflow steps. Up to 100 characters."
          },
          "event_type": {
            "type": "string",
            "enum": [
              "call",
              "form",
              "sms"
            ],
            "description": "The event data the webhook sends: `call` for workflows that run on calls (when a call starts, when it ends, or on a user action on a call), `form` for form submissions, `sms` for SMS messages. Cannot change while a workflow uses it."
          },
          "endpoint_url": {
            "type": "string",
            "maxLength": 2048,
            "description": "https URL on a public host."
          },
          "auth": {
            "$ref": "#/components/schemas/WebhookAuthRequest"
          },
          "extra_params": {
            "type": "array",
            "maxItems": 20,
            "description": "Fixed headers or query parameters added to every request the webhook sends, besides its authentication: for example a static key, an account id or a source tag the receiving endpoint expects. Up to 20, each with its value.",
            "items": {
              "$ref": "#/components/schemas/WebhookExtraParamRequest"
            }
          },
          "payload": {
            "$ref": "#/components/schemas/WebhookPayloadRequest"
          }
        }
      },
      "UpdateWebhookRequest": {
        "title": "Update webhook request",
        "description": "Unknown fields are refused and every field is optional: omitted fields stay as they are. `auth` and `extra_params`, when sent, replace the stored values; `payload` replaces the stored payload.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "How the webhook is listed in the app and in workflow steps. Up to 100 characters."
          },
          "event_type": {
            "type": "string",
            "enum": [
              "call",
              "form",
              "sms"
            ],
            "description": "The event data the webhook sends: `call` for workflows that run on calls (when a call starts, when it ends, or on a user action on a call), `form` for form submissions, `sms` for SMS messages. Cannot change while a workflow uses it."
          },
          "endpoint_url": {
            "type": "string",
            "maxLength": 2048,
            "description": "https URL on a public host."
          },
          "auth": {
            "$ref": "#/components/schemas/WebhookAuthRequest"
          },
          "extra_params": {
            "type": "array",
            "maxItems": 20,
            "description": "Fixed headers or query parameters added to every request the webhook sends, besides its authentication: for example a static key, an account id or a source tag the receiving endpoint expects. Up to 20. When sent, the list replaces the saved one; a parameter sent without its value keeps the saved value of the same key while the endpoint URL is unchanged.",
            "items": {
              "$ref": "#/components/schemas/WebhookExtraParamRequest"
            }
          },
          "payload": {
            "$ref": "#/components/schemas/WebhookPayloadRequest"
          }
        }
      },
      "CopyWebhooksRequest": {
        "title": "Copy webhooks request",
        "description": "Unknown fields are refused.",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "target_project_ids"
        ],
        "properties": {
          "webhook_ids": {
            "type": "array",
            "minItems": 1,
            "description": "Webhooks of the source project to copy. Omit to copy every webhook. When the source project has no webhooks, each target is still reported in `succeeded` and nothing is copied.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "target_project_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "description": "Projects to copy into. Must not include the source project.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "CopyWebhooksResult": {
        "title": "Copy webhooks result",
        "type": "object",
        "required": [
          "succeeded",
          "failed"
        ],
        "properties": {
          "succeeded": {
            "type": "array",
            "description": "Target projects that were copied into, in request order.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "failed": {
            "type": "array",
            "description": "Target projects left unchanged, with the problem code that says why.",
            "items": {
              "type": "object",
              "required": [
                "id",
                "code"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "code": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "WebhookAuthRequest": {
        "title": "Webhook authentication (request)",
        "description": "Send the secret field of the chosen type: `token` (bearer_token), `value` (api_key) or `password` (basic_auth). A secret is required for bearer_token and api_key. Names and secrets must not contain control characters such as line breaks. Responses never contain secrets.",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "none",
              "bearer_token",
              "api_key",
              "basic_auth",
              "other"
            ]
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "api_key: header or query parameter name. Required for api_key."
          },
          "position": {
            "type": "string",
            "enum": [
              "header",
              "query"
            ],
            "default": "header",
            "description": "api_key: where the key is sent."
          },
          "username": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "basic_auth user name. Required for basic_auth."
          },
          "token": {
            "type": "string",
            "maxLength": 4096,
            "description": "bearer_token secret. Write-only."
          },
          "value": {
            "type": "string",
            "maxLength": 4096,
            "description": "api_key secret. Write-only."
          },
          "password": {
            "type": "string",
            "maxLength": 4096,
            "description": "basic_auth secret. Write-only."
          }
        }
      },
      "WebhookExtraParamRequest": {
        "title": "Webhook extra parameter (request)",
        "description": "A fixed header or query parameter added to every request the webhook sends, besides its authentication: for example a static key, an account id or a source tag the receiving endpoint expects. The key and value must not contain control characters such as line breaks.",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "key",
          "position"
        ],
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "The header name when `position` is `header`, or the query parameter name when it is `query`."
          },
          "position": {
            "type": "string",
            "enum": [
              "header",
              "query"
            ],
            "description": "`header` sends the parameter as an HTTP request header; `query` adds it to the endpoint URL’s query string."
          },
          "value": {
            "type": "string",
            "maxLength": 4096,
            "description": "The value sent. Write-only. Required when creating. When updating, leave it out to keep the saved value of the same key while the endpoint URL is unchanged."
          }
        }
      },
      "WebhookPayloadRequest": {
        "title": "Webhook payload (request)",
        "description": "The JSON body the webhook sends. Sending a payload replaces the saved one, including a payload set up in the app such as a Google Analytics 4 event.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "use_data_object": {
            "type": "boolean",
            "default": false,
            "description": "Wrap the fields in a `data` object."
          },
          "fields": {
            "type": "array",
            "maxItems": 200,
            "default": [],
            "description": "Body fields: `name` is the JSON key sent; `field` is an event field, as listed by GET /orgs/{orgId}/projects/{projectId}/webhooks:fields for the webhook’s event type, and any other text is sent as a fixed value. A field sent under an earlier name of an event field is stored under its current name.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "name",
                "field"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "field": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                }
              }
            }
          }
        }
      },
      "EmailAlert": {
        "title": "Email alert",
        "type": "object",
        "required": [
          "id",
          "project_id",
          "name",
          "event_type",
          "to",
          "cc",
          "send_separately",
          "subject",
          "body",
          "style",
          "is_valid"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Email alert ID (UUIDv7)."
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Project ID (UUIDv7)."
          },
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "How the email alert is listed in the app and in workflow steps. Up to 100 characters."
          },
          "event_type": {
            "type": "string",
            "enum": [
              "call",
              "form",
              "sms"
            ],
            "description": "The events the alert is sent for: `call` for workflows that run on calls, `form` for form submissions, `sms` for SMS messages. Cannot change while a workflow uses it."
          },
          "to": {
            "type": "array",
            "description": "The recipients’ email addresses. An alert saved before this API existed may hold an address that failed validation; its `is_valid` is then false.",
            "items": {
              "type": "string"
            }
          },
          "cc": {
            "type": "array",
            "description": "Email addresses copied on every email the alert sends.",
            "items": {
              "type": "string"
            }
          },
          "send_separately": {
            "type": "boolean",
            "description": "Send one email to each `to` address instead of one email to all of them. Each email copies every `cc` address."
          },
          "subject": {
            "type": "string",
            "description": "The email subject. Can name event fields as `%field%`."
          },
          "body": {
            "type": "string",
            "description": "The whole email after the subject: plain text with line breaks. Names event fields as `%field%`; a call alert’s body can also hold `%recording_link%`, `%transcription%` and `%activity_link%`, which place the Listen link, the call transcription and the Go to Activity link (each left out when the call has none). Formatting applies to the two branded styles: `**text**` on one line is bold, a line starting with `- ` or `• ` is a bullet (each leading tab or 2 leading spaces nests it one level, up to 3 levels), and leading tabs and runs of spaces keep their width. Markers count only in the body text, never in a field value, and HTML typed in the body shows as text. A `simple` email removes the bold markers and shows bullets as `• `. The subject is not formatted. May be empty."
          },
          "style": {
            "type": "string",
            "enum": [
              "branded",
              "branded_no_logo",
              "simple"
            ],
            "description": "How the email looks: `branded` uses the organization’s layout with its logo, `branded_no_logo` the same layout without the logo, `simple` a plain layout with no logo plus a text version, for inboxes and systems that read email as text."
          },
          "is_valid": {
            "type": "boolean",
            "description": "False when a saved address failed validation; the alert is not sent until its addresses are saved again."
          },
          "meta": {
            "type": "object",
            "description": "Include-only meta.",
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Creation timestamp in UTC. Requires include=meta or include=meta.created_at."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Last update timestamp in UTC. Requires include=meta or include=meta.updated_at."
              }
            }
          }
        }
      },
      "CreateEmailAlertRequest": {
        "title": "Create email alert request",
        "description": "Unknown fields are refused. Fields left out take the defaults the app gives a new alert: no `cc`, `send_separately` false, `style` `branded`, and the subject and body of the event type (see each field).",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "event_type",
          "to"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "How the email alert is listed in the app and in workflow steps. Trimmed; 1 to 100 characters."
          },
          "event_type": {
            "type": "string",
            "enum": [
              "call",
              "form",
              "sms"
            ],
            "description": "The events the alert is sent for: `call` for workflows that run on calls, `form` for form submissions, `sms` for SMS messages."
          },
          "to": {
            "type": "array",
            "minItems": 1,
            "maxItems": 25,
            "description": "The recipients’ email addresses, 1 to 25. Each is trimmed, checked, and kept once; an invalid address is refused at its index.",
            "items": {
              "type": "string",
              "format": "email"
            }
          },
          "cc": {
            "type": "array",
            "minItems": 0,
            "maxItems": 25,
            "default": [],
            "description": "Email addresses copied on every email the alert sends, up to 25. Checked like `to`.",
            "items": {
              "type": "string",
              "format": "email"
            }
          },
          "send_separately": {
            "type": "boolean",
            "default": false,
            "description": "Send one email to each `to` address instead of one email to all of them. Each email copies every `cc` address."
          },
          "subject": {
            "type": "string",
            "maxLength": 255,
            "description": "The email subject, up to 255 characters. Can name event fields as `%field%`. Defaults to “<white label> Call Alert”, “<white label> Form Submission” or “<white label> SMS Alert”, with the name the organization’s emails are branded with."
          },
          "body": {
            "type": "string",
            "maxLength": 10000,
            "description": "The whole email after the subject, up to 10,000 characters: plain text with line breaks. Can name event fields as `%field%`, with the `field` values GET /orgs/{orgId}/projects/{projectId}/email-alerts:fields lists for the alert’s event type. A `call` alert’s body can also hold `%recording_link%`, `%transcription%` and `%activity_link%` (the Listen link, the call transcription and the Go to Activity link); on other alerts they are unknown fields. Formatting applies to the two branded styles: `**text**` on one line is bold, a line starting with `- ` or `• ` is a bullet (each leading tab or 2 leading spaces nests it one level, up to 3 levels), and leading tabs and runs of spaces keep their width. Markers count only in the body text, never in a field value, and HTML typed in the body shows as text. A `simple` email removes the bold markers and shows bullets as `• `. The subject is not formatted. May be empty. Defaults to a first line (`%caller_id% just called!` for a call, `A \"%form_name%\" form was just submitted!` for a form, `%caller_id% just sent you an SMS!` for an SMS), a blank line, then `Start Time: %call_start_local%`, `Tracking Number: %tracking_num%`, `Call Outcome: %call_outcome%`, `Caller Name: %caller_name%` and `Caller ID: %caller_id%` on their own lines for a call; `Submitted on: %submitted_on%`, `UTM Campaign: %utm_campaign%`, `Form name: %form_name%` and `Form data (all fields): %form_data%` for a form; `%message%` for an SMS."
          },
          "style": {
            "type": "string",
            "enum": [
              "branded",
              "branded_no_logo",
              "simple"
            ],
            "default": "branded",
            "description": "How the email looks: `branded` uses the organization’s layout with its logo, `branded_no_logo` the same layout without the logo, `simple` a plain layout with no logo plus a text version, for inboxes and systems that read email as text."
          }
        }
      },
      "UpdateEmailAlertRequest": {
        "title": "Update email alert request",
        "description": "Unknown fields are refused and every field is optional: omitted fields stay as they are, and a sent list replaces the stored one. Only the values sent are checked, against the event type the alert will have. When `event_type` changes, `subject` and `body` take the new type’s defaults unless they are sent too.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "How the email alert is listed in the app and in workflow steps. Trimmed; 1 to 100 characters."
          },
          "event_type": {
            "type": "string",
            "enum": [
              "call",
              "form",
              "sms"
            ],
            "description": "The events the alert is sent for: `call`, `form` or `sms`. Cannot change while a workflow uses the alert."
          },
          "to": {
            "type": "array",
            "minItems": 1,
            "maxItems": 25,
            "description": "The recipients’ email addresses, 1 to 25, replacing the stored list. Each is trimmed, checked, and kept once; an invalid address is refused at its index.",
            "items": {
              "type": "string",
              "format": "email"
            }
          },
          "cc": {
            "type": "array",
            "minItems": 0,
            "maxItems": 25,
            "description": "Email addresses copied on every email the alert sends, up to 25, replacing the stored list. Checked like `to`.",
            "items": {
              "type": "string",
              "format": "email"
            }
          },
          "send_separately": {
            "type": "boolean",
            "description": "Send one email to each `to` address instead of one email to all of them. Each email copies every `cc` address."
          },
          "subject": {
            "type": "string",
            "maxLength": 255,
            "description": "The email subject, up to 255 characters. Can name event fields as `%field%`."
          },
          "body": {
            "type": "string",
            "maxLength": 10000,
            "description": "The whole email after the subject, up to 10,000 characters. Can name event fields as `%field%`; a `call` alert’s body can also hold `%recording_link%`, `%transcription%` and `%activity_link%`. Formatting applies to the two branded styles: `**text**` on one line is bold, a line starting with `- ` or `• ` is a bullet (each leading tab or 2 leading spaces nests it one level, up to 3 levels), and leading tabs and runs of spaces keep their width. Markers count only in the body text, never in a field value, and HTML typed in the body shows as text. A `simple` email removes the bold markers and shows bullets as `• `. The subject is not formatted. May be empty."
          },
          "style": {
            "type": "string",
            "enum": [
              "branded",
              "branded_no_logo",
              "simple"
            ],
            "description": "How the email looks: `branded` uses the organization’s layout with its logo, `branded_no_logo` the same layout without the logo, `simple` a plain layout with no logo plus a text version, for inboxes and systems that read email as text."
          }
        }
      },
      "EmailAlertField": {
        "title": "Email alert field",
        "type": "object",
        "required": [
          "field",
          "label",
          "event_type",
          "kind"
        ],
        "properties": {
          "field": {
            "type": "string",
            "description": "The key to use as `%field%` in an email alert’s subject and body. A `section` key goes only in a call alert’s body.",
            "example": "caller_id"
          },
          "label": {
            "type": "string",
            "description": "The field’s name in the app, which the email shows next to its value.",
            "example": "Caller ID"
          },
          "event_type": {
            "type": "string",
            "enum": [
              "call",
              "form",
              "sms"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "system",
              "custom_field",
              "custom_parameter",
              "tracking_cookie",
              "local_storage",
              "section"
            ],
            "description": "`system` for built-in fields; `custom_field`, `custom_parameter`, `tracking_cookie` and `local_storage` for the project’s own custom fields, custom tracking parameters, tracking cookies and local storage keys; `section` for the three section tokens a call alert’s body can place (`recording_link`, `transcription`, `activity_link`)."
          },
          "description": {
            "type": "string",
            "description": "Section items only: what the section token places in the email.",
            "example": "Include transcription text. For calls with Transcription activated."
          },
          "locked_reason": {
            "type": "string",
            "description": "Section items only: why the organization may not add the token, or null when it may. `recording_link` is locked in a HIPAA organization (“Not available in HIPAA organizations.”), where emails never carry the recording link.",
            "nullable": true
          }
        }
      },
      "EmailAlertFieldListResponse": {
        "title": "Email alert field list response",
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailAlertField"
            }
          }
        }
      },
      "EmailAlertListResponse": {
        "title": "Email alert list response",
        "type": "object",
        "required": [
          "items",
          "page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailAlert"
            }
          },
          "page": {
            "$ref": "#/components/schemas/CursorPage"
          }
        }
      },
      "CopyEmailAlertsRequest": {
        "title": "Copy email alerts request",
        "description": "Unknown fields are refused.",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "target_project_ids"
        ],
        "properties": {
          "email_alert_ids": {
            "type": "array",
            "minItems": 1,
            "description": "Email alerts of the source project to copy. Omit to copy every email alert. When the source project has no email alerts, each target is still reported in `succeeded` and nothing is copied.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "target_project_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "description": "Projects to copy into. Must not include the source project.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "CopyEmailAlertsResult": {
        "title": "Copy email alerts result",
        "type": "object",
        "required": [
          "succeeded",
          "failed"
        ],
        "properties": {
          "succeeded": {
            "type": "array",
            "description": "Target projects that were copied into, in request order.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "failed": {
            "type": "array",
            "description": "Target projects left unchanged, with the problem code that says why.",
            "items": {
              "type": "object",
              "required": [
                "id",
                "code"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "code": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "SlackAlert": {
        "title": "Slack alert",
        "type": "object",
        "required": [
          "id",
          "project_id",
          "name",
          "channel_id",
          "bot_name",
          "text",
          "fields",
          "layout",
          "unfurl_links",
          "is_valid"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Slack alert ID (UUIDv7)."
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Project ID (UUIDv7)."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "How the Slack alert is listed in the app and in workflow steps. Trimmed; 1 to 100 characters."
          },
          "channel_id": {
            "type": "string",
            "description": "The channel to post to, an `id` GET /orgs/{orgId}/projects/{projectId}/slack-alerts:channels lists. Null leaves the alert without a channel; it posts nothing until it gets one.",
            "nullable": true
          },
          "bot_name": {
            "type": "array",
            "maxItems": 10,
            "description": "The name the message is posted under: its parts joined by one space. Empty posts as “<white label> Call Tracking”.",
            "items": {
              "type": "object",
              "required": [
                "type"
              ],
              "description": "Fixed text (`{\"type\": \"text\", \"text\": \"...\"}`, up to 80 characters) or a call field (`{\"type\": \"field\", \"field\": \"caller_id\"}`, a `field` value GET /orgs/{orgId}/projects/{projectId}/slack-alerts:fields lists).",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "text",
                    "field"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 80
                },
                "field": {
                  "type": "string",
                  "maxLength": 255
                }
              }
            }
          },
          "text": {
            "type": "string",
            "maxLength": 3000,
            "description": "Optional Slack mrkdwn posted above the field rows, up to 3,000 characters. Can name call fields as `%field%`; their values are escaped, so a value never becomes a mention or a link. Empty posts no text."
          },
          "fields": {
            "type": "array",
            "maxItems": 100,
            "description": "The rows posted below the text, each as `*name:* value`.",
            "items": {
              "type": "object",
              "required": [
                "name",
                "field"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255,
                  "description": "The label shown before the value."
                },
                "field": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255,
                  "description": "A `field` value GET /orgs/{orgId}/projects/{projectId}/slack-alerts:fields lists; any other text is posted as it is."
                }
              }
            }
          },
          "layout": {
            "type": "string",
            "enum": [
              "text",
              "columns"
            ],
            "description": "How the field rows are laid out: `text` one row per line, `columns` two rows side by side."
          },
          "unfurl_links": {
            "type": "boolean",
            "description": "Let Slack show previews of links in the message."
          },
          "is_valid": {
            "type": "boolean",
            "description": "False when Slack reported the alert’s channel gone; the alert posts nothing until a `channel_id` is saved again."
          },
          "meta": {
            "type": "object",
            "description": "Include-only meta.",
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Creation timestamp in UTC. Requires include=meta or include=meta.created_at."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Last update timestamp in UTC. Requires include=meta or include=meta.updated_at."
              }
            }
          }
        }
      },
      "CreateSlackAlertRequest": {
        "title": "Create Slack alert request",
        "description": "Unknown fields are refused. Fields left out take the defaults the app gives a new alert (see each field).",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "How the Slack alert is listed in the app and in workflow steps. Trimmed; 1 to 100 characters."
          },
          "channel_id": {
            "type": "string",
            "description": "The channel to post to, an `id` GET /orgs/{orgId}/projects/{projectId}/slack-alerts:channels lists. Null leaves the alert without a channel; it posts nothing until it gets one. Defaults to null.",
            "nullable": true
          },
          "bot_name": {
            "type": "array",
            "maxItems": 10,
            "description": "The name the message is posted under: its parts joined by one space. Empty posts as “<white label> Call Tracking”. Defaults to empty.",
            "items": {
              "type": "object",
              "required": [
                "type"
              ],
              "description": "Fixed text (`{\"type\": \"text\", \"text\": \"...\"}`, up to 80 characters) or a call field (`{\"type\": \"field\", \"field\": \"caller_id\"}`, a `field` value GET /orgs/{orgId}/projects/{projectId}/slack-alerts:fields lists).",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "text",
                    "field"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 80
                },
                "field": {
                  "type": "string",
                  "maxLength": 255
                }
              }
            }
          },
          "text": {
            "type": "string",
            "maxLength": 3000,
            "description": "Optional Slack mrkdwn posted above the field rows, up to 3,000 characters. Can name call fields as `%field%`; their values are escaped, so a value never becomes a mention or a link. Empty posts no text. Defaults to empty."
          },
          "fields": {
            "type": "array",
            "maxItems": 100,
            "description": "The rows posted below the text, each as `*name:* value`. Defaults to none. The alert must have `text` or at least one row.",
            "items": {
              "type": "object",
              "required": [
                "name",
                "field"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255,
                  "description": "The label shown before the value."
                },
                "field": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255,
                  "description": "A `field` value GET /orgs/{orgId}/projects/{projectId}/slack-alerts:fields lists; any other text is posted as it is."
                }
              }
            }
          },
          "layout": {
            "type": "string",
            "enum": [
              "text",
              "columns"
            ],
            "default": "text",
            "description": "How the field rows are laid out: `text` one row per line, `columns` two rows side by side."
          },
          "unfurl_links": {
            "type": "boolean",
            "default": true,
            "description": "Let Slack show previews of links in the message."
          }
        }
      },
      "UpdateSlackAlertRequest": {
        "title": "Update Slack alert request",
        "description": "Unknown fields are refused and every field is optional: omitted fields stay as they are, and a sent list replaces the stored one. Only the values sent are checked.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "How the Slack alert is listed in the app and in workflow steps. Trimmed; 1 to 100 characters."
          },
          "channel_id": {
            "type": "string",
            "description": "The channel to post to, an `id` GET /orgs/{orgId}/projects/{projectId}/slack-alerts:channels lists. Null leaves the alert without a channel; it posts nothing until it gets one.",
            "nullable": true
          },
          "bot_name": {
            "type": "array",
            "maxItems": 10,
            "description": "The name the message is posted under: its parts joined by one space. Empty posts as “<white label> Call Tracking”.",
            "items": {
              "type": "object",
              "required": [
                "type"
              ],
              "description": "Fixed text (`{\"type\": \"text\", \"text\": \"...\"}`, up to 80 characters) or a call field (`{\"type\": \"field\", \"field\": \"caller_id\"}`, a `field` value GET /orgs/{orgId}/projects/{projectId}/slack-alerts:fields lists).",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "text",
                    "field"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 80
                },
                "field": {
                  "type": "string",
                  "maxLength": 255
                }
              }
            }
          },
          "text": {
            "type": "string",
            "maxLength": 3000,
            "description": "Optional Slack mrkdwn posted above the field rows, up to 3,000 characters. Can name call fields as `%field%`; their values are escaped, so a value never becomes a mention or a link. Empty posts no text."
          },
          "fields": {
            "type": "array",
            "maxItems": 100,
            "description": "The rows posted below the text, each as `*name:* value`.",
            "items": {
              "type": "object",
              "required": [
                "name",
                "field"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255,
                  "description": "The label shown before the value."
                },
                "field": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255,
                  "description": "A `field` value GET /orgs/{orgId}/projects/{projectId}/slack-alerts:fields lists; any other text is posted as it is."
                }
              }
            }
          },
          "layout": {
            "type": "string",
            "enum": [
              "text",
              "columns"
            ],
            "description": "How the field rows are laid out: `text` one row per line, `columns` two rows side by side."
          },
          "unfurl_links": {
            "type": "boolean",
            "description": "Let Slack show previews of links in the message."
          }
        }
      },
      "SlackAlertField": {
        "title": "Slack alert field",
        "type": "object",
        "required": [
          "field",
          "label",
          "event_type",
          "kind"
        ],
        "properties": {
          "field": {
            "type": "string",
            "description": "The key to use as `%field%` in a Slack alert’s text, as a bot name `field` part or as a row’s `field`.",
            "example": "caller_id"
          },
          "label": {
            "type": "string",
            "description": "The field’s name in the app.",
            "example": "Caller ID"
          },
          "event_type": {
            "type": "string",
            "enum": [
              "call"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "system",
              "custom_field",
              "custom_parameter",
              "tracking_cookie",
              "local_storage"
            ],
            "description": "`system` for built-in fields; `custom_field`, `custom_parameter`, `tracking_cookie` and `local_storage` for the project’s own custom fields, custom tracking parameters, tracking cookies and local storage keys."
          }
        }
      },
      "SlackAlertFieldListResponse": {
        "title": "Slack alert field list response",
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SlackAlertField"
            }
          }
        }
      },
      "SlackChannel": {
        "title": "Slack channel",
        "type": "object",
        "required": [
          "id",
          "name",
          "is_private"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The channel ID, for a Slack alert’s `channel_id`.",
            "example": "C024BE91L"
          },
          "name": {
            "type": "string",
            "description": "The channel’s name, without the `#`.",
            "example": "sales-calls"
          },
          "is_private": {
            "type": "boolean",
            "description": "Whether the channel is private."
          }
        }
      },
      "SlackChannelListResponse": {
        "title": "Slack channel list response",
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SlackChannel"
            }
          }
        }
      },
      "SlackAlertListResponse": {
        "title": "Slack alert list response",
        "type": "object",
        "required": [
          "items",
          "page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SlackAlert"
            }
          },
          "page": {
            "$ref": "#/components/schemas/CursorPage"
          }
        }
      },
      "CopySlackAlertsRequest": {
        "title": "Copy Slack alerts request",
        "description": "Unknown fields are refused.",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "target_project_ids"
        ],
        "properties": {
          "slack_alert_ids": {
            "type": "array",
            "minItems": 1,
            "description": "Slack alerts of the source project to copy. Omit to copy every Slack alert. When the source project has no Slack alerts, each target is still reported in `succeeded` and nothing is copied.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "target_project_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "description": "Projects to copy into. Must not include the source project.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "CopySlackAlertsResult": {
        "title": "Copy Slack alerts result",
        "type": "object",
        "required": [
          "succeeded",
          "failed"
        ],
        "properties": {
          "succeeded": {
            "type": "array",
            "description": "Target projects that were copied into, in request order.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "failed": {
            "type": "array",
            "description": "Target projects left unchanged, with the problem code that says why.",
            "items": {
              "type": "object",
              "required": [
                "id",
                "code"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "code": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "CurrentUser": {
        "title": "Authenticated user",
        "description": "Profile of the user identified by your API token, returned by GET /users/me.",
        "type": "object",
        "required": [
          "id",
          "org_id",
          "full_name",
          "email",
          "phone_number",
          "is_org_owner"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "User ID (UUIDv7)."
          },
          "org_id": {
            "type": "string",
            "format": "uuid",
            "description": "Organization ID (UUIDv7) for the authenticated user’s primary organization. Pass this value as `{orgId}` in organization- and project-scoped endpoints."
          },
          "full_name": {
            "type": "string",
            "description": "User display name."
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "User email address."
          },
          "phone_number": {
            "type": "string",
            "description": "User phone number, or null when unset.",
            "nullable": true
          },
          "security": {
            "type": "object",
            "description": "Omitted by default. Include security for both flags, or request individual security fields.",
            "properties": {
              "has_email_2fa": {
                "type": "boolean",
                "description": "Whether email two-factor authentication is active. Requires include=security or include=security.has_email_2fa."
              },
              "has_totp_2fa": {
                "type": "boolean",
                "description": "Whether an authenticator app (TOTP) factor is active. Requires include=security or include=security.has_totp_2fa."
              }
            }
          },
          "meta": {
            "type": "object",
            "description": "Omitted by default. Include meta for all timestamps, or request individual meta fields.",
            "properties": {
              "onboarded_at": {
                "type": "string",
                "format": "date-time",
                "description": "Onboarding completion timestamp in UTC, or null when incomplete. Requires include=meta or include=meta.onboarded_at.",
                "nullable": true
              },
              "email_verified_at": {
                "type": "string",
                "format": "date-time",
                "description": "Email verification timestamp in UTC, or null when unverified. Requires include=meta or include=meta.email_verified_at.",
                "nullable": true
              },
              "last_seen_at": {
                "type": "string",
                "format": "date-time",
                "description": "Last-seen timestamp in UTC, or null when unavailable. Requires include=meta or include=meta.last_seen_at.",
                "nullable": true
              },
              "invitation_expires_at": {
                "type": "string",
                "format": "date-time",
                "description": "Invitation expiry timestamp in UTC, or null when no pending invitation is available. Requires include=meta or include=meta.invitation_expires_at.",
                "nullable": true
              }
            }
          },
          "is_org_owner": {
            "type": "boolean",
            "description": "Whether the authenticated user owns the organization identified by `org_id`."
          }
        }
      },
      "OrganizationSummary": {
        "title": "Organization reference",
        "description": "An organization reference containing only its ID and name. These fields are part of the full organization response and identify each child organization returned with include=children. This is not the summary object containing organization counts.",
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Organization ID (UUIDv7)."
          },
          "name": {
            "type": "string",
            "description": "Organization display name."
          }
        }
      },
      "Organization": {
        "title": "Organization",
        "description": "The organization resource, including its ID and name. Additional fields and child organizations depend on permissions and the requested includes.",
        "allOf": [
          {
            "$ref": "#/components/schemas/OrganizationSummary"
          },
          {
            "type": "object",
            "properties": {
              "is_mngr_active": {
                "type": "boolean",
                "description": "Whether organization-manager functionality is active."
              },
              "industry": {
                "type": "string",
                "description": "Organization industry, or null when unset. Available with organization-read permission.",
                "nullable": true
              },
              "description": {
                "type": "string",
                "description": "Organization description, or null when unset. Available with organization-read permission.",
                "nullable": true
              },
              "street_number": {
                "type": "integer",
                "description": "Street number of the organization address, or null when unset. Available with organization-read permission.",
                "nullable": true
              },
              "address_line1": {
                "type": "string",
                "description": "First line of the organization address, or null when unset. Available with organization-read permission.",
                "nullable": true
              },
              "address_line2": {
                "type": "string",
                "description": "Second line of the organization address, or null when unset. Available with organization-read permission.",
                "nullable": true
              },
              "city": {
                "type": "string",
                "description": "City of the organization address, or null when unset. Available with organization-read permission.",
                "nullable": true
              },
              "state": {
                "type": "string",
                "description": "State or region of the organization address, or null when unset. Available with organization-read permission.",
                "nullable": true
              },
              "country": {
                "type": "string",
                "description": "Country of the organization address, or null when unset. Available with organization-read permission.",
                "nullable": true
              },
              "zip": {
                "type": "string",
                "description": "Postal code of the organization address, or null when unset. Available with organization-read permission.",
                "nullable": true
              },
              "billing": {
                "type": "object",
                "description": "Billing summary. Returned only when requested with include=billing (or a billing.* leaf). Sensitive fields still require billing-read permission.",
                "properties": {
                  "plan_id": {
                    "type": "integer",
                    "description": "Organization plan identifier.",
                    "nullable": true
                  },
                  "subscription_status": {
                    "type": "string",
                    "description": "Current subscription status.",
                    "nullable": true
                  },
                  "latest_open_subscription_status": {
                    "type": "string",
                    "description": "Status of the latest open subscription, or null when none is available.",
                    "nullable": true
                  },
                  "is_ach_payment_active": {
                    "type": "boolean",
                    "description": "Whether ACH payments are active. Available with organization-read permission when billing is available."
                  }
                }
              },
              "preferences": {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "example": "USD",
                    "description": "Preferred currency code."
                  },
                  "timezone": {
                    "type": "string",
                    "example": "UTC",
                    "description": "Organization time zone.",
                    "nullable": true
                  },
                  "date_format": {
                    "type": "string",
                    "example": "yyyy-MM-dd",
                    "description": "Preferred date display format."
                  },
                  "time_format": {
                    "type": "string",
                    "enum": [
                      "24_hour",
                      "12_hour"
                    ],
                    "description": "Preferred time display format: 24_hour or 12_hour; may be null.",
                    "nullable": true
                  },
                  "phone_format": {
                    "type": "array",
                    "description": "Per-country phone-number display formats, or null when unset.",
                    "items": {
                      "$ref": "#/components/schemas/PhoneFormatEntry"
                    },
                    "nullable": true
                  }
                }
              },
              "features": {
                "type": "object",
                "description": "Tracking features. Returned only when requested with include=features.",
                "properties": {
                  "has_multi_location_setup": {
                    "type": "boolean",
                    "description": "Whether the organization is set up as a multi-location / multi-branch business, in which case its projects share one tracking script."
                  },
                  "has_caller_id_masking": {
                    "type": "boolean",
                    "description": "Whether caller ID masking is enabled."
                  }
                }
              },
              "compliance": {
                "type": "object",
                "description": "Compliance settings. Returned only when requested with include=compliance.",
                "properties": {
                  "hipaa_enabled": {
                    "type": "boolean",
                    "description": "Whether HIPAA settings are enabled."
                  },
                  "hipaa_baa_signed": {
                    "type": "boolean",
                    "description": "Whether the HIPAA business associate agreement has been signed."
                  }
                }
              },
              "summary": {
                "type": "object",
                "description": "Organization summary. has_users and tracking_number_count are returned with include=summary; project_count and user_count have their own dotted includes.",
                "properties": {
                  "has_users": {
                    "type": "boolean",
                    "description": "Whether the organization has users. Returned with include=summary."
                  },
                  "tracking_number_count": {
                    "type": "integer",
                    "description": "Number of tracking numbers. Returned with include=summary, subject to organization-read permission."
                  },
                  "project_count": {
                    "type": "integer",
                    "description": "Number of projects. Returned with include=summary.project_count."
                  },
                  "user_count": {
                    "type": "integer",
                    "description": "Number of users. Returned with include=summary.user_count."
                  }
                }
              },
              "meta": {
                "type": "object",
                "description": "Omitted by default. Include meta for all timestamps, or request individual meta fields. Requires organization-read permission.",
                "properties": {
                  "updated_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Last update timestamp in UTC, or null when unavailable. Requires include=meta or include=meta.updated_at, and organization-read permission.",
                    "nullable": true
                  },
                  "updated_by": {
                    "type": "string",
                    "format": "uuid",
                    "description": "User ID of the last updater, or null when the change came from the system. Requires include=meta or include=meta.updated_by, and organization-read permission.",
                    "nullable": true
                  }
                }
              },
              "children": {
                "type": "array",
                "description": "Accessible child organizations when include=children is requested.",
                "items": {
                  "$ref": "#/components/schemas/OrganizationSummary"
                }
              }
            }
          }
        ]
      },
      "Project": {
        "title": "Project",
        "description": "Project fields used by creation and update responses and project lookup lists. The project details model documents the grouped fields returned by project reads.",
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Project ID (UUIDv7)."
          },
          "name": {
            "type": "string",
            "description": "Project display name."
          },
          "industry": {
            "type": "string",
            "description": "Project industry."
          },
          "description": {
            "type": "string",
            "description": "Project description."
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone identifier.",
            "example": "America/New_York"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last update time."
          },
          "is_tracking_num_purchase_allowed": {
            "type": "boolean",
            "description": "Whether tracking-number purchasing is allowed for the project."
          },
          "destination_count": {
            "type": "integer",
            "description": "Number of destinations configured in the project.",
            "example": 2
          },
          "tracking_num_count": {
            "type": "integer",
            "description": "Number of tracking numbers in the project.",
            "example": 4
          },
          "active_tracking_num_count": {
            "type": "integer",
            "description": "Number of active tracking numbers in the project."
          },
          "call_flow_count": {
            "type": "integer",
            "description": "Number of call flows in the project."
          },
          "currency": {
            "type": "string",
            "description": "Project currency code."
          },
          "date_format": {
            "type": "string",
            "description": "Project date display format, or null to inherit the organization setting.",
            "nullable": true
          },
          "time_format": {
            "type": "string",
            "enum": [
              "24_hour",
              "12_hour"
            ],
            "description": "Project time display format, or null to inherit the organization setting.",
            "nullable": true
          },
          "allow_sms_in": {
            "type": "boolean",
            "description": "Whether inbound SMS is allowed."
          },
          "phone_format": {
            "type": "array",
            "description": "Per-country phone-number display formats, or null when unset.",
            "items": {
              "$ref": "#/components/schemas/PhoneFormatEntry"
            },
            "nullable": true
          },
          "test_call_skipped_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the onboarding test-call step was skipped."
          },
          "test_call_completed_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the onboarding test call was completed."
          },
          "roles": {
            "type": "array",
            "description": "Project roles when include=roles or include=role-claims is requested.",
            "items": {
              "$ref": "#/components/schemas/ProjectRole"
            }
          }
        }
      },
      "ProjectDetail": {
        "title": "Project details",
        "type": "object",
        "description": "Project detail response. Optional groups require include; properties can further filter the result.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Project ID (UUIDv7).",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Project display name."
          },
          "industry": {
            "type": "string",
            "description": "Project industry.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Project description.",
            "nullable": true
          },
          "preferences": {
            "type": "object",
            "properties": {
              "timezone": {
                "type": "string",
                "description": "IANA time zone identifier, or null when unset.",
                "nullable": true
              },
              "currency": {
                "type": "string",
                "description": "Project currency code."
              },
              "date_format": {
                "type": "string",
                "description": "Date display format override, or null to inherit the organization setting.",
                "nullable": true
              },
              "time_format": {
                "type": "string",
                "enum": [
                  "24_hour",
                  "12_hour"
                ],
                "description": "Time display format override, or null to inherit the organization setting.",
                "nullable": true
              },
              "phone_format": {
                "type": "array",
                "description": "Per-country phone-number display formats, or null when unset.",
                "items": {
                  "$ref": "#/components/schemas/PhoneFormatEntry"
                },
                "nullable": true
              }
            }
          },
          "capabilities": {
            "type": "object",
            "description": "Omitted by default. Include capabilities for all fields or request individual field paths. can_receive_sms is available to every account; can_add_tracking_numbers is whitelabel-only.",
            "properties": {
              "can_receive_sms": {
                "type": "boolean",
                "description": "Whether inbound SMS is enabled. Requires include=capabilities or include=capabilities.can_receive_sms."
              },
              "can_add_tracking_numbers": {
                "type": "boolean",
                "x-whitelabel-only": true,
                "description": "Whether the project may add tracking numbers. Requires include=capabilities or include=capabilities.can_add_tracking_numbers."
              }
            }
          },
          "summary": {
            "type": "object",
            "description": "Omitted by default. Include summary for all counts or request individual field paths.",
            "properties": {
              "destination_count": {
                "type": "integer",
                "description": "Number of destinations. Requires include=summary or include=summary.destination_count."
              },
              "tracking_number_count": {
                "type": "integer",
                "description": "Number of tracking numbers. Requires include=summary or include=summary.tracking_number_count."
              },
              "active_tracking_number_count": {
                "type": "integer",
                "description": "Number of active tracking numbers. Requires include=summary or include=summary.active_tracking_number_count."
              },
              "call_flow_count": {
                "type": "integer",
                "description": "Number of call flows. Requires include=summary or include=summary.call_flow_count."
              }
            }
          },
          "meta": {
            "type": "object",
            "description": "Omitted by default. Include meta for all timestamps or request individual field paths.",
            "properties": {
              "created_at": {
                "type": "string",
                "description": "When the project was created, in UTC. Requires include=meta or include=meta.created_at.",
                "format": "date-time",
                "nullable": true
              },
              "updated_at": {
                "type": "string",
                "description": "Last project update timestamp in UTC, or null when unavailable. Requires include=meta or include=meta.updated_at.",
                "format": "date-time",
                "nullable": true
              },
              "test_call_skipped_at": {
                "type": "string",
                "description": "Test-call skip timestamp in UTC, or null when unavailable. Requires include=meta or include=meta.test_call_skipped_at.",
                "format": "date-time",
                "nullable": true
              },
              "test_call_completed_at": {
                "type": "string",
                "description": "Test-call completion timestamp in UTC, or null when unavailable. Requires include=meta or include=meta.test_call_completed_at.",
                "format": "date-time",
                "nullable": true
              }
            }
          },
          "roles": {
            "type": "array",
            "description": "Project roles when include=roles or include=role-claims is requested.",
            "items": {
              "$ref": "#/components/schemas/ProjectRole"
            }
          }
        }
      },
      "ProjectCreateResponse": {
        "title": "Created project response",
        "type": "object",
        "required": [
          "id",
          "name",
          "preferences"
        ],
        "description": "The basic project representation returned after creation.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Project ID (UUIDv7)."
          },
          "name": {
            "type": "string",
            "description": "Project display name."
          },
          "industry": {
            "type": "string",
            "description": "Project industry.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Project description.",
            "nullable": true
          },
          "preferences": {
            "type": "object",
            "required": [
              "timezone",
              "currency",
              "date_format",
              "time_format",
              "phone_format"
            ],
            "properties": {
              "timezone": {
                "type": "string",
                "description": "IANA time zone identifier.",
                "nullable": true
              },
              "currency": {
                "type": "string",
                "description": "Project currency code."
              },
              "date_format": {
                "type": "string",
                "description": "Date display format override, or null to inherit the organization setting.",
                "nullable": true
              },
              "time_format": {
                "type": "string",
                "enum": [
                  "24_hour",
                  "12_hour"
                ],
                "description": "Time display format override, or null to inherit the organization setting.",
                "nullable": true
              },
              "phone_format": {
                "type": "array",
                "description": "Per-country phone-number display formats.",
                "items": {
                  "$ref": "#/components/schemas/PhoneFormatEntry"
                },
                "nullable": true
              }
            }
          }
        }
      },
      "ProjectUpdateResponse": {
        "title": "Updated project response",
        "type": "object",
        "required": [
          "id",
          "name",
          "preferences"
        ],
        "description": "The basic project representation. Each capabilities field appears only when it was supplied in the update request: can_receive_sms for any account, can_add_tracking_numbers for whitelabel accounts.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Project ID (UUIDv7)."
          },
          "name": {
            "type": "string",
            "description": "Project display name."
          },
          "industry": {
            "type": "string",
            "description": "Project industry.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Project description.",
            "nullable": true
          },
          "preferences": {
            "type": "object",
            "required": [
              "timezone",
              "currency",
              "date_format",
              "time_format",
              "phone_format"
            ],
            "properties": {
              "timezone": {
                "type": "string",
                "description": "IANA time zone identifier.",
                "nullable": true
              },
              "currency": {
                "type": "string",
                "description": "Project currency code."
              },
              "date_format": {
                "type": "string",
                "description": "Date display format override, or null to inherit the organization setting.",
                "nullable": true
              },
              "time_format": {
                "type": "string",
                "enum": [
                  "24_hour",
                  "12_hour"
                ],
                "description": "Time display format override, or null to inherit the organization setting.",
                "nullable": true
              },
              "phone_format": {
                "type": "array",
                "description": "Per-country phone-number display formats.",
                "items": {
                  "$ref": "#/components/schemas/PhoneFormatEntry"
                },
                "nullable": true
              }
            }
          },
          "capabilities": {
            "type": "object",
            "description": "Each field is returned only when it was supplied in the request body.",
            "properties": {
              "can_receive_sms": {
                "type": "boolean",
                "description": "Whether inbound SMS is enabled."
              },
              "can_add_tracking_numbers": {
                "type": "boolean",
                "x-whitelabel-only": true,
                "description": "Whether the project may add tracking numbers.",
                "nullable": true
              }
            }
          }
        }
      },
      "ProjectListResponse": {
        "title": "Project list response",
        "type": "object",
        "required": [
          "items",
          "page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "description": "Projects in this page.",
            "items": {
              "$ref": "#/components/schemas/ProjectDetail"
            }
          },
          "page": {
            "$ref": "#/components/schemas/CursorPage"
          }
        }
      },
      "ProjectRole": {
        "title": "Project role",
        "type": "object",
        "required": [
          "id",
          "project_id",
          "name",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "claims": {
            "type": "array",
            "description": "The role's permissions when include=role-claims is requested.",
            "items": {
              "$ref": "#/components/schemas/ProjectRoleClaim"
            }
          }
        }
      },
      "ProjectRoleClaim": {
        "title": "Project role permission",
        "type": "object",
        "required": [
          "id",
          "role_id",
          "claim_type",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "role_id": {
            "type": "string",
            "format": "uuid"
          },
          "claim_type": {
            "type": "string"
          },
          "claim_value": {
            "type": "string",
            "description": "A JSON value whose meaning depends on the claim type, or null.",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "PhoneFormatEntry": {
        "title": "Phone format entry",
        "type": "object",
        "required": [
          "country_id",
          "phone_format"
        ],
        "description": "Per-country phone-number display format.",
        "properties": {
          "country_id": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code.",
            "example": "US"
          },
          "phone_format": {
            "type": "string",
            "description": "Phone-number display format for the country ('x' marks a digit position).",
            "example": "(xxx) xxx-xxxx"
          }
        }
      },
      "ProjectPreferencesRequest": {
        "title": "Project preferences",
        "type": "object",
        "description": "Project preferences, nested to mirror the project response.",
        "properties": {
          "timezone": {
            "type": "string",
            "description": "IANA timezone identifier. On create, defaults to the organization timezone when omitted.",
            "example": "America/New_York"
          },
          "currency": {
            "type": "string",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CHF",
              "NOK",
              "CZK",
              "AUD"
            ],
            "description": "Project currency code. On create, defaults to the organization currency when omitted.",
            "example": "USD"
          },
          "date_format": {
            "type": "string",
            "enum": [
              "yyyy-MM-dd",
              "MM-dd-yyyy",
              "dd-MM-yyyy",
              "yyyy/MM/dd",
              "MM/dd/yyyy",
              "dd/MM/yyyy",
              "yy-MM-dd",
              "MM-dd-yy",
              "dd-MM-yy",
              "yy/MM/dd",
              "MM/dd/yy",
              "dd/MM/yy"
            ],
            "description": "Date display format override. Send null to inherit the organization setting.",
            "nullable": true
          },
          "time_format": {
            "type": "string",
            "enum": [
              "24_hour",
              "12_hour"
            ],
            "description": "Time display format override. Send null to inherit the organization setting.",
            "nullable": true
          },
          "phone_format": {
            "type": "array",
            "description": "Per-country phone-number display formats. Replaces the whole list; country_id is an ISO 3166-1 alpha-2 code.",
            "items": {
              "$ref": "#/components/schemas/PhoneFormatEntry"
            }
          }
        }
      },
      "CreateProjectRequest": {
        "title": "Create project request",
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Project display name."
          },
          "industry": {
            "type": "string",
            "description": "Project industry."
          },
          "description": {
            "type": "string",
            "description": "Project description."
          },
          "preferences": {
            "$ref": "#/components/schemas/ProjectPreferencesRequest"
          }
        }
      },
      "UpdateOrgRequest": {
        "title": "Update organization request",
        "type": "object",
        "description": "Partial update: only the fields present are changed. Present null clears a nullable field.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Organization display name."
          },
          "industry": {
            "type": "string",
            "description": "Organization industry.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Organization description.",
            "nullable": true
          },
          "use_org_description": {
            "type": "boolean",
            "description": "Whether the organization description is used as the default for all projects."
          },
          "street_number": {
            "type": "integer",
            "description": "Street number of the organization address.",
            "nullable": true
          },
          "address_line1": {
            "type": "string",
            "description": "First line of the organization address.",
            "nullable": true
          },
          "address_line2": {
            "type": "string",
            "description": "Second line of the organization address.",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "City of the organization address.",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "State or region of the organization address.",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "Country of the organization address.",
            "nullable": true
          },
          "zip": {
            "type": "string",
            "description": "Postal code of the organization address (at most 10 characters).",
            "nullable": true
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone identifier."
          },
          "currency": {
            "type": "string",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CHF",
              "NOK",
              "CZK",
              "AUD"
            ],
            "description": "Organization currency code.",
            "example": "USD"
          },
          "date_format": {
            "type": "string",
            "description": "Preferred date display format."
          },
          "time_format": {
            "type": "string",
            "enum": [
              "24_hour",
              "12_hour"
            ],
            "description": "Preferred time display format."
          },
          "phone_format": {
            "type": "array",
            "description": "Per-country phone-number display formats. Replaces the whole list; country_id is an ISO 3166-1 alpha-2 code.",
            "items": {
              "$ref": "#/components/schemas/PhoneFormatEntry"
            }
          },
          "features": {
            "type": "object",
            "description": "Tracking features. Only the keys present are changed.",
            "properties": {
              "has_multi_location_setup": {
                "type": "boolean",
                "description": "Whether multi-location (group) tracking setup is enabled."
              },
              "has_caller_id_masking": {
                "type": "boolean",
                "description": "Whether caller ID masking is enabled."
              }
            }
          }
        }
      },
      "UpdateProjectRequest": {
        "title": "Update project request",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Project display name."
          },
          "industry": {
            "type": "string",
            "description": "Project industry."
          },
          "description": {
            "type": "string",
            "description": "Project description."
          },
          "preferences": {
            "$ref": "#/components/schemas/ProjectPreferencesRequest"
          },
          "capabilities": {
            "type": "object",
            "description": "Writable capabilities, nested to mirror the project response. The former names allow_sms and allow_adding_tracking_numbers are rejected with 422; use can_receive_sms and can_add_tracking_numbers.",
            "properties": {
              "can_receive_sms": {
                "type": "boolean",
                "description": "Whether inbound SMS is allowed."
              },
              "can_add_tracking_numbers": {
                "type": "boolean",
                "x-whitelabel-only": true,
                "description": "Whether the project may add tracking numbers. Whitelabel accounts only; a default account gets 403 when it changes this."
              }
            }
          }
        }
      },
      "TrackingNumber": {
        "title": "Tracking number",
        "type": "object",
        "required": [
          "id",
          "name",
          "number",
          "number_display",
          "status",
          "project_id",
          "call_flow_id",
          "line_type",
          "country",
          "source"
        ],
        "description": "A tracking number. List and detail use the same fields and include rules. Source names and types belong to the tracking-source resource; project names belong to the project resource.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Tracking number ID (UUIDv7)."
          },
          "name": {
            "type": "string",
            "description": "Friendly tracking-number name.",
            "nullable": true
          },
          "number": {
            "type": "string",
            "description": "Tracking phone number in E.164 digits.",
            "example": "18577700724"
          },
          "number_display": {
            "type": "string",
            "description": "Formatted tracking phone number.",
            "example": "+18577700724"
          },
          "status": {
            "type": "string",
            "description": "Current tracking-number status, including verification progress, in lowercase snake_case: active, awaiting_registration, pending_verification, rejected, or another provisioning state such as pending. Reads verification records without calling the provider.",
            "example": "active"
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID (UUIDv7) of the owning project."
          },
          "call_flow_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID (UUIDv7) of the assigned call flow, or null when unassigned.",
            "nullable": true
          },
          "line_type": {
            "type": "string",
            "description": "Line type in lowercase snake_case: local, toll_free, national, mobile, or click2dial.",
            "example": "local"
          },
          "country": {
            "type": "object",
            "required": [
              "iso_code",
              "dialing_code"
            ],
            "properties": {
              "iso_code": {
                "type": "string",
                "description": "ISO country code.",
                "example": "US"
              },
              "dialing_code": {
                "type": "string",
                "description": "Dialling code, optionally with a region code.",
                "example": "1"
              }
            }
          },
          "source": {
            "type": "object",
            "required": [
              "id"
            ],
            "description": "The assigned tracking source. Only id is returned by default; include=source also returns the DNI settings.",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Tracking source ID (UUIDv7), or null when the stored reference cannot be resolved.",
                "nullable": true
              },
              "dni_group_id": {
                "type": "integer",
                "description": "Configured DNI group identifier, or null when unassigned. This is an integer, not a UUIDv7. Requires include=source or include=source.dni_group_id.",
                "nullable": true
              },
              "swap_group_index": {
                "type": "integer",
                "description": "Zero-based swap-group index, or null when unassigned. Requires include=source or include=source.swap_group_index.",
                "example": 0,
                "nullable": true
              }
            }
          },
          "features": {
            "type": "object",
            "description": "Include-only configured features.",
            "properties": {
              "has_whisper": {
                "type": "boolean",
                "description": "Whether a whisper message is configured. Requires include=features or include=features.has_whisper."
              }
            }
          },
          "capabilities": {
            "type": "object",
            "description": "Include-only allowed actions.",
            "properties": {
              "can_delete": {
                "type": "boolean",
                "description": "Whether the tracking number can be removed. Requires include=capabilities or include=capabilities.can_delete."
              }
            }
          },
          "messaging": {
            "type": "object",
            "description": "Include-only messaging capabilities. Null means the stored capability data does not establish support.",
            "properties": {
              "sms": {
                "type": "object",
                "description": "Requires include=messaging, include=messaging.sms, or an individual field path.",
                "properties": {
                  "inbound": {
                    "type": "boolean",
                    "description": "Reported inbound SMS support. Individually selectable with include=messaging.sms.inbound.",
                    "nullable": true
                  },
                  "outbound": {
                    "type": "boolean",
                    "description": "Reported outbound SMS support. Individually selectable with include=messaging.sms.outbound.",
                    "nullable": true
                  },
                  "domestic": {
                    "type": "boolean",
                    "description": "Reported domestic SMS support. Individually selectable with include=messaging.sms.domestic.",
                    "nullable": true
                  },
                  "international": {
                    "type": "boolean",
                    "description": "Reported international SMS support. Individually selectable with include=messaging.sms.international.",
                    "nullable": true
                  }
                }
              }
            }
          }
        }
      },
      "TrackingNumberGroup": {
        "title": "Dynamic number insertion group",
        "type": "object",
        "description": "A DNI swap group in `grouped_a_num_list`. Group-level fields contain the values shared by its tracking numbers, and `data` contains the individual numbers. When the numbers use different call flows, `flow_id` is `-2`.",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID (UUIDv7) of the owning project."
          },
          "swap_group": {
            "type": "integer",
            "description": "The swap group the numbers share."
          },
          "dni_source": {
            "type": "string",
            "format": "uuid",
            "description": "ID (UUIDv7) of the tracking source the numbers share."
          },
          "dni_group_id": {
            "type": "integer",
            "description": "The configured DNI group, when there is one."
          },
          "flow_id": {
            "type": "string",
            "description": "ID (UUIDv7) of the shared call flow, or -2 when the numbers differ."
          },
          "initial": {
            "type": "boolean",
            "description": "Always true. Marks the row as the first of its group."
          },
          "data": {
            "type": "array",
            "description": "The numbers in the group.",
            "items": {
              "$ref": "#/components/schemas/TrackingNumber"
            }
          }
        }
      },
      "TrackingDataResponse": {
        "title": "Tracking number list response",
        "type": "object",
        "required": [
          "items",
          "page"
        ],
        "description": "One page of tracking numbers plus any sections requested through include. Included groups and lookup catalogues describe the complete authorized scope, regardless of search and pagination; `projects` lists only the projects of the numbers in this page.",
        "properties": {
          "items": {
            "type": "array",
            "description": "Tracking numbers in this page, ordered by number and ID.",
            "items": {
              "$ref": "#/components/schemas/TrackingNumber"
            }
          },
          "page": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CursorPage"
              },
              {
                "type": "object",
                "properties": {
                  "total_count": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "All authorized matches before pagination. Present only with include=page.total_count; not a snapshot across requests."
                  }
                }
              }
            ]
          },
          "grouped_a_num_list": {
            "type": "array",
            "description": "Returned by include=groups. The same numbers arranged by DNI swap group. A row is either a TrackingNumberGroup header with numbers in `data`, or a lone number flattened into the list.",
            "items": {
              "$ref": "#/components/schemas/TrackingNumberGroup"
            }
          },
          "tracking_sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TrackingSource"
            },
            "description": "Returned by include=sources. Sources available in the authorized project scope, plus the built-in catalogue."
          },
          "swap_groups": {
            "type": "object",
            "description": "Returned by include=swap-groups. Swap-group configuration keyed by DNI group id."
          },
          "flows": {
            "type": "array",
            "description": "Returned by include=flows. Call flows available for number assignment.",
            "items": {
              "type": "object"
            }
          },
          "number_formatting": {
            "type": "object",
            "description": "Returned by include=number-formatting. Country metadata and organization/project phone formatting rules."
          },
          "projects": {
            "type": "array",
            "description": "Returned by include=projects. The projects that the numbers in this page belong to, ordered by name.",
            "items": {
              "$ref": "#/components/schemas/ProjectReference"
            }
          }
        }
      },
      "OrganizationTrackingDataResponse": {
        "title": "Organization tracking inventory response",
        "type": "object",
        "required": [
          "a_num_list"
        ],
        "description": "The complete authorized inventory and requested lookup collections. This legacy organization contract is not paginated.",
        "properties": {
          "a_num_list": {
            "type": "array",
            "description": "All tracking numbers in projects where the caller has TrackingNumberRead permission.",
            "items": {
              "$ref": "#/components/schemas/TrackingNumber"
            }
          },
          "grouped_a_num_list": {
            "type": "array",
            "description": "Returned by include=groups. The same numbers arranged by DNI swap group. A row is either a TrackingNumberGroup header with numbers in `data`, or a lone number flattened into the list.",
            "items": {
              "$ref": "#/components/schemas/TrackingNumberGroup"
            }
          },
          "tracking_sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TrackingSource"
            },
            "description": "Returned by include=sources. Sources available in the authorized project scope, plus the built-in catalogue."
          },
          "swap_groups": {
            "type": "object",
            "description": "Returned by include=swap-groups. Swap-group configuration keyed by DNI group id."
          },
          "flows": {
            "type": "array",
            "description": "Returned by include=flows. Call flows available for number assignment.",
            "items": {
              "type": "object"
            }
          },
          "number_formatting": {
            "type": "object",
            "description": "Returned by include=number-formatting. Country metadata and organization/project phone formatting rules."
          },
          "projects": {
            "type": "array",
            "description": "Returned by include=projects. The projects that the numbers in `a_num_list` belong to, ordered by name.",
            "items": {
              "$ref": "#/components/schemas/ProjectReference"
            }
          }
        }
      },
      "RemoveDestinationsRequest": {
        "title": "Remove destinations request",
        "type": "object",
        "required": [
          "destinations"
        ],
        "description": "Identifies the destinations to remove and controls call-flow detachment.",
        "properties": {
          "destinations": {
            "type": "array",
            "description": "Destinations to remove from their owning projects.",
            "items": {
              "type": "object",
              "required": [
                "number",
                "project_id"
              ],
              "properties": {
                "number": {
                  "type": "string",
                  "description": "Destination phone number in E.164 digits."
                },
                "project_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Project ID (UUIDv7) that owns the destination."
                }
              }
            }
          },
          "remove_from_valid_callflows": {
            "type": "boolean",
            "description": "Detach the destination from any call flow that uses it. Requires the call-flow delete permission in addition to the destination one."
          }
        }
      },
      "RemoveTrackingSourcesRequest": {
        "title": "Remove tracking sources request",
        "type": "object",
        "required": [
          "tracking_sources"
        ],
        "description": "Identifies the project-owned tracking sources to remove.",
        "properties": {
          "tracking_sources": {
            "type": "array",
            "description": "Tracking sources to remove, identified by ID (UUIDv7).",
            "items": {
              "type": "object",
              "required": [
                "id"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Tracking source ID (UUIDv7)."
                }
              }
            }
          }
        }
      },
      "RemoveCallFlowsRequest": {
        "title": "Remove call flows request",
        "type": "object",
        "required": [
          "call_flows"
        ],
        "description": "Identifies the call flows to remove.",
        "properties": {
          "call_flows": {
            "type": "array",
            "description": "Call flows to remove from their owning projects.",
            "items": {
              "type": "object",
              "required": [
                "id",
                "project_id"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Call flow ID (UUIDv7)."
                },
                "project_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Project ID (UUIDv7) that owns the flow."
                }
              }
            }
          }
        }
      },
      "MassUpdateCallFlowsRequest": {
        "title": "Bulk call flow update request",
        "type": "object",
        "required": [
          "call_flows",
          "setting",
          "value"
        ],
        "description": "Applies one boolean-style setting across several call flows.",
        "properties": {
          "call_flows": {
            "type": "array",
            "description": "Call flows whose selected setting will be updated.",
            "items": {
              "type": "object",
              "required": [
                "id",
                "project_id"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Call flow ID (UUIDv7)."
                },
                "project_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Project ID (UUIDv7) that owns the flow."
                }
              }
            }
          },
          "setting": {
            "type": "string",
            "enum": [
              "record",
              "mask_cid"
            ],
            "description": "Which setting to apply."
          },
          "value": {
            "type": "integer",
            "description": "The value to set."
          },
          "flow_type": {
            "type": "string",
            "description": "Optional flow-type filter."
          }
        }
      },
      "ProjectMassUpdateCallFlowsRequest": {
        "title": "Project bulk call flow update request",
        "type": "object",
        "required": [
          "call_flows",
          "setting",
          "value"
        ],
        "description": "Applies one boolean-style setting across several call flows in the project named in the URL.",
        "properties": {
          "call_flows": {
            "type": "array",
            "minItems": 1,
            "description": "Call flows in the route project whose selected setting will be updated.",
            "items": {
              "type": "object",
              "required": [
                "id"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Call flow ID (UUIDv7)."
                }
              }
            }
          },
          "setting": {
            "type": "string",
            "enum": [
              "record",
              "mask_cid"
            ],
            "description": "Which setting to apply."
          },
          "value": {
            "type": "integer",
            "description": "The value to set."
          },
          "flow_type": {
            "type": "string",
            "enum": [
              "telephony",
              "callalerts"
            ],
            "description": "Optional flow-type filter."
          }
        }
      },
      "RemoveTrackingNumbersRequest": {
        "title": "Remove tracking numbers request",
        "type": "object",
        "required": [
          "numbers"
        ],
        "properties": {
          "numbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Phone numbers of the tracking numbers to remove."
          }
        }
      },
      "BulkTrackingNumbers": {
        "title": "Tracking numbers selected for a bulk mutation",
        "type": "array",
        "minItems": 1,
        "maxItems": 1000,
        "items": {
          "type": "string",
          "pattern": "^\\+?[0-9]+$"
        },
        "description": "Phone-number strings belonging to the route project, containing digits with an optional leading +. Leading + is removed for matching. Duplicate normalized numbers are accepted and count once. The 1000-entry limit applies before deduplication.",
        "example": [
          "18577700724",
          "+18577700725"
        ]
      },
      "UpdateTrackingNumbersRequest": {
        "title": "Bulk tracking number update request",
        "type": "object",
        "required": [
          "numbers",
          "changes"
        ],
        "additionalProperties": false,
        "properties": {
          "numbers": {
            "$ref": "#/components/schemas/BulkTrackingNumbers"
          },
          "changes": {
            "type": "object",
            "minProperties": 1,
            "additionalProperties": false,
            "description": "One or more fields to apply to every selected number. Omitted fields remain unchanged. Null values are not accepted.",
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 100,
                "description": "New friendly name."
              },
              "source_id": {
                "type": "string",
                "format": "uuid",
                "description": "ID (UUIDv7) of an available tracking source."
              },
              "display_format": {
                "type": "object",
                "required": [
                  "country_iso",
                  "format"
                ],
                "additionalProperties": false,
                "properties": {
                  "country_iso": {
                    "type": "string",
                    "description": "Country ISO code. Every selected number must match this country.",
                    "example": "US"
                  },
                  "format": {
                    "type": "string",
                    "description": "Display pattern using x placeholders for national-number digits.",
                    "example": "+1 (xxx) xxx-xxxx"
                  }
                }
              }
            }
          }
        },
        "example": {
          "numbers": [
            "18577700724",
            "+18577700725"
          ],
          "changes": {
            "name": "Summer campaign",
            "source_id": "0195f000-0000-7000-8000-000000000001",
            "display_format": {
              "country_iso": "US",
              "format": "+1 (xxx) xxx-xxxx"
            }
          }
        }
      },
      "MoveTrackingNumbersRequest": {
        "title": "Move tracking numbers request",
        "type": "object",
        "required": [
          "numbers",
          "target_project_id"
        ],
        "additionalProperties": false,
        "properties": {
          "numbers": {
            "$ref": "#/components/schemas/BulkTrackingNumbers"
          },
          "target_project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Destination project ID (UUIDv7), in the same organization and different from the source."
          }
        },
        "example": {
          "numbers": [
            "18577700724",
            "+18577700725"
          ],
          "target_project_id": "0195f000-0000-7000-8000-000000000002"
        }
      },
      "UpdateTrackingNumbersResponse": {
        "title": "Bulk tracking number mutation response",
        "type": "object",
        "required": [
          "updated"
        ],
        "additionalProperties": false,
        "description": "Successful atomic update or move. Every unique normalized number was processed.",
        "properties": {
          "updated": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "description": "Number of unique normalized tracking numbers updated or moved."
          }
        },
        "example": {
          "updated": 2
        }
      },
      "UpdateTrackingNumberRequest": {
        "title": "Update tracking number request",
        "type": "object",
        "description": "The fields to change on this tracking number. Every field is optional and an omitted field is left unchanged; send at least one.",
        "properties": {
          "name": {
            "type": "string",
            "description": "New friendly name for the tracking number."
          },
          "number_display": {
            "type": "string",
            "description": "New formatted phone number. Its digits must match the tracking number itself.",
            "example": "+1 857 770 0724"
          },
          "source_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID (UUIDv7) of the tracking source to assign."
          }
        }
      },
      "Destination": {
        "title": "Destination",
        "type": "object",
        "required": [
          "id",
          "name",
          "project_id",
          "number",
          "number_display",
          "is_verified"
        ],
        "description": "A destination. List, detail, and successful creation use the same default fields. Optional objects require include on reads. The project name is available from the project resource.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Destination ID (UUIDv7)."
          },
          "name": {
            "type": "string",
            "description": "Friendly destination name.",
            "example": "Sales line",
            "nullable": true
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID (UUIDv7) of the owning project."
          },
          "number": {
            "type": "string",
            "description": "Destination phone number in the stored format.",
            "example": "306937007434"
          },
          "number_display": {
            "type": "string",
            "description": "Formatted destination phone number.",
            "example": "+30 693 700 7434"
          },
          "is_verified": {
            "type": "boolean",
            "description": "Whether the destination has been verified."
          },
          "capabilities": {
            "type": "object",
            "description": "Include-only allowed actions.",
            "properties": {
              "can_delete": {
                "type": "boolean",
                "description": "Whether the destination can be removed without first changing its call-flow usage. Requires include=capabilities or include=capabilities.can_delete."
              }
            }
          },
          "summary": {
            "type": "object",
            "description": "Include-only usage counts.",
            "properties": {
              "call_flow_count": {
                "type": "integer",
                "description": "Number of call flows using this destination. Requires include=summary or include=summary.call_flow_count."
              },
              "tracking_number_count": {
                "type": "integer",
                "description": "Number of tracking numbers routed to this destination. Requires include=summary or include=summary.tracking_number_count."
              }
            }
          },
          "capping": {
            "type": "object",
            "description": "Include-only call cap settings and usage.",
            "properties": {
              "limit": {
                "type": "integer",
                "description": "Configured call limit, or null when capping is disabled. Requires include=capping or include=capping.limit.",
                "example": 10,
                "nullable": true
              },
              "starts_on": {
                "type": "string",
                "format": "date",
                "description": "Date on which call capping starts. Requires include=capping or include=capping.starts_on.",
                "nullable": true
              },
              "call_count": {
                "type": "integer",
                "description": "Calls counted toward the current cap. Requires include=capping or include=capping.call_count.",
                "nullable": true
              }
            }
          },
          "rates": {
            "type": "object",
            "description": "Include-only per-answered-call rates. Values are null when unavailable or the caller lacks destination-rate-read permission.",
            "properties": {
              "eu_per_answered_call": {
                "type": "string",
                "description": "EU charge per answered call as a decimal string. Requires include=rates or include=rates.eu_per_answered_call.",
                "example": "0.05",
                "nullable": true
              },
              "non_eu_per_answered_call": {
                "type": "string",
                "description": "Non-EU charge per answered call as a decimal string. Requires include=rates or include=rates.non_eu_per_answered_call.",
                "example": "0.10",
                "nullable": true
              },
              "is_eea": {
                "type": "boolean",
                "description": "Whether the destination is in the EEA, when rate information is available. Requires include=rates or include=rates.is_eea.",
                "nullable": true
              }
            }
          }
        }
      },
      "DestinationListResponse": {
        "title": "Destination list response",
        "type": "object",
        "required": [
          "items",
          "page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Destination"
            }
          },
          "page": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CursorPage"
              },
              {
                "type": "object",
                "properties": {
                  "total_count": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "All authorized matches before pagination. Present only with include=page.total_count; not a snapshot across requests."
                  }
                }
              }
            ]
          },
          "projects": {
            "type": "array",
            "description": "Returned by include=projects. The projects that the destinations in this page belong to, ordered by name.",
            "items": {
              "$ref": "#/components/schemas/ProjectReference"
            }
          }
        }
      },
      "ProjectReference": {
        "title": "Project reference",
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Project ID (UUIDv7)."
          },
          "name": {
            "type": "string",
            "description": "Project name."
          }
        }
      },
      "CreateDestinationRequest": {
        "title": "Create destination request",
        "type": "object",
        "required": [
          "number"
        ],
        "properties": {
          "number": {
            "type": "string",
            "description": "Destination phone number, normally supplied in E.164 digits.",
            "example": "15551234567"
          },
          "name": {
            "type": "string",
            "description": "Friendly destination name.",
            "example": "Sales line"
          },
          "create_call_flow": {
            "type": "boolean",
            "description": "Create a simple call flow for the destination when true.",
            "default": false
          },
          "confirm_high_rate": {
            "type": "boolean",
            "description": "Set to true only when repeating a request after receiving confirmation_required=true.",
            "default": false
          }
        }
      },
      "UpdateDestinationRequest": {
        "title": "Update destination request",
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "New friendly name for the destination.",
            "example": "Support line"
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Optional guard. When supplied it must be the ID (UUIDv7) of the project in the path; a mismatch is refused with 403 and nothing is changed."
          }
        }
      },
      "CreateDestinationResponse": {
        "title": "Create destination response",
        "type": "object",
        "properties": {
          "destination": {
            "description": "Created Destination object with its default fields (id, name, project_id, number, number_display, is_verified) after creation. When confirmation_required is true, this contains the requested destination phone number instead."
          },
          "confirmation_required": {
            "type": "boolean",
            "description": "True when user confirmation is required before creating a high-rate destination."
          },
          "rate": {
            "type": "number",
            "format": "double",
            "description": "Detected high destination rate."
          },
          "max_rate": {
            "type": "number",
            "format": "double",
            "description": "Maximum destination rate allowed without confirmation."
          },
          "charge_eu": {
            "type": "string",
            "description": "EU per-answered-call charge for the confirmation dialog."
          },
          "charge_non_eu": {
            "type": "string",
            "description": "Non-EU per-answered-call charge for the confirmation dialog."
          }
        }
      },
      "CallFlowConfiguration": {
        "type": "object",
        "description": "Current authoring state, including draft/pending versions even when the base resource requests get_latest_valid. Definitions use the existing configuration service. call_flow_id is the public UUID of the flow, the same as the resource id. A draft the app saved unfinished keeps its open steps: an action of type none has no action chosen yet, a null destination has no number yet, an empty caller prefix or keypad digit is not chosen yet, and empty text-to-speech text is not filled in yet. Unsupported list entries (legacy routing actions) omit definition/features/assigned_tracking_numbers and report unavailable_reason=unsupported_definition and editable=false.",
        "required": [
          "call_flow_id",
          "name",
          "flow_type",
          "state",
          "pending_changes",
          "editable",
          "assigned_tracking_number_count"
        ],
        "properties": {
          "call_flow_id": {
            "type": "string",
            "format": "uuid",
            "description": "Public UUIDv7 of the call flow."
          },
          "name": {
            "type": "string"
          },
          "flow_type": {
            "type": "string",
            "enum": [
              "telephony",
              "callalerts"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "valid",
              "draft",
              "pending_changes"
            ]
          },
          "pending_changes": {
            "type": "boolean"
          },
          "editable": {
            "type": "boolean"
          },
          "features": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "assigned_tracking_number_count": {
            "type": "integer",
            "minimum": 0
          },
          "assigned_tracking_numbers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "number": {
                  "type": "string"
                },
                "display_number": {
                  "type": "string",
                  "nullable": true
                },
                "name": {
                  "type": "string",
                  "nullable": true
                }
              }
            }
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "unavailable_reason": {
            "type": "string",
            "enum": [
              "unsupported_definition"
            ]
          },
          "definition": {
            "type": "object",
            "required": [
              "version",
              "call_start_event",
              "caller_id_mode",
              "recording",
              "paths"
            ],
            "properties": {
              "version": {
                "type": "integer",
                "enum": [
                  1
                ]
              },
              "call_start_event": {
                "type": "boolean"
              },
              "caller_id_mode": {
                "type": "string",
                "enum": [
                  "original",
                  "tracking_number",
                  "anonymous",
                  "destination"
                ]
              },
              "recording": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "stop_key": {
                    "type": "string",
                    "nullable": true
                  },
                  "pause_key": {
                    "type": "string",
                    "nullable": true
                  }
                }
              },
              "paths": {
                "type": "array",
                "items": {
                  "type": "object",
                  "description": "Typed match/action with optional greeting, whisper, voicemail_fallback and survey. Media uses opaque media_ref values."
                }
              }
            }
          }
        }
      },
      "CallFlowSettings": {
        "type": "object",
        "required": [
          "destinations",
          "states",
          "call_flows",
          "no_whisper_anums",
          "project_id"
        ],
        "properties": {
          "destinations": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "states": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "call_flows": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "no_whisper_anums": {
            "type": "integer",
            "nullable": true
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "softphone_users": {
            "type": "array",
            "description": "Users a telephony flow can ring on their softphone, plus any user the given flow already rings. available is false for a user who can no longer receive calls. Null when users are not offered: a call-alert flow, a viewer who may not list users, or a plan without Softphone and a flow that rings no user the viewer may list.",
            "items": {
              "type": "object",
              "required": [
                "id",
                "name",
                "email",
                "available"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string",
                  "nullable": true
                },
                "email": {
                  "type": "string"
                },
                "available": {
                  "type": "boolean"
                }
              }
            },
            "nullable": true
          },
          "unavailable_softphone_user_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "When softphone_users is null, or the viewer may list only the project’s users, the users the given flow rings who cannot receive calls and are not in softphone_users, by public id, so the flow can be saved as a draft instead of being refused when it asks to go live. Empty otherwise."
          },
          "softphone_plan_included": {
            "type": "boolean",
            "description": "False when the organization’s plan does not include Softphone: the users a telephony flow rings cannot receive calls until it does, whatever their access."
          },
          "authoring_context": {
            "type": "object",
            "properties": {
              "definition_version": {
                "type": "integer",
                "enum": [
                  1
                ]
              },
              "project": {
                "type": "object",
                "properties": {
                  "project_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "destinations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "number": {
                      "type": "string"
                    },
                    "display_number": {
                      "type": "string",
                      "nullable": true
                    },
                    "name": {
                      "type": "string",
                      "nullable": true
                    },
                    "verified": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  }
                }
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "action": {
                      "type": "string"
                    },
                    "available": {
                      "type": "boolean"
                    },
                    "required_feature": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              },
              "tts_languages": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "voices": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "geographic": {
                "type": "object",
                "properties": {
                  "caller_match_types": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "states": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "prefixes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "media": {
                "type": "object",
                "description": "greetings, whispers, voicemails and surveys arrays. Each choice contains media_ref, name and scope (organization/project). Provider filenames are not included."
              },
              "keypad": {
                "type": "object",
                "description": "Keypad match types and value limits a definition can use. A digits match lists the values of one branch: each a key (0-9, *, #) or a code of 2 to max_value_length digits, for example a postal code. A value belongs to one branch of a caller. A menu whose longest value is one key takes one key press; a longer one collects up to that many digits and needs a keypad other path (No match / No input) to publish.",
                "properties": {
                  "match_types": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "all",
                        "digits",
                        "other"
                      ]
                    }
                  },
                  "max_value_length": {
                    "type": "integer",
                    "description": "Most digits one value holds."
                  },
                  "max_packed_length": {
                    "type": "integer",
                    "description": "Most characters one branch stores for its values joined with commas."
                  },
                  "max_branches": {
                    "type": "integer",
                    "description": "Most keypad branches one caller menu holds, the other path not counted."
                  }
                }
              },
              "defaults": {
                "type": "object",
                "description": "Existing call-start, caller-ID, recording, matching, lookback, greeting and ring-time defaults."
              }
            }
          }
        }
      },
      "CallFlow": {
        "title": "Call flow",
        "type": "object",
        "required": [
          "id",
          "name",
          "project_id",
          "status"
        ],
        "description": "Shared list/detail call-flow resource. Only identity, name, project_id and status are returned by default. Optional objects require include.",
        "properties": {
          "configuration": {
            "$ref": "#/components/schemas/CallFlowConfiguration"
          },
          "id": {
            "type": "string",
            "description": "Call flow ID (UUIDv7). Stable across updates.",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Name of the selected version of the call flow.",
            "example": "Sales IVR",
            "nullable": true
          },
          "project_id": {
            "type": "string",
            "description": "Owning project ID (UUIDv7).",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "description": "Publication state: published is live; draft has never been published; pending_changes has a live version and unpublished edits. action=get_latest_valid returns published.",
            "enum": [
              "published",
              "draft",
              "pending_changes"
            ]
          },
          "flow": {
            "type": "object",
            "description": "Included with include=flow. Existing routing tree, keyed by geography, keypad choice, weekday and time window. Global settings are returned separately under settings. Nested routing values retain their existing format.",
            "nullable": true
          },
          "flow_steps": {
            "type": "array",
            "description": "Included with include=flow_steps. Persisted call-flow rows in the flat create/update payload shape. Use this when a client needs to round-trip the write representation; include=flow remains the routing tree used by the editor.",
            "items": {
              "$ref": "#/components/schemas/CallFlowStep"
            }
          },
          "flow_type": {
            "type": "string",
            "description": "Included with include=flow_type. Persisted flow family.",
            "enum": [
              "telephony",
              "callalerts"
            ]
          },
          "is_draft": {
            "type": "boolean",
            "description": "Included with include=is_draft. True when the selected version is draft or pending changes; false for a published version."
          },
          "settings": {
            "type": "object",
            "description": "Included with include=settings or a settings child path.",
            "properties": {
              "recording": {
                "type": "object",
                "description": "Call recording settings.",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Whether call recording is enabled."
                  },
                  "pause_key": {
                    "type": "string",
                    "description": "Keypad key that pauses recording; null when unset.",
                    "nullable": true
                  },
                  "stop_key": {
                    "type": "string",
                    "description": "Keypad key that stops recording; null when unset.",
                    "nullable": true
                  }
                }
              },
              "caller_id_masking_enabled": {
                "type": "boolean",
                "description": "Whether caller-ID masking is enabled."
              },
              "caller_id_masking_mode": {
                "type": "string",
                "description": "Which caller ID is presented when masking is enabled; null when disabled.",
                "enum": [
                  "show_tracking_number",
                  "show_anonymous",
                  "show_destination"
                ],
                "nullable": true
              },
              "call_event_timing": {
                "type": "string",
                "description": "When the call event is raised.",
                "enum": [
                  "started",
                  "answered"
                ]
              },
              "early_media_enabled": {
                "type": "boolean",
                "description": "Whether early media is enabled."
              },
              "bypass_media_enabled": {
                "type": "boolean",
                "description": "Whether media bypass is enabled: audio on Dial, Weighted and Round robin steps flows directly between carriers, and digits pressed are not captured for those calls."
              }
            }
          },
          "features": {
            "type": "object",
            "description": "Included with include=features or a features child path. Indicates features used by the selected version.",
            "properties": {
              "has_geo": {
                "type": "boolean",
                "description": "Routes by caller geography."
              },
              "has_greeting": {
                "type": "boolean",
                "description": "Plays a greeting."
              },
              "has_keypad": {
                "type": "boolean",
                "description": "Branches on keypad input."
              },
              "has_days_of_week": {
                "type": "boolean",
                "description": "Routes by day of week."
              },
              "has_times": {
                "type": "boolean",
                "description": "Routes by time of day."
              },
              "has_dial": {
                "type": "boolean",
                "description": "Dials a single destination."
              },
              "has_multiple": {
                "type": "boolean",
                "description": "Rings several destinations at once."
              },
              "has_priority": {
                "type": "boolean",
                "description": "Rings destinations sequentially."
              },
              "has_weighted": {
                "type": "boolean",
                "description": "Distributes calls by weight."
              },
              "has_round_robin": {
                "type": "boolean",
                "description": "Uses round-robin routing."
              },
              "has_hangup": {
                "type": "boolean",
                "description": "Contains a hang-up branch."
              },
              "has_voicemail": {
                "type": "boolean",
                "description": "Uses voicemail."
              },
              "has_whisper": {
                "type": "boolean",
                "description": "Uses tracking-number whisper audio."
              },
              "has_survey": {
                "type": "boolean",
                "description": "Plays a post-call survey."
              },
              "has_receive_sms": {
                "type": "boolean",
                "description": "Forwards SMS received by the tracking number to a dial destination."
              },
              "has_sticky_destinations": {
                "type": "boolean",
                "description": "Routes repeat callers to the destination that answered them within the look-back period."
              }
            }
          },
          "capabilities": {
            "type": "object",
            "description": "Included with include=capabilities or capabilities.can_delete.",
            "properties": {
              "can_delete": {
                "type": "boolean",
                "description": "Whether no active tracking numbers are assigned to the flow."
              }
            }
          },
          "summary": {
            "type": "object",
            "description": "Included with include=summary or summary.tracking_number_count.",
            "properties": {
              "tracking_number_count": {
                "type": "integer",
                "description": "Number of distinct active tracking numbers assigned to this flow in its project.",
                "example": 1
              }
            }
          },
          "meta": {
            "type": "object",
            "description": "Included with include=meta or meta.updated_at.",
            "properties": {
              "updated_at": {
                "type": "string",
                "description": "Latest step update in the selected version, in UTC.",
                "format": "date-time",
                "nullable": true
              }
            }
          },
          "validation": {
            "type": "object",
            "description": "Included with include=validation or a validation child path. Checks compatibility with the organization’s international-routing restrictions and assigned tracking numbers, and whether each destination is verified; this is not a live reachability check. The shape is the same for draft and published versions.",
            "properties": {
              "unreachable_destinations": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Destination phone numbers incompatible with the current routing restrictions. Empty when none are incompatible."
              },
              "has_unreachable_destinations": {
                "type": "boolean",
                "description": "Whether unreachable_destinations contains any entries."
              },
              "unverified_destinations": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Destination phone numbers in the call flow that have not been verified yet. Empty when every destination is verified."
              },
              "has_unverified_destinations": {
                "type": "boolean",
                "description": "Whether unverified_destinations contains any entries."
              },
              "has_unverified_published_destinations": {
                "type": "boolean",
                "description": "Whether the published version routes to an unverified destination, independent of pending draft changes."
              }
            }
          }
        }
      },
      "CallFlowListResponse": {
        "title": "Call flow list response",
        "type": "object",
        "required": [
          "items",
          "page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CallFlow"
            }
          },
          "page": {
            "$ref": "#/components/schemas/CursorPage"
          }
        }
      },
      "CallFlowStep": {
        "title": "Call flow step",
        "type": "object",
        "required": [
          "destination_number"
        ],
        "description": "One row of a call flow. A flow is a flat list of these: each row is a single geo / keypad / weekday / time-window / destination combination, and rows sharing the first four values form one branch.",
        "properties": {
          "destination_number": {
            "type": "string",
            "description": "What this row rings: a destination phone number, the literal hangup or voicemail to terminate the branch, or user:<user public id> to ring that user's softphone. A number must already exist as a destination in the project. A user must belong to the organization; a flow goes live only when every user it rings has softphone access to the project, has opened the softphone once and the plan includes Softphone, while a draft may keep a user who no longer can. Users are not available on call-alert flows and never forward SMS. A user who has left the organization reads back as an empty value, to be replaced or removed before the flow goes live.",
            "example": "15551234567"
          },
          "geo_prefix": {
            "type": "string",
            "description": "Caller geography this row applies to: * for all callers, a dialling prefix, a US state name, or anonymous. State names are expanded into their area codes on save.",
            "default": "*"
          },
          "dial_key": {
            "type": "string",
            "description": "Keypad values that select this branch, joined with commas: each a key (0-9, *, #) or a code of 2 to 9 digits, for example 1 or 200,201. @ alone is the branch for remaining keys, unmatched codes and no input. A value belongs to one branch of a caller, and a branch holds at most 2,000 characters. When the longest value of a menu is one key, callers press one key; otherwise they type up to that many digits, the branch holding the longest value the digits start with takes the call, and the menu needs an @ branch to publish. Empty when the flow has no keypad menu.",
            "default": "",
            "example": "1"
          },
          "weekday": {
            "type": "integer",
            "description": "Days this row applies to, encoded as the product of the active day primes (mon 2, tue 3, wed 5, thu 7, fri 11, sat 13, sun 17). 510510 is every day.",
            "default": 510510
          },
          "hour_from": {
            "type": "string",
            "description": "Start of the time window, in the project time zone. The defaults 08:00:00 to 07:59:59 mean no time restriction.",
            "default": "08:00:00"
          },
          "hour_to": {
            "type": "string",
            "description": "End of the time window, in the project time zone.",
            "default": "07:59:59"
          },
          "call_type": {
            "type": "integer",
            "format": "int32",
            "description": "How the destinations in this branch are rung: 1 dial a single destination, 2 ring several at once, 3 ring sequentially by priority, 5 distribute by weight, 6 take turns, one destination per call in order (round robin). Round robin is not available on call-alert flows.",
            "enum": [
              1,
              2,
              3,
              5,
              6
            ],
            "default": 1
          },
          "priority": {
            "type": "integer",
            "description": "Ring order within the branch when call_type is 3, and the turn order when call_type is 6. For round robin the server numbers the rows of the branch in the order they are listed, so a value sent is ignored.",
            "default": 1
          },
          "weight": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "Percentage of calls sent to this destination. Required when call_type is 5; timer cannot supply the weight. Returned as 0 for other routing types."
          },
          "timer": {
            "type": "integer",
            "description": "Seconds to ring this destination before moving on. Ignored on input and returned as 0 for weighted routing (call_type 5), whose percentage is set with weight, and for round-robin routing (call_type 6)."
          },
          "record": {
            "type": "integer",
            "format": "int32",
            "description": "Enable call recording. Read from the first row of the flow.",
            "enum": [
              0,
              1
            ],
            "default": 0
          },
          "record_stop_key": {
            "type": "string",
            "description": "Keypad digit that stops recording. One of 0-9, * or #, otherwise null."
          },
          "record_pause_key": {
            "type": "string",
            "description": "Keypad digit that pauses recording. One of 0-9, * or #, otherwise null."
          },
          "greeting_settings": {
            "type": "object",
            "description": "Greeting played for this branch, or null. `{type:\"text_to_speech\", language, gender, message}` or `{type:\"audio\", file, playback:\"then_ring\"|\"ringback_loop\"}`, each with an optional `answer_delay` (0.5-30 seconds of ringing, in 0.5 steps, before the flow answers).",
            "nullable": true
          },
          "mask_cid": {
            "type": "integer",
            "format": "int32",
            "description": "Enable caller-ID masking. Read from the first row of the flow.",
            "enum": [
              0,
              1
            ]
          },
          "call_start_event": {
            "type": "integer",
            "format": "int32",
            "description": "Raise the call event at ring time rather than at answer. Read from the first row.",
            "enum": [
              0,
              1
            ]
          },
          "early_media": {
            "type": "integer",
            "format": "int32",
            "description": "Enable early media. Read from the first row of the flow.",
            "enum": [
              0,
              1
            ]
          },
          "bypass_media": {
            "type": "integer",
            "format": "int32",
            "description": "Send audio on Dial, Weighted and Round robin steps directly between carriers. Digits pressed are not captured for those calls. Has no effect on a step with recording, whisper, greeting, keypad, survey or voicemail, or with early media. Read from the first row of the flow.",
            "enum": [
              0,
              1
            ]
          },
          "look_back": {
            "type": "integer",
            "format": "int32",
            "description": "Route repeat callers back to the agent who last handled them.",
            "enum": [
              0,
              1
            ]
          },
          "look_back_days": {
            "type": "integer",
            "description": "How far back to look for a previous handler when look_back is enabled.",
            "default": 60
          },
          "vm": {
            "type": "integer",
            "format": "int32",
            "description": "Voicemail box for unanswered calls on this branch, or -1 for no voicemail."
          },
          "vm_timeout": {
            "type": "integer",
            "description": "Seconds to wait before sending the call to voicemail.",
            "default": 30
          },
          "vm_instructions": {
            "type": "integer",
            "format": "int32",
            "description": "Play the recorded voicemail instructions before the beep.",
            "enum": [
              0,
              1
            ]
          },
          "whisper_settings": {
            "type": "object",
            "description": "Whisper configuration for this branch, or null when disabled. Preserve this complete object when saving returned flow_steps.",
            "required": [
              "mode",
              "type"
            ],
            "properties": {
              "mode": {
                "type": "integer",
                "enum": [
                  1,
                  2,
                  3
                ],
                "description": "1 plays then connects, 2 repeats until the agent presses a key, 3 connects immediately and plays in the background."
              },
              "type": {
                "type": "string",
                "enum": [
                  "tracking_number_whisper",
                  "text_to_speech"
                ]
              },
              "delay": {
                "type": "number",
                "description": "Seconds after the agent answers before playback."
              },
              "message": {
                "type": "string",
                "description": "Text to speak, or a stored audio reference when legacy_raw is true."
              },
              "language": {
                "type": "string",
                "example": "en-US"
              },
              "gender": {
                "type": "string",
                "enum": [
                  "f",
                  "m"
                ]
              },
              "legacy_raw": {
                "type": "boolean",
                "description": "Preserve when returned: message contains a stored audio reference."
              }
            },
            "nullable": true
          },
          "media_refs": {
            "type": "object",
            "description": "Optional opaque references from authoring_context.media for creation or updates. Each reference replaces the corresponding filename/index in this row after project, scope, type and existence checks. Existing editor fields remain supported. Omitted from the saved response.",
            "additionalProperties": false,
            "properties": {
              "greeting": {
                "type": "string"
              },
              "whisper": {
                "type": "string"
              },
              "voicemail": {
                "type": "string"
              },
              "survey": {
                "type": "string"
              }
            }
          },
          "survey_filename": {
            "type": "string",
            "description": "Stored filename of the post-call survey recording."
          },
          "receive_sms": {
            "type": "integer",
            "format": "int32",
            "description": "Forward inbound SMS for this branch to the destination. Setting it for a destination the call flow does not already forward to requires the outbound SMS plan feature, and forwards stop while the plan does not include it. Always saved as 0 on a row that rings a user.",
            "enum": [
              0,
              1
            ]
          }
        }
      },
      "SaveCallFlowRequest": {
        "title": "Create or update call flow request",
        "type": "object",
        "required": [
          "flow"
        ],
        "description": "Body for both create and update. An update replaces the whole flow.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Call-flow display name. May be omitted or empty only when the flow is stored as a draft.",
            "example": "Sales IVR"
          },
          "flow": {
            "type": "array",
            "description": "The flow steps. Must contain at least one row. May also be supplied as a JSON-encoded string of the same array.",
            "items": {
              "$ref": "#/components/schemas/CallFlowStep"
            }
          },
          "flow_type": {
            "type": "string",
            "description": "Flow family. Defaults to telephony.",
            "enum": [
              "telephony",
              "callalerts"
            ],
            "default": "telephony"
          },
          "is_draft": {
            "type": "boolean",
            "description": "Store the flow without publishing it. A flow with unreachable or unverified destinations is stored as a draft regardless of this value. When unverified destinations are all that keep a publish from going through, the flow is published once they are verified.",
            "default": false
          },
          "checkAnumMatching": {
            "type": "boolean",
            "description": "After saving, assign the flow to any tracking numbers that were waiting on it as a draft assignment.",
            "default": false
          }
        }
      },
      "CallFlowWriteResponse": {
        "title": "Call flow write response",
        "type": "object",
        "required": [
          "id",
          "name",
          "project_id",
          "status",
          "flow",
          "flow_type",
          "is_draft"
        ],
        "description": "Persisted write shape. It returns the submitted call-flow fields together with server-owned id, project_id and status. It intentionally does not include GET-only expansions.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Call flow ID (UUIDv7). Stable across updates.",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Name of the persisted call flow.",
            "example": "Sales IVR",
            "nullable": true
          },
          "project_id": {
            "type": "string",
            "description": "Owning project ID (UUIDv7).",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "description": "Publication state after the write. An incompatible destination causes draft.",
            "enum": [
              "published",
              "draft"
            ]
          },
          "flow": {
            "type": "array",
            "description": "Submitted flow steps, in the same flat list shape as the request body.",
            "items": {
              "$ref": "#/components/schemas/CallFlowStep"
            }
          },
          "flow_type": {
            "type": "string",
            "description": "Persisted flow family.",
            "enum": [
              "telephony",
              "callalerts"
            ]
          },
          "is_draft": {
            "type": "boolean",
            "description": "Whether the persisted flow is a draft. It can be true even when false was submitted, when destination compatibility or unverified destinations require a draft."
          }
        }
      },
      "TrackingSource": {
        "title": "Tracking source",
        "type": "object",
        "required": [
          "id",
          "name",
          "type",
          "project_id",
          "matching"
        ],
        "description": "The same source resource is used for list, detail and create responses. Source names belong here; project names belong to the project resource.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Tracking source ID (UUIDv7). Null only for a synthetic, unaddressable collection entry for a deleted source.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Canonical source display name. Generated by the server for parameter-derived types.",
            "example": "Direct"
          },
          "type": {
            "type": "string",
            "description": "Source type in lowercase snake_case, such as direct, paid, organic, or custom.",
            "example": "direct"
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID (UUIDv7) of the owning project, or null for a shared catalogue source.",
            "nullable": true
          },
          "matching": {
            "type": "object",
            "required": [
              "parameters",
              "syntax"
            ],
            "properties": {
              "parameters": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Matching configuration as a JSON object. Null for shared catalogue sources and types without configured parameters.",
                "example": {
                  "utm_source": "google",
                  "utm_medium": "cpc"
                },
                "nullable": true
              },
              "syntax": {
                "type": "string",
                "enum": [
                  "legacy",
                  "wildcard"
                ],
                "description": "How custom and email parameter values match. wildcard: a plain value matches exactly and * matches any characters, so brand* starts with, *brand ends with and *brand* contains; a leading ! excludes instead, so !brand* skips visits whose value starts with brand (the source needs at least one value without !, and referrer cannot be excluded). legacy: a plain value matches as starts with and ! is an ordinary character. Matching ignores case. Other types are always legacy.",
                "example": "wildcard"
              }
            }
          },
          "summary": {
            "type": "object",
            "description": "Include-only usage summary.",
            "properties": {
              "tracking_number_count": {
                "type": "integer",
                "description": "Number of tracking numbers in the requested project assigned to this source. Requires include=summary or include=summary.tracking_number_count.",
                "example": 0
              }
            }
          },
          "meta": {
            "type": "object",
            "description": "Include-only meta.",
            "properties": {
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Last update timestamp in UTC. Requires include=meta or include=meta.updated_at.",
                "nullable": true
              }
            }
          }
        }
      },
      "TrackingSourceListResponse": {
        "title": "Tracking source list response",
        "type": "object",
        "required": [
          "items",
          "page",
          "no_dni_sources"
        ],
        "properties": {
          "configuration": {
            "$ref": "#/components/schemas/TrackingSourceConfiguration"
          },
          "items": {
            "type": "array",
            "description": "Base-catalogue sources and project sources in this page.",
            "items": {
              "$ref": "#/components/schemas/TrackingSource"
            }
          },
          "page": {
            "$ref": "#/components/schemas/CursorPage"
          },
          "no_dni_sources": {
            "type": "array",
            "description": "Lowercase source types that do not support dynamic number insertion, matching each source’s type field.",
            "items": {
              "type": "string"
            }
          },
          "reserved_parameters": {
            "type": "array",
            "description": "Returned by include=parameters. Parameter names that cannot be registered as custom tracking parameters, in any letter case.",
            "items": {
              "type": "string"
            }
          },
          "parameters": {
            "type": "array",
            "description": "Returned by include=parameters. Custom tracking parameters defined for the project. These still carry their own numeric id.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "workflows": {
                  "type": "array",
                  "description": "Returned by include=parameters.usage.",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowUsageReference"
                  }
                }
              }
            }
          }
        }
      },
      "WorkflowUsageReference": {
        "type": "object",
        "required": [
          "id",
          "name",
          "is_active"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The workflow public id."
          },
          "name": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          }
        }
      },
      "TrackingSourceConfiguration": {
        "type": "object",
        "description": "Optional full configuration, outside items pagination. Requires include=configuration and TrackingSourceRead. Includes public UUIDs for shared updates, numeric references for copying; base resource IDs remain UUIDs. Sources are ordered by owner, name and numeric ID. Includes stored system defaults and project-owned sources, without synthetic deleted-source entries. Leaves out the base CUSTOM row, the template for custom sources.",
        "required": [
          "sources",
          "custom_parameters",
          "reserved_parameter_names"
        ],
        "properties": {
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "source_id",
                "public_id",
                "source_type",
                "name",
                "match_conditions",
                "match_syntax",
                "ownership",
                "editable",
                "used_by_tracking_numbers",
                "updated_at"
              ],
              "properties": {
                "public_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Tracking source UUID used by shared resource routes."
                },
                "source_id": {
                  "type": "integer",
                  "description": "Numeric reference accepted by MCP adapters; shared resource routes use public_id."
                },
                "source_type": {
                  "type": "string",
                  "description": "Stored uppercase type. Readable types are broader than supported configuration write types."
                },
                "name": {
                  "type": "string",
                  "nullable": true
                },
                "match_conditions": {
                  "description": "Canonical condition-name/value map. The retained configuration format serializes an empty map as [].",
                  "additionalProperties": {
                    "type": "string"
                  }
                },
                "match_syntax": {
                  "type": "string",
                  "enum": [
                    "legacy",
                    "wildcard"
                  ]
                },
                "ownership": {
                  "type": "string",
                  "enum": [
                    "system_default",
                    "project"
                  ]
                },
                "editable": {
                  "type": "boolean"
                },
                "used_by_tracking_numbers": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Usage in this project only, using the stored source identifier."
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                }
              }
            }
          },
          "custom_parameters": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "custom_parameter_id",
                "name",
                "updated_at"
              ],
              "properties": {
                "custom_parameter_id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                }
              }
            }
          },
          "reserved_parameter_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Parameter names that cannot be registered as custom tracking parameters, in any letter case; the same list as reserved_parameters."
          }
        }
      },
      "CreateTrackingSourceRequest": {
        "title": "Create tracking source request",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Source type to create, as returned in `type` by the collection endpoint. Case-insensitive.",
            "example": "custom"
          },
          "name": {
            "type": "string",
            "description": "Display name. Required for the types that do not derive one from their parameters (custom, email and the offline types); ignored otherwise. Cannot contain `{`, `}`, `%`, `*` or an HTML tag (`<` followed by a letter, `/`, `!` or `?`) (NameContainsDisallowedCharacters, 400000155).",
            "example": "Spring newsletter"
          },
          "parameters": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "URL parameters that identify the source, keyed by parameter name. Which keys apply depends on the type. With wildcard match_syntax a value starting with ! excludes visits carrying it instead of matching them. Returned on reads as matching.parameters.",
            "example": {
              "utm_medium": "cpc*",
              "utm_campaign": "!brand_search"
            }
          },
          "match_syntax": {
            "type": "string",
            "enum": [
              "legacy",
              "wildcard"
            ],
            "description": "How custom and email parameter values match, returned on reads as matching.syntax. Defaults to legacy. Ignored for other types.",
            "example": "wildcard"
          }
        }
      },
      "CreateTrackingSourceResponse": {
        "title": "Create tracking source response",
        "type": "object",
        "required": [
          "source"
        ],
        "properties": {
          "source": {
            "$ref": "#/components/schemas/TrackingSource"
          }
        }
      },
      "UpdateTrackingSourceRequest": {
        "title": "Update tracking source request",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Must match the source’s current type, as returned in `type` by the collection endpoint. Case-insensitive. A source’s type cannot be changed after creation.",
            "example": "custom"
          },
          "name": {
            "type": "string",
            "description": "New display name, for the types that carry a caller-supplied name. Cannot contain `{`, `}`, `%`, `*` or an HTML tag (`<` followed by a letter, `/`, `!` or `?`) (NameContainsDisallowedCharacters, 400000155).",
            "example": "Summer newsletter"
          },
          "parameters": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Replacement URL parameters that identify the source. Returned on reads as matching.parameters.",
            "example": {
              "utm_source": "newsletter",
              "utm_medium": "email"
            }
          },
          "match_syntax": {
            "type": "string",
            "enum": [
              "legacy",
              "wildcard"
            ],
            "description": "Switches a custom or email source to wildcard matching. Omitted: the source keeps its current syntax. Parameters not sent keep their meaning. A wildcard source cannot switch back to legacy.",
            "example": "wildcard"
          }
        }
      },
      "TagSetupTag": {
        "type": "object",
        "required": [
          "id",
          "name",
          "category_id",
          "active"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Legacy numeric tag reference."
          },
          "public_id": {
            "type": "string",
            "format": "uuid",
            "description": "The public tag id, as a TagInUse refusal lists it in tag_ids."
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "background_tint": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "category_id": {
            "type": "integer",
            "format": "int64"
          },
          "active": {
            "type": "integer",
            "enum": [
              0,
              1
            ]
          },
          "customer_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "source": {
            "type": "string",
            "enum": [
              "manual",
              "workflow_ai",
              "ai_suggestion",
              "default"
            ],
            "description": "How the tag was created. Null for tags created before sources were recorded. On save, only ai_suggestion is honored for a new tag; any other value creates a manual tag.",
            "nullable": true
          }
        }
      },
      "TagSetupCategory": {
        "type": "object",
        "required": [
          "id",
          "description"
        ],
        "properties": {
          "id": {
            "description": "Existing numeric category reference, or an unsaved setup-page category identifier."
          },
          "description": {
            "type": "string"
          },
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        }
      },
      "TagSetupConfiguration": {
        "type": "object",
        "required": [
          "tags",
          "categories",
          "appDefaultTags"
        ],
        "properties": {
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TagSetupTag"
            }
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TagSetupCategory"
            }
          },
          "appDefaultTags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TagSetupTag"
            }
          },
          "configuration": {
            "$ref": "#/components/schemas/TagConfigurationSnapshot"
          },
          "workflow_usage": {
            "type": "object",
            "description": "Returned by include=workflow_usage. Keyed by numeric tag id, for the listed tags a workflow names.",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/WorkflowUsageReference"
              }
            }
          }
        }
      },
      "CopyTagSetupRequest": {
        "type": "object",
        "required": [
          "brands",
          "tagConfig",
          "tagCategories"
        ],
        "properties": {
          "brands": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Target project UUIDs in the route organization."
          },
          "tagConfig": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TagSetupTag"
            }
          },
          "tagCategories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TagSetupCategory"
            }
          },
          "copyOnlyNew": {
            "type": "boolean",
            "default": false,
            "description": "True adds missing tags and reactivates matches. False/omitted replaces the target configuration and can remove tags/categories."
          }
        }
      },
      "ReorderSurveyTagsRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "tag_ids"
        ],
        "properties": {
          "tag_ids": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "description": "Complete desired survey order. UUIDv7 strings and positive numeric tag IDs may be mixed; two references to the same tag are rejected. Numeric strings are accepted for compatibility. Swagger 2 cannot express the mixed item types.",
            "items": {
              "description": "A tag UUIDv7 string or positive numeric tag ID."
            }
          }
        }
      },
      "TagConfigurationSnapshot": {
        "type": "object",
        "required": [
          "tags",
          "tag_categories",
          "survey_tag_ids"
        ],
        "properties": {
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TagConfigurationTag"
            }
          },
          "tag_categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TagConfigurationCategory"
            }
          },
          "survey_tag_ids": {
            "type": "array",
            "description": "Effective survey order using numeric tag IDs, including any newly copied defaults.",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          }
        }
      },
      "TagConfigurationTag": {
        "type": "object",
        "required": [
          "tag_id",
          "public_id",
          "name",
          "description",
          "color",
          "category_id",
          "category_public_id",
          "category_name",
          "active",
          "ownership",
          "editable",
          "can_materialize",
          "survey_dial_key",
          "source"
        ],
        "properties": {
          "tag_id": {
            "type": "integer",
            "format": "int64",
            "description": "Existing numeric analytics/workflow reference."
          },
          "public_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "category_id": {
            "type": "integer",
            "format": "int64"
          },
          "category_public_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "category_name": {
            "type": "string",
            "nullable": true
          },
          "active": {
            "type": "boolean"
          },
          "ownership": {
            "type": "string",
            "enum": [
              "project",
              "organization_default",
              "system_default"
            ]
          },
          "editable": {
            "type": "boolean"
          },
          "can_materialize": {
            "type": "boolean"
          },
          "survey_dial_key": {
            "type": "integer",
            "nullable": true
          },
          "source": {
            "type": "string",
            "enum": [
              "manual",
              "workflow_ai",
              "ai_suggestion",
              "default"
            ],
            "description": "How the tag was created. Null for tags created before sources were recorded.",
            "nullable": true
          }
        }
      },
      "TagConfigurationCategory": {
        "type": "object",
        "required": [
          "tag_category_id",
          "public_id",
          "name",
          "ownership",
          "editable"
        ],
        "properties": {
          "tag_category_id": {
            "type": "integer",
            "format": "int64"
          },
          "public_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "ownership": {
            "type": "string",
            "enum": [
              "project",
              "organization_default",
              "system_default"
            ]
          },
          "editable": {
            "type": "boolean"
          }
        }
      },
      "TagCategory": {
        "title": "Tag category",
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Tag category ID (UUIDv7)."
          },
          "name": {
            "type": "string",
            "maxLength": 40
          }
        }
      },
      "TagCategoryListResponse": {
        "title": "Tag category list response",
        "type": "object",
        "required": [
          "items",
          "page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TagCategory"
            }
          },
          "page": {
            "$ref": "#/components/schemas/CursorPage"
          }
        }
      },
      "WriteTagCategoryRequest": {
        "title": "Create or update tag category request",
        "description": "The category name used when creating or updating a tag category.",
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 40,
            "description": "Cannot contain `{`, `}`, `%`, `*` or an HTML tag (`<` followed by a letter, `/`, `!` or `?`) (NameContainsDisallowedCharacters, 400000155)."
          }
        }
      },
      "Tag": {
        "title": "Tag",
        "type": "object",
        "required": [
          "id",
          "name",
          "background_tint"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Tag ID (UUIDv7)."
          },
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "description": "Optional context describing when the tag applies.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$",
            "description": "Optional six-digit hexadecimal color.",
            "nullable": true
          },
          "background_tint": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "survey_dial_key": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9,
            "description": "Dial key for a priority tag when one is assigned."
          }
        }
      },
      "TagListResponse": {
        "title": "Tag list response",
        "type": "object",
        "required": [
          "items",
          "page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          },
          "page": {
            "$ref": "#/components/schemas/CursorPage"
          }
        }
      },
      "CreateTagRequest": {
        "title": "Create tag request",
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Cannot contain `{`, `}`, `%` or an HTML tag (`<` followed by a letter, `/`, `!` or `?`) (NameContainsDisallowedCharacters, 400000155)."
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "color": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$",
            "nullable": true
          },
          "background_tint": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "default": 12
          }
        }
      },
      "UpdateTagRequest": {
        "title": "Update tag request",
        "type": "object",
        "minProperties": 1,
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Cannot contain `{`, `}`, `%` or an HTML tag (`<` followed by a letter, `/`, `!` or `?`) (NameContainsDisallowedCharacters, 400000155)."
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "color": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$",
            "nullable": true
          },
          "background_tint": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          }
        }
      },
      "FormSubmissionsResponse": {
        "title": "Form submission list response",
        "type": "object",
        "required": [
          "items",
          "page",
          "is_dummy"
        ],
        "properties": {
          "headers": {
            "type": "array",
            "description": "Returned by include=headers. Column descriptors in display order. One selected form: that form’s own fields plus the common columns. Several forms, or no `form_ids`: a Form column (and a Project column on organization-wide reads), the common columns and the project’s custom tracking parameters. Both also list the project’s custom fields (hidden until picked), with `field_attributes: custom_property`, `key` (the field key, as in each row’s `custom_fields`), `field_type`, list `options` and `options_by_project` (options keyed by project UUIDv7), and `project_ids` (the projects whose field the column shows).",
            "items": {
              "type": "object"
            }
          },
          "items": {
            "type": "array",
            "description": "Submission rows. `id` is the submission ID (UUIDv7); sample-mode rows carry fixture IDs. Project references and tag IDs also use UUIDv7.",
            "items": {
              "type": "object"
            }
          },
          "page": {
            "$ref": "#/components/schemas/CursorPage"
          },
          "is_dummy": {
            "type": "boolean",
            "description": "True when the rows are the sample dataset rather than the project’s own submissions."
          }
        }
      },
      "FormSubmission": {
        "title": "Form submission",
        "type": "object",
        "description": "One submission row, the same shape as an element of the submissions list `items`. `id` is the submission ID (UUIDv7); sample-mode rows carry fixture IDs. `form_id` names the owning form by UUIDv7, `org_id` and `project_id` name the owning organization and project by UUIDv7, tag references are UUIDv7, and each submitted field value appears as its own property keyed as the list headers describe. `custom_fields` holds the values of the project’s custom fields, keyed by custom field id (`cpf_...`); it is an empty object when none are set. `lead_id` is the id (UUIDv7) of the lead the submission belongs to, the leadId of the lead endpoints, or null while the submission has no lead."
      },
      "FormSubmissionCountResponse": {
        "title": "Form submission count response",
        "type": "object",
        "description": "Submission count for the same filters as the list. `totalRows` is the camelCase name the forms UI and the calls count already use.",
        "required": [
          "totalRows",
          "is_dummy"
        ],
        "properties": {
          "totalRows": {
            "type": "integer",
            "description": "Number of matching form submissions."
          },
          "is_dummy": {
            "type": "boolean",
            "description": "True when the count is over the sample dataset rather than real submissions."
          }
        }
      },
      "SmsMessagesResponse": {
        "title": "SMS message list response",
        "type": "object",
        "required": [
          "items",
          "date_range",
          "time_zone",
          "page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmsMessage"
            }
          },
          "date_range": {
            "type": "object",
            "description": "The effective inclusive day range after defaults.",
            "required": [
              "from",
              "to"
            ],
            "properties": {
              "from": {
                "type": "string",
                "format": "date"
              },
              "to": {
                "type": "string",
                "format": "date"
              }
            }
          },
          "time_zone": {
            "type": "string",
            "description": "IANA time zone in which date_from, date_to, and date_range are interpreted: the project’s configured time zone, falling back to the organization’s default and then UTC. Use it to choose date_from and date_to."
          },
          "page": {
            "$ref": "#/components/schemas/CursorPage"
          }
        }
      },
      "SmsMessage": {
        "title": "SMS message",
        "description": "An outbound message’s occurred_at can change when its delivery status updates, so clients that sync should deduplicate by id.",
        "type": "object",
        "required": [
          "id",
          "occurred_at",
          "direction",
          "from",
          "to",
          "tracking_number",
          "status",
          "status_detail",
          "content",
          "forward"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Message ID. UUIDv7 for a stored message, UUIDv5 for a message held only by the carrier. Stable across reads."
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "description": "UTC. For outbound messages, the time of the most recent delivery status update."
          },
          "direction": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ]
          },
          "from": {
            "type": "string",
            "description": "Sender. Inbound: the other party; outbound: the tracking number. E.164 for phone numbers, as received for short codes and alphanumeric sender IDs. Null when the carrier supplied none.",
            "nullable": true
          },
          "to": {
            "type": "string",
            "description": "Recipient. Inbound: the tracking number; outbound: the other party. E.164 for phone numbers, as received for short codes and alphanumeric sender IDs.",
            "nullable": true
          },
          "project": {
            "type": "object",
            "description": "Present only with include=project.",
            "properties": {
              "name": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "tracking_number": {
            "$ref": "#/components/schemas/SmsMessageTrackingNumber"
          },
          "status": {
            "type": "string",
            "enum": [
              "received",
              "pending",
              "sent",
              "delivered",
              "failed",
              "unknown"
            ],
            "description": "Inbound messages are received. Outbound messages are pending, sent, delivered, failed (including carrier error text), or unknown when no status was recorded."
          },
          "status_detail": {
            "type": "string",
            "description": "The carrier’s status text for an outbound message, such as \"Routing error\". Null for inbound messages or when none was recorded.",
            "nullable": true
          },
          "content": {
            "type": "string",
            "description": "The full message body."
          },
          "forward": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SmsMessageForward"
              }
            ],
            "description": "Inbound messages only: the latest automatic forward, when it is linked to this message. Null otherwise.",
            "nullable": true
          }
        }
      },
      "SmsMessageTrackingNumber": {
        "title": "SMS message tracking number",
        "type": "object",
        "required": [
          "id",
          "number",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Tracking number ID (UUIDv7), as used by the Tracking Numbers endpoints. Null when the number is no longer in this project.",
            "nullable": true
          },
          "number": {
            "type": "string",
            "description": "The tracking number, E.164."
          },
          "name": {
            "type": "string",
            "description": "The tracking number’s name. Null when unnamed or no longer in this project.",
            "nullable": true
          }
        }
      },
      "SmsMessageForward": {
        "title": "SMS message forward",
        "type": "object",
        "required": [
          "to",
          "status",
          "status_detail"
        ],
        "properties": {
          "to": {
            "type": "string",
            "description": "The number the message was forwarded to."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "sent",
              "delivered",
              "failed",
              "unknown"
            ]
          },
          "status_detail": {
            "type": "string",
            "description": "The carrier’s status text for the forward.",
            "nullable": true
          }
        }
      },
      "UpdateFormSubmissionRequest": {
        "title": "Update form submission request",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "tags",
              "value"
            ],
            "description": "Which field of the submission is being set."
          },
          "value": {
            "type": "number",
            "description": "Monetary value attributed to the submission. Required when type is value."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Tag IDs (UUIDv7) from tag CRUD. Replaces the complete tag set; an empty array clears it. Required when type is tags."
          }
        }
      },
      "UpdateFormSubmissionCustomFieldsRequest": {
        "title": "Update form submission custom fields request",
        "type": "object",
        "required": [
          "values"
        ],
        "properties": {
          "values": {
            "type": "object",
            "description": "Custom field values keyed by custom field key (for example cpf_deal_size): at least 1 and at most 100 keys. Each value is a string, number, boolean or null; strings are at most 1000 characters. null or an empty string clears the field.",
            "example": {
              "cpf_deal_size": 1200,
              "cpf_stage": "won",
              "cpf_qualified": true
            }
          }
        }
      },
      "UpdateFormSubmissionCustomFieldsResponse": {
        "title": "Update form submission custom fields response",
        "type": "object",
        "required": [
          "custom_fields"
        ],
        "properties": {
          "custom_fields": {
            "type": "object",
            "description": "Every custom field value stored on the submission, keyed by custom field key; an empty object when none are set."
          }
        }
      },
      "UpdateFormDetailsRequest": {
        "title": "Update form details request",
        "type": "object",
        "description": "Send `name`, `excluded_fields`, or both. At least one is required.",
        "properties": {
          "name": {
            "type": "string",
            "description": "New form name. Provide to rename the form."
          },
          "excluded_fields": {
            "type": "string",
            "description": "A JSON-encoded object with `name_list` (exact field names) and `name_rules` (wildcard rules). Provide to replace the excluded-field list; it replaces the `fields.excluded` object of the tracked-form resource."
          }
        }
      },
      "UpdateFormFieldRequest": {
        "title": "Update form field request",
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "New display label for the field addressed by {fieldKey}."
          }
        }
      },
      "CallDetailsResponse": {
        "title": "Call details",
        "type": "object",
        "additionalProperties": true,
        "description": "The inbound call record. Additional call, attribution and custom-field properties retain their existing format.",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "project_name": {
            "type": "string"
          },
          "tracking_num": {
            "type": "string"
          },
          "caller_num": {
            "type": "string",
            "description": "Caller number."
          },
          "caller": {
            "type": "string",
            "x-deprecated": true,
            "description": "Deprecated. Use `caller_num`. Returned until existing clients have moved."
          },
          "call_flow": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "has_recording": {
                "type": "boolean"
              }
            },
            "nullable": true
          }
        }
      },
      "CallActivityResponse": {
        "title": "Call activity",
        "type": "object",
        "additionalProperties": true,
        "description": "Editable call activity and enabled custom fields. Values retain their existing serialization.",
        "properties": {
          "comments": {
            "type": "string",
            "nullable": true
          },
          "rating": {
            "type": "number",
            "nullable": true
          },
          "call_value": {
            "type": "number",
            "nullable": true
          },
          "tag_ids": {
            "type": "string",
            "description": "JSON-encoded array of tag IDs (UUIDv7), retaining the existing activity response format.",
            "nullable": true
          }
        }
      },
      "CallRecordingResponse": {
        "title": "Call recording URL",
        "type": "object",
        "required": [
          "file"
        ],
        "properties": {
          "file": {
            "type": "string",
            "description": "Signed URL for the selected recording or voicemail."
          }
        }
      },
      "CallTranscriptionResponse": {
        "title": "Call transcription",
        "type": "string",
        "description": "JSON-encoded transcript. Parse this string to access its rows.",
        "example": "[{\"source\":\"caller\",\"phrase\":\"Hello\"}]"
      },
      "CallSummaryResponse": {
        "title": "Call summary",
        "description": "When available, an object containing uu_id_a, conversation (speaker/content rows) and summary. An empty array is returned when no transcript is available.",
        "example": {
          "uu_id_a": "call-example",
          "conversation": [
            {
              "speaker": "caller",
              "content": "Hello"
            }
          ],
          "summary": "The caller asked for information."
        }
      },
      "Lead": {
        "title": "Lead",
        "type": "object",
        "required": [
          "id",
          "first_interaction_type",
          "first_interaction_at",
          "last_interaction_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Lead id (UUIDv7).",
            "example": "01920f3e-7c4a-7b2d-9f1e-3a5c8d2e4b6f"
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Most recent phone number in E.164 (a masked caller id is returned as stored).",
            "example": "+31224296553",
            "nullable": true
          },
          "phone_disp": {
            "type": "string",
            "description": "The phone number in the organization’s display format.",
            "example": "+31 22 429 6553",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "Most recent email. In a timeline, null without ActivityFormsRead.",
            "example": "john@mail.com",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "first_interaction_type": {
            "type": "string",
            "enum": [
              "call_inbound",
              "call_outbound",
              "form"
            ]
          },
          "first_interaction_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_interaction_at": {
            "type": "string",
            "format": "date-time"
          },
          "first_source": {
            "type": "string",
            "nullable": true
          },
          "first_medium": {
            "type": "string",
            "nullable": true
          },
          "first_campaign": {
            "type": "string",
            "nullable": true
          },
          "last_source": {
            "type": "string",
            "nullable": true
          },
          "last_medium": {
            "type": "string",
            "nullable": true
          },
          "last_campaign": {
            "type": "string",
            "nullable": true
          },
          "identifiers": {
            "type": "array",
            "description": "Returned by the single-lead read only. Tracking ids are internal and not listed.",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "phone",
                    "email"
                  ]
                },
                "value": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "LeadListResponse": {
        "title": "Leads",
        "type": "object",
        "required": [
          "items",
          "page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Lead"
            }
          },
          "page": {
            "$ref": "#/components/schemas/CursorPage"
          }
        }
      },
      "LeadTimelineResponse": {
        "title": "Lead timeline",
        "type": "object",
        "required": [
          "lead",
          "pages",
          "calls",
          "forms",
          "page"
        ],
        "properties": {
          "lead": {
            "$ref": "#/components/schemas/Lead"
          },
          "pages": {
            "type": "array",
            "description": "Web page visits of the lead’s browsers, newest first.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "calls": {
            "type": "array",
            "description": "Inbound calls, newest first.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "forms": {
            "type": "array",
            "description": "Form submissions, newest first, shaped like submission list rows.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "page": {
            "$ref": "#/components/schemas/CursorPage"
          }
        }
      },
      "CallReport": {
        "title": "Call activity record",
        "type": "object",
        "description": "A call-report row. The selected report columns add more properties, and so do the call’s own custom values, each as one flat property whose name starts with a prefix that says what it is:\n\n- `cpf_…`: a custom field. The name is the field’s `key` from GET /orgs/{orgId}/projects/{projectId}/fields (for example `cpf_lead_stage`). Inbound and outbound calls.\n- `ctp_…`: a custom tracking parameter, `ctp_` followed by the parameter name set on a tracking source (for example `ctp_campaign_ref`). Inbound calls.\n- `tcv_…`: a tracking cookie, `tcv_` followed by the cookie name the tracking code collects. Inbound calls.\n- `lsv_…`: a local storage value, `lsv_` followed by the local storage key the tracking code collects. Inbound calls.\n\nA property appears only when the call holds a value for it, which can be `null`, so read these keys by prefix rather than expecting a fixed set.",
        "required": [
          "org_id",
          "project_id",
          "call_direction",
          "started_at",
          "start_stamp_utc"
        ],
        "properties": {
          "org_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID (UUIDv7) of the organization that owns the call."
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID (UUIDv7) of the project that owns the call."
          },
          "project_name": {
            "type": "string",
            "description": "Display name of the project."
          },
          "call_direction": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ]
          },
          "uu_id_a": {
            "type": "string",
            "description": "Stable A-leg identifier used to address the call."
          },
          "uu_id_b": {
            "type": "string",
            "description": "B-leg identifier when the call has a destination leg.",
            "nullable": true
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-05T13:30:58Z",
            "description": "Call start as an RFC 3339 UTC instant, to the second. Rows are ordered by it, newest first."
          },
          "start_stamp_utc": {
            "type": "string",
            "x-deprecated": true,
            "example": "2026-10-05 13:30:58",
            "description": "Deprecated. Use `started_at`. The call start in UTC as stored, without a zone. Returned until existing clients have moved."
          },
          "call_date": {
            "type": "string",
            "description": "Call date in the list time_zone, formatted with the project date format."
          },
          "call_time": {
            "type": "string",
            "description": "Call time in the list time_zone, formatted with the project time format."
          },
          "caller_num": {
            "type": "string",
            "description": "Caller number."
          },
          "caller_num_disp": {
            "type": "string",
            "description": "Caller number formatted for display, when the report includes that column."
          },
          "orig_num": {
            "type": "string",
            "x-deprecated": true,
            "description": "Deprecated. Use `caller_num`. Returned until existing clients have moved."
          },
          "tracking_num": {
            "type": "string",
            "description": "Tracking number that received the call."
          },
          "destination_num": {
            "type": "string",
            "description": "Destination number."
          },
          "call_outcome": {
            "type": "string"
          },
          "call_duration": {
            "type": "string",
            "example": "00:01:24",
            "description": "Total duration as HH:MM:SS."
          },
          "recorded": {
            "type": "integer",
            "enum": [
              0,
              1
            ]
          },
          "voicemail": {
            "type": "integer",
            "enum": [
              0,
              1
            ]
          },
          "whisper": {
            "type": "integer",
            "enum": [
              0,
              1
            ]
          },
          "transcription": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "nullable": true
          },
          "lead_id": {
            "type": "string",
            "description": "Id (UUIDv7) of the lead the call belongs to, the leadId of the lead endpoints. null for outbound calls and for calls that are not a lead, `upgrade` when the plan does not include the timeline.",
            "nullable": true
          },
          "transcription_text": {
            "type": "string",
            "description": "Stored text, present only with call_id and include=transcription on real data.",
            "nullable": true
          },
          "summary": {
            "type": "string",
            "description": "Stored AI summary of the call, present only with include=summary. null when no summary is saved; reading the list never generates one.",
            "nullable": true
          },
          "recording_url": {
            "type": "string",
            "description": "Signed link to the call’s recording, or to its voicemail, present only with include=recording_url. It works for 167 hours from the response, so store the audio rather than the link; request the list again for a fresh one. null for calls without a recording, for outbound calls, for organizations under HIPAA and for sample data. The link is not checked against storage, so it answers an error when the file is no longer stored.",
            "nullable": true
          },
          "ip_address": {
            "type": "string",
            "description": "IP address of the website visitor the call was matched to by the tracking code. null for calls without a matched visit and for outbound calls.",
            "nullable": true
          },
          "is_dummy": {
            "type": "boolean",
            "description": "True when this row is sample data."
          }
        }
      },
      "CallReportListResponse": {
        "title": "Call activity list response",
        "type": "object",
        "required": [
          "items",
          "page",
          "time_zone"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CallReport"
            }
          },
          "page": {
            "$ref": "#/components/schemas/CursorPage"
          },
          "time_zone": {
            "type": "string",
            "example": "Europe/Athens",
            "description": "IANA time zone of date_range, call_date and call_time: the project's, or the organization's in an organization-wide list."
          }
        }
      },
      "CallReportTotalsResponse": {
        "title": "Call activity totals",
        "type": "object",
        "description": "Call-activity totals. `calls` is the number of matching calls and `value` is their summed call value. The sample-data `is_dummy` hint is a first-party session concern and is not returned to personal-API tokens.",
        "required": [
          "calls",
          "value"
        ],
        "properties": {
          "calls": {
            "type": "integer",
            "description": "Number of matching calls."
          },
          "value": {
            "type": "number",
            "description": "Summed call value across the matching calls."
          }
        }
      },
      "UpdateCallActivityRequest": {
        "title": "Update call activity request",
        "type": "object",
        "description": "The optional addressing helpers plus the editable payload. The payload keys are applied by the activity services, so only the fields present are written.",
        "properties": {
          "uu_id_b": {
            "type": "string",
            "maxLength": 45,
            "description": "B-leg id, to edit one destination leg."
          },
          "call_direction": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ],
            "description": "Marks the {callId} path segment as an outbound call id; defaults to inbound."
          },
          "caller_name": {
            "type": "string",
            "maxLength": 100,
            "x-deprecated": true,
            "description": "Deprecated. Use PUT /calls/{callId}/name to set it or DELETE /calls/{callId}/name to clear it: they change only this field. Still accepted until existing clients have moved. Saves a name for this caller id across the project. `-` is ignored."
          },
          "rating": {
            "type": "number",
            "x-deprecated": true,
            "description": "Deprecated. Use PUT /calls/{callId}/rating to set it or DELETE /calls/{callId}/rating to clear it: they change only this field. Still accepted until existing clients have moved. Call rating from 0 to 5."
          },
          "comments": {
            "type": "string",
            "x-deprecated": true,
            "description": "Deprecated. Use PUT /calls/{callId}/comments to set it or DELETE /calls/{callId}/comments to clear it: they change only this field. Still accepted until existing clients have moved. Free-text note on the call."
          },
          "call_value": {
            "type": "number",
            "x-deprecated": true,
            "description": "Deprecated. Use PUT /calls/{callId}/value to set it or DELETE /calls/{callId}/value to clear it: they change only this field. Still accepted until existing clients have moved. Monetary value attributed to the call."
          },
          "tag_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "x-deprecated": true,
            "description": "Deprecated. Use POST /calls/{callId}/tags to add tags, DELETE /calls/{callId}/tags/{tagId} to remove one, or PUT /calls/{callId}/tags to replace the set: they change only the tags named, so tags added since the call was read are kept. Still accepted until existing clients have moved. Tag IDs (UUIDv7) from tag CRUD. Replaces the complete tag set; an empty array clears it. Tags must belong to this project or be shared defaults."
          },
          "custom_properties_values": {
            "type": "object",
            "x-deprecated": true,
            "description": "Deprecated. Use PUT /calls/{callId}/fields/{fieldId} to set one value or DELETE /calls/{callId}/fields/{fieldId} to clear one: they change only the field named, so values set since the call was read are kept. Still accepted until existing clients have moved. Custom field values keyed by the field `key` (for example cpf_deal_size). Replaces all of the call’s custom field values, so a field left out is cleared."
          },
          "action_date": {
            "type": "string",
            "x-deprecated": true,
            "description": "Deprecated. Use PUT /calls/{callId}/action_date to set it or DELETE /calls/{callId}/action_date to clear it: they change only this field. Still accepted until existing clients have moved. Follow-up date recorded against the call."
          }
        }
      },
      "CustomFieldValueRequest": {
        "title": "Custom field value request",
        "type": "object",
        "required": [
          "value"
        ],
        "properties": {
          "value": {
            "description": "The value, in the form the field’s type takes: a string for a text field, a number, a `YYYY-MM-DD` string for a date, `true` or `false` for a boolean, or one of a list field’s option values. `null` clears the value.",
            "nullable": true
          }
        }
      },
      "CustomFieldValueResponse": {
        "title": "Custom field value",
        "type": "object",
        "required": [
          "id",
          "key",
          "value"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Custom field ID (UUIDv7)."
          },
          "key": {
            "type": "string",
            "description": "The field’s key, which names its value in a call’s `custom_properties_values` and a form submission’s `custom_fields`.",
            "example": "cpf_deal_size"
          },
          "value": {
            "description": "The value the call or submission now holds, stored as it was sent; `null` when the value was cleared.",
            "nullable": true
          }
        }
      },
      "CallTagIdsRequest": {
        "title": "Call tag IDs request",
        "type": "object",
        "required": [
          "tag_ids"
        ],
        "properties": {
          "tag_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Tag IDs (UUIDv7) from tag CRUD, of this project or shared defaults. Adding needs at least one."
          }
        }
      },
      "CallTagsResponse": {
        "title": "Call tags",
        "type": "object",
        "required": [
          "tag_ids"
        ],
        "properties": {
          "tag_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The call’s tag IDs. A replacement keeps the order sent; added tags follow the existing ones."
          }
        }
      },
      "FormSubmissionTagIdsRequest": {
        "title": "Form submission tag IDs request",
        "type": "object",
        "required": [
          "tags"
        ],
        "properties": {
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Tag IDs (UUIDv7) from tag CRUD, of this project or shared defaults, named `tags` as in a submission row. Adding needs at least one."
          }
        }
      },
      "FormSubmissionTagsResponse": {
        "title": "Form submission tags",
        "type": "object",
        "required": [
          "tags"
        ],
        "properties": {
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The submission’s tag IDs. A replacement keeps the order sent; added tags follow the existing ones."
          }
        }
      },
      "CallActivityUpdateResponse": {
        "title": "Call activity update response",
        "type": "object",
        "required": [
          "name",
          "updated_at"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the user who made the change."
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp of the change, in the project timezone."
          }
        }
      },
      "CustomProperty": {
        "title": "Custom field",
        "description": "A custom field definition, including its name, data type and list options. Meta, usage counts and usage details are included only when requested.",
        "type": "object",
        "required": [
          "id",
          "project_id",
          "key",
          "name",
          "description",
          "type",
          "options",
          "is_archived"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Custom property ID (UUIDv7)."
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID (UUIDv7) of the owning project."
          },
          "key": {
            "type": "string",
            "maxLength": 100,
            "description": "Immutable server-generated key used for stored call and form submission values, workflow configuration, and report columns. It names the field in call `custom_properties` and in form submission `custom_fields`, but is never accepted as an identifier of the field itself on this API.",
            "example": "cpf_deal_size"
          },
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Display name shown in the call record and the field list.",
            "example": "Deal size"
          },
          "description": {
            "type": "string",
            "description": "Optional context describing what the field captures.",
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "number",
              "date",
              "boolean",
              "list"
            ],
            "description": "Value type. `list` is the only type with selectable options."
          },
          "options": {
            "type": "array",
            "description": "Selectable values for a `list` property; an empty array for every other type.",
            "items": {
              "$ref": "#/components/schemas/CustomPropertyOption"
            }
          },
          "is_archived": {
            "type": "boolean",
            "description": "Whether the property is archived and hidden from active call and form fields."
          },
          "meta": {
            "$ref": "#/components/schemas/CustomPropertyMeta"
          },
          "summary": {
            "$ref": "#/components/schemas/CustomPropertySummary"
          },
          "usage": {
            "$ref": "#/components/schemas/CustomPropertyUsage"
          }
        },
        "example": {
          "id": "0195f5ac-f0dc-7c4a-8f7f-252e9bd2b183",
          "project_id": "0195f596-c2c8-7c9f-94d7-a34507a92a7d",
          "key": "cpf_deal_size",
          "name": "Deal size",
          "description": "Estimated value of the opportunity.",
          "type": "list",
          "options": [
            {
              "value": "small",
              "label": "Small"
            },
            {
              "value": "large",
              "label": "Large"
            }
          ],
          "is_archived": false
        }
      },
      "CustomPropertyOption": {
        "title": "Custom field option",
        "description": "One available choice for a list field: its stored value and display label.",
        "type": "object",
        "required": [
          "value",
          "label"
        ],
        "properties": {
          "value": {
            "type": "string",
            "example": "small"
          },
          "label": {
            "type": "string",
            "example": "Small"
          }
        }
      },
      "CustomPropertyOptionInput": {
        "title": "Custom field option input",
        "description": "The value and display label of a list choice supplied when creating or updating a custom field.",
        "type": "object",
        "required": [
          "value"
        ],
        "additionalProperties": false,
        "properties": {
          "value": {
            "type": "string",
            "description": "Stored option value.",
            "example": "small"
          },
          "label": {
            "type": "string",
            "description": "Display label. Defaults to `value` when omitted.",
            "example": "Small"
          }
        }
      },
      "CustomPropertyMeta": {
        "title": "Custom field meta",
        "type": "object",
        "description": "Included by `include=meta` or one of its dotted field paths.",
        "properties": {
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the last change in UTC, with a trailing `Z`.",
            "example": "2026-09-16T10:30:00Z"
          },
          "updated_by": {
            "type": "string",
            "format": "uuid",
            "description": "User ID of the last updater, or null when the change came from the system.",
            "nullable": true
          }
        }
      },
      "CustomPropertySummary": {
        "title": "Custom field usage counts",
        "type": "object",
        "description": "Included by `include=summary`. All counts are zero for an archived property.",
        "properties": {
          "workflow_count": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of entries in the existing workflow usage references.",
            "example": 2
          },
          "report_count": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of entries in the existing report usage references.",
            "example": 1
          },
          "integration_count": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of distinct integration types that reference the property.",
            "example": 1
          }
        }
      },
      "CustomPropertyUsage": {
        "title": "Custom field usage details",
        "type": "object",
        "description": "Included by `include=usage`. All arrays are empty for an archived property.",
        "required": [
          "workflows",
          "reports",
          "integrations"
        ],
        "properties": {
          "workflows": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "reports": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "integrations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "Google Sheets"
            ]
          }
        }
      },
      "CustomPropertyListResponse": {
        "title": "Custom field list response",
        "type": "object",
        "required": [
          "items",
          "page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "description": "Active and archived properties in this page.",
            "items": {
              "$ref": "#/components/schemas/CustomProperty"
            }
          },
          "page": {
            "$ref": "#/components/schemas/CursorPage"
          },
          "system_field_usage": {
            "type": "object",
            "description": "Returned by include=usage. Usage references for built-in system fields."
          }
        }
      },
      "FieldIdsRequest": {
        "title": "Custom field selection request",
        "description": "The custom field IDs to remove or restore in one request. Removal archives fields with stored call values and deletes unused fields.",
        "type": "object",
        "required": [
          "field_ids"
        ],
        "additionalProperties": false,
        "properties": {
          "field_ids": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Field IDs (UUIDv7). Duplicate IDs are applied once.",
            "example": [
              "0195f5ac-f0dc-7c4a-8f7f-252e9bd2b183"
            ]
          }
        }
      },
      "AppendFieldOptionsRequest": {
        "type": "object",
        "required": [
          "options"
        ],
        "additionalProperties": false,
        "properties": {
          "options": {
            "type": "array",
            "minItems": 1,
            "description": "Values and labels are trimmed and must each be unique within the request, ignoring case. An omitted or null label defaults to the value.",
            "items": {
              "type": "object",
              "required": [
                "value"
              ],
              "additionalProperties": false,
              "properties": {
                "value": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "nullable": true
                }
              }
            }
          }
        }
      },
      "AppendFieldOptionsResult": {
        "type": "object",
        "required": [
          "field",
          "options_added"
        ],
        "properties": {
          "field": {
            "$ref": "#/components/schemas/CustomProperty"
          },
          "options_added": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "CreateCustomPropertyRequest": {
        "title": "Create custom field request",
        "type": "object",
        "required": [
          "name",
          "type"
        ],
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "The generated key must also fit within 100 characters, including cpf_ and any collision suffix. Choose a shorter name if creation returns StringExceedsMaximumLength (400000053) on /name. Renaming an existing field does not regenerate its key.",
            "example": "Deal size"
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "number",
              "date",
              "boolean",
              "list"
            ]
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "options": {
            "type": "array",
            "description": "Options for a `list` property. Use an empty array for other types.",
            "items": {
              "$ref": "#/components/schemas/CustomPropertyOptionInput"
            },
            "example": [
              {
                "value": "small",
                "label": "Small"
              },
              {
                "value": "large"
              }
            ]
          }
        }
      },
      "UpdateCustomPropertyRequest": {
        "title": "Update custom field request",
        "type": "object",
        "description": "Send only the fields to change. Omitted fields remain unchanged. Null clears the description and an empty options array clears list options. A body that changes nothing is answered with a `NothingToUpdate` problem.",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "number",
              "date",
              "boolean",
              "list"
            ]
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomPropertyOptionInput"
            },
            "example": []
          }
        }
      },
      "Problem": {
        "title": "Error response",
        "description": "Error details returned when an API request fails, including the HTTP status and Nimbata problem code.",
        "type": "object",
        "properties": {
          "status_code": {
            "type": "integer",
            "description": "HTTP status code."
          },
          "code": {
            "type": "integer",
            "description": "Machine-readable Nimbata problem code."
          },
          "title": {
            "type": "string",
            "description": "Name of the problem code, for example `ProjectNotFound`."
          }
        }
      },
      "ValidationProblem": {
        "title": "Validation error response",
        "description": "Details of invalid request input, including the HTTP status, number of validation problems and individual field problems.",
        "type": "object",
        "properties": {
          "status_code": {
            "type": "integer",
            "description": "HTTP status code."
          },
          "validation_problem_count": {
            "type": "integer",
            "description": "Number of validation problems."
          },
          "validation_problems": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "integer",
                  "description": "Machine-readable validation code."
                },
                "title": {
                  "type": "string",
                  "description": "Name of the validation code, for example `RequiredValueCannotBeEmpty`."
                },
                "origin": {
                  "type": "string",
                  "description": "Where the invalid value originated."
                },
                "pointer": {
                  "type": "string",
                  "description": "JSON pointer or route/query location."
                }
              }
            }
          }
        }
      },
      "IdentityDocument": {
        "title": "Identity document",
        "type": "object",
        "required": [
          "id",
          "type_id",
          "name",
          "kind"
        ],
        "description": "One uploaded document of an identity or of its address. `id` is what the delete operation takes as `documentId`.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Document ID. Use it exactly as returned."
          },
          "type_id": {
            "type": "string",
            "description": "The document type the file was filed under: the `type_id` of an accepted type in the registration requirements.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Name of the document type.",
            "nullable": true
          },
          "kind": {
            "type": "string",
            "enum": [
              "identity_proof",
              "address_proof",
              "supporting_document"
            ],
            "description": "What the document is: `identity_proof` and `supporting_document` on the identity, `address_proof` on its address."
          }
        }
      },
      "IdentityAddress": {
        "title": "Identity address",
        "type": "object",
        "required": [
          "id",
          "address",
          "city",
          "postal_code",
          "country",
          "documents"
        ],
        "description": "The address of an identity, which is what a regulator verifies.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Address ID. Use it exactly as returned."
          },
          "address": {
            "type": "string",
            "description": "Street address.",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code.",
            "example": "DE",
            "nullable": true
          },
          "documents": {
            "type": "array",
            "description": "Address proofs filed against this address.",
            "items": {
              "$ref": "#/components/schemas/IdentityDocument"
            }
          }
        }
      },
      "Identity": {
        "title": "Registrant identity",
        "type": "object",
        "required": [
          "id",
          "project_id",
          "type",
          "status",
          "rejection_reasons",
          "first_name",
          "last_name",
          "phone_number",
          "contact_email",
          "personal_tax_id",
          "birth_date",
          "id_number",
          "company_name",
          "company_reg_number",
          "vat_id",
          "country",
          "address",
          "documents"
        ],
        "description": "A person or company that numbers are registered for, with its address and documents. Ids are opaque; use them as returned.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identity ID. Use it exactly as returned."
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID (UUIDv7) of the project that owns this identity.",
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "personal",
              "business"
            ],
            "description": "Whether the registrant is a person or a company. Fixed at creation."
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "pending",
              "rejected",
              "verified"
            ],
            "description": "`new` until something is submitted, then `pending`, `rejected` or `verified` as the latest verification stands."
          },
          "rejection_reasons": {
            "type": "string",
            "description": "Why the latest verification was rejected. Null unless `status` is `rejected`.",
            "nullable": true
          },
          "first_name": {
            "type": "string",
            "nullable": true
          },
          "last_name": {
            "type": "string",
            "nullable": true
          },
          "phone_number": {
            "type": "string",
            "description": "Digits in international format, without the leading `+`.",
            "nullable": true
          },
          "contact_email": {
            "type": "string",
            "nullable": true
          },
          "personal_tax_id": {
            "type": "string",
            "nullable": true
          },
          "birth_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "id_number": {
            "type": "string",
            "nullable": true
          },
          "company_name": {
            "type": "string",
            "description": "Business identities only.",
            "nullable": true
          },
          "company_reg_number": {
            "type": "string",
            "description": "Business identities only.",
            "nullable": true
          },
          "vat_id": {
            "type": "string",
            "description": "Business identities only. Carries the tax prefix of the country, for example EL for Greece.",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code.",
            "example": "DE",
            "nullable": true
          },
          "address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/IdentityAddress"
              }
            ],
            "description": "The identity’s address, or null when it has none. An identity has at most one.",
            "nullable": true
          },
          "documents": {
            "type": "array",
            "description": "Identity proofs and permanent supporting documents filed against the identity. Address proofs are listed under `address`.",
            "items": {
              "$ref": "#/components/schemas/IdentityDocument"
            }
          }
        }
      },
      "IdentityListResponse": {
        "title": "Registrant identity list response",
        "type": "object",
        "required": [
          "items",
          "page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "description": "Identities in this page, each with its address and documents.",
            "items": {
              "$ref": "#/components/schemas/Identity"
            }
          },
          "page": {
            "$ref": "#/components/schemas/CursorPage"
          }
        }
      },
      "CreateIdentityRequest": {
        "title": "Create registrant identity request",
        "type": "object",
        "description": "The project comes from the URL. Unknown fields are rejected, and so are company fields on a personal identity.",
        "required": [
          "country",
          "first_name",
          "last_name",
          "phone_number"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "personal",
              "business"
            ],
            "default": "personal",
            "description": "Whether the registrant is a person or a company. Cannot be changed afterwards."
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code of the registrant, for example DE.",
            "example": "DE"
          },
          "first_name": {
            "type": "string",
            "example": "Erika"
          },
          "last_name": {
            "type": "string",
            "example": "Mustermann"
          },
          "phone_number": {
            "type": "string",
            "description": "A valid phone number in international format, with or without the leading `+`. Stored as digits without the `+`.",
            "example": "4930123456"
          },
          "contact_email": {
            "type": "string",
            "description": "Optional. Must look like an email address."
          },
          "personal_tax_id": {
            "type": "string"
          },
          "birth_date": {
            "type": "string",
            "format": "date",
            "description": "YYYY-MM-DD."
          },
          "id_number": {
            "type": "string",
            "description": "Government-issued ID number."
          },
          "company_name": {
            "type": "string",
            "description": "Required for a business identity."
          },
          "company_reg_number": {
            "type": "string",
            "description": "Business identities only."
          },
          "vat_id": {
            "type": "string",
            "description": "Business identities only. The country’s VAT prefix is added when missing (Greece uses `EL`)."
          }
        }
      },
      "UpdateIdentityRequest": {
        "title": "Replace registrant identity request",
        "type": "object",
        "description": "The full identity: required fields are as on create, and omitted optional fields are cleared. `type` is not accepted, and neither are unknown fields.",
        "required": [
          "country",
          "first_name",
          "last_name",
          "phone_number"
        ],
        "properties": {
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code of the registrant, for example DE.",
            "example": "DE"
          },
          "first_name": {
            "type": "string",
            "example": "Erika"
          },
          "last_name": {
            "type": "string",
            "example": "Mustermann"
          },
          "phone_number": {
            "type": "string",
            "description": "A valid phone number in international format, with or without the leading `+`. Stored as digits without the `+`.",
            "example": "4930123456"
          },
          "contact_email": {
            "type": "string",
            "description": "Optional. Must look like an email address."
          },
          "personal_tax_id": {
            "type": "string"
          },
          "birth_date": {
            "type": "string",
            "format": "date",
            "description": "YYYY-MM-DD."
          },
          "id_number": {
            "type": "string",
            "description": "Government-issued ID number."
          },
          "company_name": {
            "type": "string",
            "description": "Required for a business identity."
          },
          "company_reg_number": {
            "type": "string",
            "description": "Business identities only. Cannot change once the identity is verified."
          },
          "vat_id": {
            "type": "string",
            "description": "Business identities only. The country’s VAT prefix is added when missing (Greece uses `EL`)."
          }
        }
      },
      "PutIdentityAddressRequest": {
        "title": "Set identity address request",
        "type": "object",
        "description": "The identity’s address, created or replaced. Unknown fields are rejected.",
        "required": [
          "address",
          "city",
          "postal_code",
          "country"
        ],
        "properties": {
          "address": {
            "type": "string",
            "description": "Street address.",
            "example": "Musterstrasse 1"
          },
          "city": {
            "type": "string",
            "example": "Berlin"
          },
          "postal_code": {
            "type": "string",
            "example": "10115"
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code. Cannot change once the address exists (422 ValueCannotBeChanged).",
            "example": "DE"
          }
        }
      },
      "OptionCountryListResponse": {
        "title": "Supported countries",
        "type": "array",
        "description": "Supported countries. Provider identifiers are deliberately not included.",
        "items": {
          "type": "object",
          "properties": {
            "country_code": {
              "type": "string",
              "description": "ISO 3166-1 alpha-2 code."
            },
            "name": {
              "type": "string"
            },
            "has_states": {
              "type": "boolean",
              "description": "Whether this country is addressed by state, in which case /options/cities returns nothing for it."
            }
          }
        }
      },
      "OptionStateListResponse": {
        "title": "Country states",
        "type": "array",
        "description": "States of a country. Empty for a country that has none.",
        "items": {
          "type": "object",
          "properties": {
            "country_code": {
              "type": "string"
            },
            "state_code": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          }
        }
      },
      "OptionCityListResponse": {
        "title": "Cities with available numbers",
        "type": "array",
        "description": "Cities where numbers are available. Empty for a state-addressed or unsupported country.",
        "items": {
          "type": "object"
        }
      },
      "OptionProofListResponse": {
        "title": "Accepted proof types",
        "type": "array",
        "description": "Proof types for one registrant kind.",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Proof type ID."
            },
            "name": {
              "type": "string"
            }
          }
        }
      },
      "CreateNumberOrderRequest": {
        "title": "Create tracking-number order request",
        "type": "object",
        "required": [
          "country",
          "number_type"
        ],
        "description": "A tracking-number order. `country` and `number_type` are required. Geographic targeting uses `area_code`, `administrative_area`, and/or `locality`; for countries outside the US and Canada `locality` (city) is required and must match a served city.",
        "properties": {
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code of the numbers to order.",
            "example": "US"
          },
          "number_type": {
            "type": "string",
            "enum": [
              "local",
              "toll_free",
              "mobile",
              "national"
            ],
            "description": "Kind of number to order. Availability depends on the country."
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 1,
            "description": "How many matching numbers to order. Defaults to 1."
          },
          "area_code": {
            "type": "string",
            "description": "Area-code / prefix filter (for example 415). For the US and Canada it narrows the search; for other countries it disambiguates a city that spans several prefixes.",
            "example": "415",
            "nullable": true
          },
          "administrative_area": {
            "type": "string",
            "description": "State or region code that narrows the selection (for example CA). Applies to the US and Canada.",
            "nullable": true
          },
          "locality": {
            "type": "string",
            "description": "City name. Required to order in any country outside the US and Canada, where the matching city determines availability and registration.",
            "nullable": true
          },
          "tracking_name": {
            "type": "string",
            "maxLength": 256,
            "description": "Friendly name applied to the ordered number(s).",
            "nullable": true
          },
          "tracking_source": {
            "type": "object",
            "description": "Tracking source to attach to the ordered number(s).",
            "properties": {
              "type": {
                "type": "string",
                "description": "Source type."
              },
              "id": {
                "type": "string",
                "description": "ID (UUIDv7) of an existing tracking source."
              },
              "name": {
                "type": "string",
                "description": "Source name."
              },
              "params": {
                "type": "object",
                "description": "Source parameters (one level of scalar values)."
              }
            },
            "nullable": true
          },
          "destination_number": {
            "type": "string",
            "description": "E.164 number to forward calls to. When set, a basic call flow is created for the ordered number(s).",
            "nullable": true
          },
          "swap_group": {
            "type": "string",
            "description": "DNI swap-group id to add the number(s) to. Use new_swap_group_name to create a new group instead.",
            "nullable": true
          },
          "new_swap_group_name": {
            "type": "string",
            "description": "Name of a new DNI swap group to create for the ordered number(s).",
            "nullable": true
          },
          "sms_enabled": {
            "type": "boolean",
            "default": false,
            "description": "Provision the ordered number(s) for SMS where the country and number type support it."
          },
          "maximum_setup_cost": {
            "type": "number",
            "description": "Refuse the order when the per-number setup cost would exceed this amount.",
            "nullable": true
          },
          "maximum_monthly_price": {
            "type": "number",
            "description": "Refuse the order when the per-number monthly price would exceed this amount.",
            "nullable": true
          }
        },
        "example": {
          "country": "US",
          "number_type": "local",
          "area_code": "415",
          "quantity": 1,
          "tracking_name": "Summer campaign"
        }
      },
      "NumberOrderResult": {
        "title": "Tracking-number order result",
        "type": "object",
        "required": [
          "status",
          "numbers"
        ],
        "description": "The outcome of an order. `completed`: the numbers are active. `pending`: purchased, but they need registration before use. `failed`: nothing was ordered; `message` explains why.",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "completed",
              "pending",
              "failed"
            ],
            "description": "Order outcome."
          },
          "numbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The E.164 numbers that were ordered. Empty when status is failed."
          },
          "message": {
            "type": "string",
            "description": "Human-readable summary of the outcome when the provider supplied one.",
            "nullable": true
          }
        }
      },
      "PendingNumberOrder": {
        "title": "Number awaiting registration",
        "type": "object",
        "required": [
          "id",
          "number",
          "project_id",
          "ordered_at",
          "order_id",
          "status",
          "identity_id"
        ],
        "description": "One ordered tracking number that still awaits registration.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID (UUIDv7) of the tracking number."
          },
          "number": {
            "type": "string",
            "description": "The phone number."
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID (UUIDv7) of the project the number belongs to.",
            "nullable": true
          },
          "ordered_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the order was placed, in UTC.",
            "nullable": true
          },
          "order_id": {
            "type": "string",
            "description": "Opaque ID of the order. Numbers with the same `order_id` were ordered together, and can be submitted for registration in one request.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "As on the tracking-number resource: `awaiting_registration`, `pending_verification`, `rejected`, or `active` (approved and about to leave this list)."
          },
          "identity_id": {
            "type": "string",
            "description": "The identity the number was last submitted with, or null when it was never submitted.",
            "nullable": true
          }
        }
      },
      "PendingNumberOrdersResponse": {
        "title": "Numbers awaiting registration",
        "type": "object",
        "required": [
          "items"
        ],
        "description": "The tracking numbers that still await registration. The list is not paginated.",
        "properties": {
          "items": {
            "type": "array",
            "description": "One entry per number.",
            "items": {
              "$ref": "#/components/schemas/PendingNumberOrder"
            }
          }
        }
      },
      "TrackedForm": {
        "title": "Tracked form",
        "type": "object",
        "required": [
          "id",
          "name",
          "project_id",
          "dni_group_id",
          "page"
        ],
        "description": "A tracked form. List and detail use the same fields and include rules. Submission counts, submission timestamps, and the captured or excluded fields require include.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Tracked-form ID (UUIDv7). Pass it in `form_ids` to the submissions endpoints. Sample-mode rows carry fixture ids instead of a UUID.",
            "example": "01900000-0000-7000-8000-000000000031"
          },
          "name": {
            "type": "string",
            "description": "Display name: the assigned alias, else the name detected on the page, else the page form id. The form rename changes it.",
            "example": "Contact form",
            "nullable": true
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID (UUIDv7) of the owning project. A form whose project has since been deleted resolves against the historical project record, or null when none exists.",
            "nullable": true
          },
          "dni_group_id": {
            "type": "integer",
            "description": "Form-tracking group the form belongs to. This is an integer, not a UUIDv7.",
            "example": 4821
          },
          "page": {
            "type": "object",
            "required": [
              "landing_url",
              "form_id",
              "form_name"
            ],
            "description": "How the form was detected on the page. landing_url, form_id, and form_name are returned by default; include=page or include=page.form_action adds form_action.",
            "properties": {
              "landing_url": {
                "type": "string",
                "description": "Page the form was seen on.",
                "example": "https://example.com/contact",
                "nullable": true
              },
              "form_id": {
                "type": "string",
                "description": "id attribute of the form element, or null when it has none.",
                "example": "gform_3",
                "nullable": true
              },
              "form_name": {
                "type": "string",
                "description": "name attribute of the form element, or null when it has none.",
                "example": "contact",
                "nullable": true
              },
              "form_action": {
                "type": "string",
                "description": "Submit target of the form. Requires include=page or include=page.form_action.",
                "nullable": true
              }
            }
          },
          "summary": {
            "type": "object",
            "description": "Include-only submission counts.",
            "properties": {
              "submission_count": {
                "type": "integer",
                "minimum": 0,
                "description": "Submissions recorded for this form. Requires include=summary or include=summary.submission_count.",
                "example": 12
              }
            }
          },
          "meta": {
            "type": "object",
            "description": "Include-only submission timestamps in UTC. Null when the form has no submissions.",
            "properties": {
              "first_submission_at": {
                "type": "string",
                "format": "date-time",
                "description": "Earliest submission. Requires include=meta or include=meta.first_submission_at.",
                "example": "2026-07-01T11:03:00Z",
                "nullable": true
              },
              "last_submission_at": {
                "type": "string",
                "format": "date-time",
                "description": "Most recent submission. Requires include=meta or include=meta.last_submission_at.",
                "example": "2026-07-20T08:00:00Z",
                "nullable": true
              }
            }
          },
          "fields": {
            "type": "object",
            "description": "Include-only field configuration.",
            "properties": {
              "captured": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "nullable": true
                },
                "description": "Every field the form captures, keyed by field name with the detected field type. Requires include=fields or include=fields.captured.",
                "example": {
                  "email": "email",
                  "phone": "tel"
                }
              },
              "excluded": {
                "type": "object",
                "required": [
                  "name_list",
                  "name_rules"
                ],
                "description": "Fields suppressed from submission output. Requires include=fields or include=fields.excluded. The ignored-fields update replaces this object.",
                "properties": {
                  "name_list": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Exact field names.",
                    "example": [
                      "email"
                    ]
                  },
                  "name_rules": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Wildcard rules such as utm_* or *_id.",
                    "example": [
                      "utm_*"
                    ]
                  }
                }
              }
            }
          }
        },
        "example": {
          "id": "01900000-0000-7000-8000-000000000031",
          "name": "Contact form",
          "project_id": "01900000-0000-7000-8000-000000000002",
          "dni_group_id": 4821,
          "page": {
            "landing_url": "https://example.com/contact",
            "form_id": "gform_3",
            "form_name": "contact"
          }
        }
      },
      "TrackedFormListResponse": {
        "title": "Tracked form list response",
        "type": "object",
        "required": [
          "items",
          "page",
          "is_dummy"
        ],
        "properties": {
          "items": {
            "type": "array",
            "description": "Tracked forms in this page, ordered by display name and id.",
            "items": {
              "$ref": "#/components/schemas/TrackedForm"
            }
          },
          "page": {
            "$ref": "#/components/schemas/CursorPage"
          },
          "is_dummy": {
            "type": "boolean",
            "description": "True when the rows are sample data rather than the project’s real forms."
          }
        }
      },
      "FormField": {
        "title": "Form field",
        "type": "object",
        "description": "One column a tracked form captures. Field-selection state (`visible`, `show`) reflects the calling user’s own saved column preferences.",
        "properties": {
          "key": {
            "type": "string",
            "description": "Field name as submitted by the form. Use it to address a column."
          },
          "name": {
            "type": "string",
            "description": "Header label. Falls back to key when the field has not been renamed."
          },
          "form_field": {
            "type": "boolean",
            "description": "True for a field of the form itself, false for a column the platform adds."
          },
          "field_type": {
            "type": "string",
            "description": "Detected field type."
          },
          "visible": {
            "type": "boolean",
            "description": "False when the field is suppressed by the form’s hidden-field rules."
          },
          "show": {
            "type": "boolean",
            "description": "Whether the column is part of the caller’s current selection."
          }
        }
      },
      "FormFieldsResponse": {
        "title": "Captured form fields",
        "type": "array",
        "description": "The fields a tracked form captures, in display order. Not paginated. Field-selection state (`visible`, `show`) reflects the calling user’s own saved column preferences.",
        "items": {
          "$ref": "#/components/schemas/FormField"
        }
      },
      "AcceptedDocumentType": {
        "title": "Accepted document type",
        "type": "object",
        "required": [
          "type_id",
          "name",
          "template_url"
        ],
        "description": "A kind of document that satisfies a document group of the requirements.",
        "properties": {
          "type_id": {
            "type": "string",
            "description": "Send as `type_id` when uploading a document of this kind. An opaque ID: use it exactly as returned."
          },
          "name": {
            "type": "string",
            "description": "Document name as the regulator refers to it."
          },
          "template_url": {
            "type": "string",
            "description": "Where to download the form to complete and upload, for documents that come with one. Null when there is none.",
            "nullable": true
          }
        }
      },
      "RegistrationDocumentGroup": {
        "title": "Document group",
        "type": "object",
        "required": [
          "attaches_to",
          "quantity",
          "accepted_types"
        ],
        "description": "How many documents of which types are needed. Its position in `documents` is the `document_group` of `missing` items.",
        "properties": {
          "attaches_to": {
            "type": "string",
            "enum": [
              "identity",
              "address"
            ],
            "description": "`address` proofs are filed on the identity’s address, which must exist first; everything else on the identity."
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "example": 1,
            "description": "How many documents are needed. Identity proofs must be of different accepted types, so two documents of one type count once."
          },
          "accepted_types": {
            "type": "array",
            "description": "The kinds of document that count towards the group.",
            "items": {
              "$ref": "#/components/schemas/AcceptedDocumentType"
            }
          }
        }
      },
      "RegistrationIdentityTypeRequirement": {
        "title": "Requirements for one identity type",
        "type": "object",
        "required": [
          "required_fields",
          "documents"
        ],
        "description": "What an identity of one type needs to satisfy the requirements.",
        "properties": {
          "required_fields": {
            "type": "array",
            "description": "Fields of the identity resource that must be filled, using the names of the identity resource (`country` is the identity’s country).",
            "items": {
              "type": "string"
            },
            "example": [
              "first_name",
              "last_name",
              "country"
            ]
          },
          "documents": {
            "type": "array",
            "description": "Needed documents: identity proofs, address proofs and the permanent supporting document, in that order. Parts that are not needed are left out.",
            "items": {
              "$ref": "#/components/schemas/RegistrationDocumentGroup"
            }
          }
        }
      },
      "RegistrationAddressRequirement": {
        "title": "Address requirement",
        "type": "object",
        "required": [
          "required",
          "must_be_in_country"
        ],
        "description": "The rule for the identity’s address.",
        "properties": {
          "required": {
            "type": "boolean",
            "description": "Always true when this object is present."
          },
          "must_be_in_country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 code of the country the address has to be in, which is the numbers’ country. Null when the address may be anywhere.",
            "example": "DE",
            "nullable": true
          }
        }
      },
      "RegistrationRequirements": {
        "title": "Registration requirements",
        "type": "object",
        "required": [
          "country",
          "number_type",
          "restriction_message",
          "address",
          "identity_types"
        ],
        "description": "What a regulator requires for numbers of one type in one country. Pick the `identity_types` entry for your identity’s type and meet its fields, documents and address rule.",
        "properties": {
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 code of the numbers’ country.",
            "example": "DE",
            "nullable": true
          },
          "number_type": {
            "type": "string",
            "enum": [
              "local",
              "toll_free",
              "mobile",
              "national"
            ],
            "description": "Kind of number the requirements are for.",
            "nullable": true
          },
          "restriction_message": {
            "type": "string",
            "description": "The regulator’s wording as plain text, suitable for showing to the person registering. Text the regulator emphasises is wrapped in `**`, as in Markdown bold.",
            "nullable": true
          },
          "address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RegistrationAddressRequirement"
              }
            ],
            "description": "The address rule, or null when the requirements set no rule for the address. The identity still needs an address to be submitted.",
            "nullable": true
          },
          "identity_types": {
            "type": "object",
            "description": "Requirements per identity type. Only the types the regulator accepts are present: `personal`, `business`, or both.",
            "properties": {
              "personal": {
                "$ref": "#/components/schemas/RegistrationIdentityTypeRequirement"
              },
              "business": {
                "$ref": "#/components/schemas/RegistrationIdentityTypeRequirement"
              }
            }
          }
        }
      },
      "RegistrationRequirementsResponse": {
        "title": "Registration requirements response",
        "type": "object",
        "required": [
          "requirements"
        ],
        "properties": {
          "requirements": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RegistrationRequirements"
              }
            ],
            "description": "The requirements, or null when the country and number type need no registration.",
            "nullable": true
          }
        }
      },
      "DocumentEncryptionKeys": {
        "title": "Document encryption keys",
        "type": "object",
        "required": [
          "public_keys",
          "fingerprint"
        ],
        "properties": {
          "public_keys": {
            "type": "array",
            "description": "The two RSA public keys, in PEM format and in this order.",
            "items": {
              "type": "string"
            }
          },
          "fingerprint": {
            "type": "string",
            "description": "SHA-1 hex of each key’s DER bytes, joined with `:::`. Send it as `encryption_fingerprint`."
          }
        }
      },
      "MissingRegistrationItem": {
        "title": "Missing registration item",
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "description": "One thing an identity still lacks before numbers can be registered with it.",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "identity_type_mismatch",
              "address_missing",
              "address_country_mismatch",
              "address_documents_missing",
              "identity_documents_missing",
              "identity_field_missing",
              "permanent_document_missing"
            ],
            "description": "Stable reason: `identity_type_mismatch` (reported alone), `address_missing`, `address_country_mismatch`, `address_documents_missing`, `identity_documents_missing`, `identity_field_missing` (see `field`) or `permanent_document_missing`."
          },
          "message": {
            "type": "string",
            "description": "English text for people, without markup."
          },
          "field": {
            "type": "string",
            "description": "The identity field that is empty. Present for `identity_field_missing`."
          },
          "document_group": {
            "type": "integer",
            "minimum": 0,
            "description": "For missing documents: the position of the group in `requirements.identity_types.{type}.documents` that says what to upload."
          }
        }
      },
      "IdentityNotReadyProblem": {
        "title": "Identity not ready for registration",
        "type": "object",
        "description": "IdentityNotReadyForRegistration (406000156): the identity does not meet the requirements; nothing was submitted.",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Machine-readable Nimbata problem code."
          },
          "title": {
            "type": "string",
            "description": "Name of the problem code."
          },
          "missing": {
            "type": "array",
            "description": "What the identity lacks. The same items as the `missing` list of the registration read.",
            "items": {
              "$ref": "#/components/schemas/MissingRegistrationItem"
            }
          }
        }
      },
      "TrackingNumberRegistration": {
        "title": "Tracking number registration",
        "type": "object",
        "required": [
          "requirements",
          "rejection_reasons",
          "reference",
          "identity_id"
        ],
        "description": "Registration details of one number. The authoritative status belongs to the tracking-number resource.",
        "properties": {
          "requirements": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RegistrationRequirements"
              }
            ],
            "description": "What registration requires, or null when registration is not outstanding.",
            "nullable": true
          },
          "rejection_reasons": {
            "type": "string",
            "description": "Reasons for the rejected verification, or null when not rejected.",
            "nullable": true
          },
          "reference": {
            "type": "string",
            "description": "Reference for the rejected verification, or null when not rejected.",
            "nullable": true
          },
          "identity_id": {
            "type": "string",
            "description": "The identity the number was last submitted with; null if never submitted or once active.",
            "nullable": true
          },
          "missing": {
            "type": "array",
            "description": "Only with the `identity_id` query parameter: what that identity still lacks, empty when it is ready.",
            "items": {
              "$ref": "#/components/schemas/MissingRegistrationItem"
            }
          }
        }
      },
      "RegisterNumbersRequest": {
        "title": "Register numbers request",
        "type": "object",
        "required": [
          "identity_id",
          "numbers"
        ],
        "description": "The identity and the numbers to register with it. Any field not listed is rejected with 422.",
        "properties": {
          "identity_id": {
            "type": "string",
            "description": "The identity to register with. It may belong to any project where you hold IdentityRead."
          },
          "numbers": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "description": "1 to 100 numbers, each by ID (UUIDv7) or phone number, without duplicates. They share one verification.",
            "items": {
              "type": "string"
            },
            "example": [
              "01900000-0000-7000-8000-000000000031"
            ]
          }
        }
      },
      "RegisteredNumber": {
        "title": "Number submitted for registration",
        "type": "object",
        "required": [
          "id",
          "number",
          "requirements",
          "rejection_reasons",
          "reference",
          "identity_id"
        ],
        "description": "A submitted number, with its registration as read right after the submission.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID (UUIDv7) of the tracking number."
          },
          "number": {
            "type": "string",
            "description": "The phone number."
          },
          "requirements": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RegistrationRequirements"
              }
            ],
            "description": "The requirements the identity was checked against."
          },
          "rejection_reasons": {
            "type": "string",
            "description": "Always null right after a submission.",
            "nullable": true
          },
          "reference": {
            "type": "string",
            "description": "Always null right after a submission.",
            "nullable": true
          },
          "identity_id": {
            "type": "string",
            "description": "The identity the number was submitted with."
          }
        }
      },
      "RegisterNumbersResponse": {
        "title": "Register numbers response",
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "description": "One entry per submitted number, in request order.",
            "items": {
              "$ref": "#/components/schemas/RegisteredNumber"
            }
          }
        }
      },
      "SpamCaller": {
        "title": "Blocked caller",
        "type": "object",
        "required": [
          "number",
          "scope",
          "project_id"
        ],
        "description": "One blocked caller, identified by its number and scope. Optional objects are returned only when requested with include.",
        "properties": {
          "number": {
            "type": "string",
            "description": "Caller number in international digits without +, or anonymous. Send this as number when unblocking, or as spamNum when copying.",
            "example": "306937007434"
          },
          "scope": {
            "type": "string",
            "enum": [
              "project",
              "organization"
            ],
            "description": "Whether the caller is blocked in this project or throughout the organization."
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Project ID (UUIDv7), or null for organization scope.",
            "nullable": true
          },
          "meta": {
            "type": "object",
            "description": "Included with include=meta or meta.updated_at.",
            "properties": {
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Last update timestamp in UTC, or null when unavailable. Included with include=meta or meta.updated_at.",
                "nullable": true
              }
            }
          },
          "capabilities": {
            "type": "object",
            "description": "Included with include=capabilities or capabilities.can_delete.",
            "properties": {
              "can_delete": {
                "type": "boolean",
                "description": "Whether the authenticated user can unblock this entry. Organization-wide entries require access to all organization projects. Included with include=capabilities or capabilities.can_delete."
              }
            }
          }
        },
        "example": {
          "number": "306937007434",
          "scope": "project",
          "project_id": "01a0436f-8019-77ef-bd36-5685c950644a"
        }
      },
      "MediaLibraryFile": {
        "title": "Media library file",
        "type": "object",
        "required": [
          "id",
          "name",
          "project_id"
        ],
        "description": "One greeting, survey prompt, or voicemail greeting. `id` is the media ID, a stable storage key. Use it for playback or delete operations.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable media identifier. Pass this value as `storage_name` for playback or as an entry in `file_names` for deletion."
          },
          "name": {
            "type": "string",
            "description": "Original uploaded file name, suitable for display."
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID (UUIDv7) of the owning project, or null for a file shared across the organization.",
            "nullable": true
          },
          "meta": {
            "type": "object",
            "description": "Included with include=meta or meta.updated_at.",
            "properties": {
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Last update timestamp in UTC. Included with include=meta or meta.updated_at."
              }
            }
          },
          "usage": {
            "type": "object",
            "description": "Included with include=usage or usage.call_flow_ids.",
            "properties": {
              "call_flow_ids": {
                "type": "array",
                "description": "Call flow IDs (UUIDv7) referencing this file. Included with include=usage or usage.call_flow_ids.",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "MediaLibraryResponse": {
        "title": "Media library response",
        "type": "object",
        "required": [
          "greetings",
          "surveys",
          "voicemails"
        ],
        "description": "The three file collections of the media library plus any fields requested through include.",
        "properties": {
          "greetings": {
            "type": "array",
            "description": "Audio played to the caller before the call is routed.",
            "items": {
              "$ref": "#/components/schemas/MediaLibraryFile"
            }
          },
          "surveys": {
            "type": "array",
            "description": "Prompts played to the agent after a call ends, to score or tag it.",
            "items": {
              "$ref": "#/components/schemas/MediaLibraryFile"
            }
          },
          "voicemails": {
            "type": "array",
            "description": "Greetings played when a call goes unanswered.",
            "items": {
              "$ref": "#/components/schemas/MediaLibraryFile"
            }
          },
          "voicemail_settings": {
            "type": "object",
            "description": "Project voicemail settings. Included with include=voicemail-settings.",
            "properties": {
              "default_password": {
                "type": "string",
                "description": "The PIN for reaching this project’s voicemail.",
                "nullable": true
              }
            }
          }
        }
      },
      "MediaLibraryCollectionResponse": {
        "title": "Media collection response",
        "x-related-models": [
          "WhisperLibraryResponse"
        ],
        "type": "array",
        "description": "A single media collection. For `greetings`, `surveys` and `voicemails`, the response is an array of media library files. For `callWhispers`, it uses the Call whisper library model instead.",
        "items": {
          "$ref": "#/components/schemas/MediaLibraryFile"
        }
      },
      "WhisperLibraryResponse": {
        "title": "Call whisper library",
        "type": "object",
        "description": "The whisper view, returned by the `callWhispers` media type. A whisper is a property of a tracking number, so this pairs the recordings available for reuse with the current state of every number in scope.",
        "properties": {
          "available_whispers": {
            "type": "array",
            "description": "One entry per distinct whisper in scope, as the set that can be reused.",
            "items": {
              "$ref": "#/components/schemas/ReusableWhisper"
            }
          },
          "tracking_numbers": {
            "type": "array",
            "description": "Every tracking number in scope with the whisper it currently plays.",
            "items": {
              "$ref": "#/components/schemas/TrackingNumberWhisper"
            }
          }
        }
      },
      "ReusableWhisper": {
        "title": "Reusable call whisper",
        "type": "object",
        "description": "A whisper that can be applied to other tracking numbers.",
        "properties": {
          "value": {
            "type": "string",
            "description": "The stored whisper value. A recording is a file name; spoken text starts with `#`, and with `##` it is followed by the language code and a one-character voice before the text itself."
          },
          "source_number": {
            "type": "string",
            "description": "The tracking number to pass as the source when reusing this whisper."
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID (UUIDv7) of the project owning that tracking number."
          }
        }
      },
      "TrackingNumberWhisper": {
        "title": "Tracking number call whisper",
        "type": "object",
        "description": "A tracking number and the whisper it plays, if any.",
        "properties": {
          "number": {
            "type": "string",
            "description": "The tracking number."
          },
          "number_display": {
            "type": "string",
            "description": "The number formatted for display."
          },
          "name": {
            "type": "string",
            "description": "Display name assigned to the tracking number."
          },
          "whisper": {
            "type": "string",
            "description": "The whisper currently set, or null when the number plays none.",
            "nullable": true
          },
          "is_whisper_cached": {
            "type": "boolean",
            "description": "Whether the platform may still be playing the previous recording, which it caches for about half an hour after a change."
          }
        }
      },
      "UpdateWhisperRequest": {
        "title": "Update call whisper request",
        "type": "object",
        "description": "The whisper to set. Choose one `type` and send only the fields listed for that operation.",
        "required": [
          "type"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "description": "`text_to_speech` creates spoken text on one number. `reuse` copies the whisper already assigned to another number.",
            "enum": [
              "text_to_speech",
              "reuse"
            ]
          },
          "number": {
            "type": "string",
            "description": "`text_to_speech` only. The tracking number that should play the spoken text."
          },
          "text": {
            "type": "string",
            "maxLength": 100,
            "description": "`text_to_speech` only. The text to speak, up to 100 characters."
          },
          "language": {
            "type": "string",
            "description": "`text_to_speech` only. The language code used to speak the text.",
            "example": "en-US"
          },
          "voice": {
            "type": "string",
            "description": "`text_to_speech` only. The voice used to speak the text.",
            "enum": [
              "female",
              "male"
            ]
          },
          "source_number": {
            "type": "string",
            "description": "`reuse` only. The tracking number whose existing audio or text-to-speech whisper is copied. It may belong to any project the caller can read."
          },
          "target_numbers": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "description": "`reuse` only. One or more tracking numbers in the route project that should receive the copied whisper.",
            "items": {
              "type": "string"
            }
          }
        },
        "example": {
          "type": "text_to_speech",
          "number": "306900000001",
          "text": "Welcome to our company.",
          "language": "en-US",
          "voice": "female"
        }
      },
      "DeleteMediaLibraryRequest": {
        "title": "Delete media request",
        "type": "object",
        "description": "What to remove. Send `file_names` for greetings, surveys and voicemail greetings, or `tracking_numbers` for whispers. Both default to empty, so an omitted list removes nothing.",
        "properties": {
          "file_names": {
            "type": "array",
            "description": "Media identifiers, as returned in `id` by the listing.",
            "items": {
              "type": "string"
            }
          },
          "tracking_numbers": {
            "type": "array",
            "description": "Tracking numbers whose whisper should be cleared.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SpamCallerListResponse": {
        "title": "Blocked caller list response",
        "type": "object",
        "required": [
          "items",
          "page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "description": "Blocked callers in deterministic caller-number order.",
            "items": {
              "$ref": "#/components/schemas/SpamCaller"
            }
          },
          "page": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CursorPage"
              },
              {
                "type": "object",
                "properties": {
                  "total_count": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "All authorized matches before pagination. Present only with include=page.total_count; not a snapshot across requests."
                  }
                }
              }
            ]
          }
        }
      },
      "CreateSpamCallerRequest": {
        "title": "Block caller request",
        "description": "The caller number and scope to block, with an optional instruction to delete its past calls.",
        "type": "object",
        "required": [
          "number"
        ],
        "additionalProperties": false,
        "properties": {
          "number": {
            "type": "string",
            "description": "Caller number in international digits (an optional leading + is accepted), or anonymous.",
            "example": "306937007434"
          },
          "scope": {
            "type": "string",
            "enum": [
              "project",
              "organization"
            ],
            "default": "project",
            "description": "Where to block the caller. Organization scope requires access to every project in the organization."
          },
          "delete_past_calls": {
            "type": "boolean",
            "default": false,
            "description": "Permanently delete this caller’s existing calls in this project when scope is project. Has no effect for organization scope."
          }
        }
      },
      "CopySpamCallersRequest": {
        "title": "Copy blocked callers request",
        "type": "object",
        "required": [
          "newBrand",
          "spamNums"
        ],
        "properties": {
          "newBrand": {
            "type": "string",
            "format": "uuid",
            "description": "Target project ID in the route organization."
          },
          "spamNums": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "required": [
                "spamNum"
              ],
              "properties": {
                "spamNum": {
                  "type": "string",
                  "description": "International digits, optionally prefixed with +, anonymous, or the existing legacy 0 entry."
                },
                "brand_id": {
                  "type": "string",
                  "description": "Legacy input accepted but ignored; the source is always the URL project."
                }
              }
            }
          },
          "deletePastCalls": {
            "type": "boolean",
            "default": false,
            "description": "Permanently delete matching target-project history only for newly copied blocks, including independent copies of organization-wide blocks."
          }
        }
      },
      "CopySpamCallersResult": {
        "title": "Copy blocked callers result",
        "type": "object",
        "required": [
          "results"
        ],
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "caller_number",
                "outcome",
                "spam_caller"
              ],
              "properties": {
                "caller_number": {
                  "type": "string",
                  "description": "E.164 caller number or anonymous."
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "created",
                    "already_present",
                    "not_present_in_source"
                  ]
                },
                "spam_caller": {
                  "type": "object",
                  "description": "The target-project block, or null when absent from the source.",
                  "properties": {
                    "caller_number": {
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "project"
                      ]
                    },
                    "project_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "nullable": true
                }
              }
            }
          }
        }
      },
      "DeleteSpamCallersRequest": {
        "title": "Unblock callers request",
        "description": "The blocked caller numbers and their scopes to unblock.",
        "type": "object",
        "required": [
          "blocked_callers"
        ],
        "properties": {
          "blocked_callers": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "number"
              ],
              "properties": {
                "number": {
                  "type": "string",
                  "description": "The blocked number, as returned in number."
                },
                "scope": {
                  "type": "string",
                  "enum": [
                    "project",
                    "organization"
                  ],
                  "description": "Which scope to remove the block from. `project` (the default when omitted) removes it from this project; `organization` removes the organization-wide block. Organization scope requires access to every project in the organization."
                }
              }
            }
          }
        }
      }
    }
  }
}
