{"openapi":"3.1.0","info":{"title":"Bird API","version":"1.0.0","description":"Build communications into your applications and AI workflows with the Bird API.\nExplore endpoints for email, SMS, WhatsApp, verification, and realtime messaging.\n\nStart with the [developer documentation](https://bird.com/docs), browse the\n[API reference](https://bird.com/docs/api), or connect your agent through the\n[Bird MCP server](https://bird.com/docs/ai/mcp-server).\n\nSetting a `User-Agent` header is recommended but not required. Official Bird\nSDKs set it automatically (format: `bird-<language>/<version>`). The header is\nused for operational logging and customer-support diagnostics; the API never\nrejects requests that omit it.\n\nRate limits are advertised on every response from a rate-limited endpoint as\nIETF `RateLimit` and `RateLimit-Policy` headers (Structured Fields per RFC\n9651; spec draft-ietf-httpapi-ratelimit-headers-11). On 429 responses, a\n`Retry-After` header in seconds is also returned. Clients should pace\nthemselves against the `r` (remaining) and `t` (seconds until reset) params\nin the `RateLimit` header rather than only reacting to 429s.\n\nThe [deprecation policy](https://bird.com/docs/api/deprecations) explains how\nthe API marks a deprecated field, query parameter, or body shape, including\nthe `Deprecation` response header (RFC 9745).\n\n"},"servers":[{"url":"https://{region}.platform.bird.com","description":"Regional API endpoint. Use the host for the region your organization is hosted in. Official Bird SDKs and the CLI select it automatically from your API key, so you rarely need to set it by hand.\n","variables":{"region":{"default":"us1","enum":["us1","eu1"],"description":"The region your organization's data is hosted in."}}},{"url":"https://platform.bird.com","description":"Region-independent endpoint for authentication and account administration."},{"url":"http://localhost:8080","description":"Local development."}],"security":[{"BearerAuth":[]}],"tags":[{"name":"workspaces","description":"Workspace management."},{"name":"realtime-apps","description":"Realtime app management."},{"name":"realtime-events","description":"Publish events to a Realtime app's channels from your server (the data plane). Sending to several channels at once broadcasts to all of them.\n"},{"name":"email-messages","description":"Send emails to recipients you address explicitly in `to`, `cc`, and `bcc`. Use this for transactional sends (receipts, password resets, alerts) and for marketing sends where you already have the recipient addresses on hand. The same endpoint accepts every content type. Set `category` to control suppression policy.\n"},{"name":"email-broadcasts","description":"Send one email to a stored audience. Create a broadcast as a draft, then send it immediately or schedule it for later; scheduled and in-progress broadcasts can be canceled. The audience's contacts at send time become the recipient set after suppressions are applied. The recipients endpoint returns each recipient's delivery state.\n"},{"name":"email-contacts","description":"Contacts are the people you send broadcasts to. Each contact is unique by email address within a workspace and carries optional name fields and custom properties for personalization. Custom properties are defined once per workspace via the contact properties API and then set per contact.\n"},{"name":"email-audiences","description":"Audiences are the recipient lists broadcasts are sent to. An audience holds a set of contacts that you manage through the API. The contacts in the audience at send time become the broadcast's recipients after suppressions are applied. A contact can belong to multiple audiences.\n"},{"name":"email-stats","description":"Email analytics, including daily and hourly delivery statistics, tag breakdowns, and a KPI summary."},{"name":"sms-messages","description":"Send SMS messages to recipients you address by phone number, and read their delivery status and lifecycle events. Each message is one recipient and one body; set `category` to control opt-out policy and per-country compliance.\n"},{"name":"sms-templates","description":"Create and publish multilingual workspace SMS templates and browse built-in templates. Published workspace versions preserve their language content; built-in versions reflect the current catalogue."},{"name":"sms-stats","description":"SMS analytics, including daily and hourly lifecycle counts, dimension breakdowns, and a KPI summary."},{"name":"sms-senders","description":"Manage your workspace's dedicated numbers and alphanumeric senders, including their registration status in each country.\n"},{"name":"verify-verifications","description":"Send a one-time passcode to a recipient and check the code they enter. Create a verification to send a passcode over email or SMS, then submit the recipient's code to verify it.\n"},{"name":"whatsapp-messages","description":"Send WhatsApp messages, whether a template, free-form content, or interactive content the recipient can tap, and read the messages your workspace sent and received, including their current delivery status and lifecycle events.\n"},{"name":"whatsapp-templates","description":"Browse the WhatsApp message templates available to your workspace, approved by Meta and ready to send.\n"},{"name":"whatsapp-stats","description":"WhatsApp analytics, including daily and hourly delivery statistics and a KPI summary."},{"name":"whatsapp-suppressions","description":"WhatsApp suppression list management."},{"name":"domains","description":"Sending domain management and DNS verification."},{"name":"email-suppressions","description":"Email suppression list management."},{"name":"email-templates","description":"Reusable email templates and their versions, with stored subject, HTML, and plain-text content you manage and reference when sending.\n"},{"name":"email-inbound-addresses","description":"Addresses generated for receiving mail. Forward a mailbox to an inbound address to parse each message into a received email.\n"},{"name":"email-inbound-messages","description":"Emails received on your behalf, including each parsed message, its body, raw MIME content, and attachments.\n"},{"name":"email-mailboxes","description":"Durable mailbox identities for agents. A mailbox owns an address, applies receive policy through allow/block rules, and remembers conversations for its retention tier.\n"},{"name":"email-inbound-routes","description":"Routing rules that direct inbound mail on your domains into mailboxes, or drop it, in priority order.\n"},{"name":"email-threads","description":"Conversations in a mailbox. Threads group related inbound and outbound messages and carry read state, labels, and participants.\n"},{"name":"email-smtp-configs","description":"Default IP pool, category, tags, and open and click tracking settings for messages submitted over SMTP with a given API key.\n"},{"name":"webhooks","description":"Webhook endpoint management."},{"name":"quotas","description":"Organization and workspace resource quotas."},{"name":"rate-limits","description":"Organization rate limits."},{"name":"access-restrictions","description":"Rules that restrict customer access by IP address or CIDR range."},{"name":"billing","description":"Billing plans, prices, and subscriptions."},{"name":"numbers","description":"Phone number catalog and purchasing."},{"name":"docs","description":"Search our developer documentation."},{"name":"voice-trunks","description":"SIP trunk management for trunks, IP allowlist entries, digest credentials, inbound gateways, and the numbers a trunk answers."},{"name":"voice-verified-numbers","description":"Register phone numbers and verify ownership before presenting them as the outbound caller ID."},{"name":"voice-numbers","description":"Every phone number your workspace can use for voice, in one list: the voice-capable numbers you hold, and the caller IDs you registered.\n"},{"name":"voice-legs","description":"Call records (CDR) for the workspace, in flight and completed."},{"name":"voice-destinations","description":"Manage the allowlist of destination countries your workspace may place Voice calls to. List every supported country with its enabled setting, and enable or disable countries.\n"},{"name":"attachments","description":"Upload the supporting documents submitted with an SMS registration: 10DLC campaign evidence or toll-free verification opt-in screenshots.\n"},{"name":"assets","description":"Upload an image once and get a permanent public URL for it, ready to embed in email.\n"},{"name":"asset-folders","description":"Organize the media library into folders. Folders are never part of an asset's URL, so rearranging them never breaks a message that already embeds one.\n"},{"name":"whatsapp-numbers","description":"Connect phone numbers from Meta's embedded signup flow and check their WhatsApp setup status.\n"},{"name":"whatsapp-business-accounts","description":"Read the WhatsApp Business Accounts your workspace has connected, so a template can be created on the account you choose.\n"},{"name":"compliance","description":"Registration requirements for regulated sending programs, the submissions you make against them, and the supporting documents you upload as evidence.\n"},{"name":"sms-keyword-rules","description":"Manage the response when someone sends a keyword to one of your numbers. Each supported country starts with opt-out, opt-in, and help keywords. Create a rule to replace a default response or add campaign keywords.\n"},{"name":"lookup","description":"Inspect a recipient before sending. Phone-number lookups return carrier, portability, number type, reachability, roaming, SIM-change, and fraud-risk data when requested. Email lookups return deliverability, confidence, failure reasons, and suggested corrections for likely misspellings.\n"},{"name":"sms-suppressions","description":"Sender and subscriber pairs that block SMS delivery."},{"name":"email-competitive","description":"Watch competitor brands and see how their email compares with yours. Figures about a competitor are estimates from an email panel, which observes a sample of real inboxes; figures about your own sending are counted rather than estimated wherever that is possible.\n"},{"name":"esim-zones","description":"eSIM coverage zones. The country footprints offers sell, each maintained in one place."},{"name":"esim-offers","description":"Prepaid travel eSIM offers. Commercial terms (allowance, validity, pricing) over a coverage zone."},{"name":"esims","description":"Prepaid travel eSIMs. Order, install, top up, and manage data connectivity for travelers."},{"name":"preferences","description":"Stated messaging preferences (consent grants and opt-outs) recorded per handle across email, SMS, and WhatsApp, with causally ordered writes."},{"name":"email-inbox-insights","description":"Inbox placement, seed tests, and sending reputation for the workspace's\nown sending domains, measured from a panel of real mailboxes.\n\nRates here are percentages carrying a `_percent` suffix (`87.4`).\nCompetitive Insights reports the same kind of figure as a fraction\n(`0.874`), so a client reading both products scales one of them.\n"},{"name":"whatsapp-groups","description":"WhatsApp groups your business creates and administers: their invite links, who is in them, and the requests to join them.\n"},{"name":"amb-messages","description":"Send Apple Messages for Business messages into a conversation a customer opened, and read the messages your workspace sent and received, including their status and lifecycle events.\n"},{"name":"amb-conversations","description":"The conversations customers opened with your business: their messages, who is working each one, and the labels and read state an operator sets.\n"},{"name":"amb-business-accounts","description":"The Apple Messages for Business brand record your workspace sends as, its approval state, and the channel settings and landing page Apple requires.\n"},{"name":"amb-routing-rules","description":"Rules that put a new conversation in a queue, matched on the entry point's group and intent.\n"},{"name":"amb-suppressions","description":"Customers who have opted out of messages from one of your Apple Messages for Business brands.\n"},{"name":"amb-stats","description":"Apple Messages for Business analytics: outbound and inbound volume, conversation activity, processing latency, and first response time.\n"},{"name":"amb-templates","description":"Create and publish multilingual workspace Apple Messages templates and browse built-in templates. Published workspace versions preserve their language content; built-in versions reflect the current catalogue."},{"name":"whatsapp-agent-notifications","description":"The notifications you send a WhatsApp agent about one contact: something that happened in your systems that the agent may write to them about, and what came of each.\n"},{"name":"voice-calls","description":"One navigational entry per call and every leg that belongs to it, with whether it produced a recording or a transcript."},{"name":"whatsapp-keyword-rules","description":"What happens when someone replies STOP or START to a WhatsApp message: the keywords Bird ships, the keywords you add, and the replies you send back.\n"},{"name":"whatsapp-conversations","description":"Your WhatsApp conversations: who answers each one, what is unread, when its service window closes, and the messages in it.\n"},{"name":"sms-messaging-profiles","description":"Group the senders, reply numbers, and sending defaults for one SMS program into a messaging profile."},{"name":"voice-ring-groups","description":"Ring groups, the sets of workspace users an inbound call rings in the browser phone."},{"name":"email-seeding","description":"Manage automatic seeding settings and the workspace trigger address, read run and source activity, and cancel future seed admissions."},{"name":"asset-uploads","description":"Upload media through temporary file-transfer instructions, then publish it in the media library."},{"name":"labels","description":"The workspace's label catalogue. Each label carries a name, a colour and a description of when to apply it."},{"name":"email-blocks","description":"Author reusable email sections, manage their exact-language drafts, and read retained published revisions."}],"paths":{"/v1/docs/search":{"get":{"operationId":"getDocsSearch","summary":"Get documentation search results","description":"Searches the documentation and returns matching sections, best match first. Each result links to its section heading and includes the page's `slug`; read the full page with `GET /v1/docs/pages`.\n\nNo authentication is required. A blank query returns `400`, and `503` means search is temporarily unavailable.\n","tags":["docs"],"security":[],"x-audiences":["public","command"],"parameters":[{"name":"q","in":"query","required":true,"description":"The text to search the documentation for. Must not be blank.","schema":{"type":"string","minLength":1}},{"name":"locale","in":"query","required":false,"description":"Documentation locale to search, as a language-region code such as `en-us`. Defaults to `en-us` when omitted or unavailable.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of results to return (1–25).","schema":{"type":"integer","minimum":1,"maximum":25,"default":10}},{"name":"contents","in":"query","required":false,"description":"How much of each matching section to return. `snippet` (the default) returns a short preview; `highlights` additionally returns the passages that match the query. For the full text, fetch a result's `markdown_url`.","schema":{"type":"string","enum":["snippet","highlights"],"default":"snippet"}}],"responses":{"200":{"description":"Ranked search results.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsSearchResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n"]}},"/v1/docs/pages":{"get":{"operationId":"getDocsPage","summary":"Get a documentation page","description":"Returns Markdown content of a documentation page. The default `full` view includes all sections. For API references, `request` omits code samples and response sections; `response` omits code samples and request parameters and body. Both focused views retain the operation description, servers and authentication. Other pages return their full content for every view. Get its `slug` from `GET /v1/docs/search`, or pass `index` for the documentation landing page.\n\nNo authentication is required. An unknown slug returns `404`, and `503` means the documentation backend is temporarily unavailable.\n","tags":["docs"],"security":[],"x-audiences":["public","command"],"parameters":[{"name":"slug","in":"query","required":true,"description":"Slug of the page to read, as returned in the `slug` field of a search result (for example `guides/email/contacts`). Use `index` for the documentation landing page.","schema":{"type":"string","minLength":1}},{"name":"view","in":"query","required":false,"description":"Sections to read from an API reference. Other documentation pages return full content for every view. Defaults to `full`.","schema":{"type":"string","enum":["full","request","response"],"default":"full"}},{"name":"locale","in":"query","required":false,"description":"Documentation locale to read, as a language-region code such as `en-us`. Defaults to `en-us` when omitted or unavailable.","schema":{"type":"string"}}],"responses":{"200":{"description":"The documentation page content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n"]}},"/v1/workspace":{"get":{"operationId":"getCurrentWorkspace","summary":"Get the current workspace","description":"Returns the workspace the current credentials are scoped to: its ID, name, the ID of the organization that owns it, and its notification and logo settings. The organization's own name and members are not included. Requires at least read access to the workspace.\n","tags":["workspaces"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"workspace.get","responses":{"200":{"description":"The current workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/workspace/rate-limits":{"get":{"operationId":"listWorkspaceRateLimits","summary":"List workspace rate limits","description":"Only relevant to organizations with several workspaces, or one left with a workspace limit or enabled allocation after a deletion. When deleting workspaces leaves one, its manual limits apply until removed or expired, and enabled allocation continues. Without an active manual limit or allocation, one workspace uses the shared organization limit.\n\nReturns every rate-limit policy as it applies to the current workspace: the organization limit shared by\nall workspaces, any manual or automatic workspace limit, and the remaining capacity observed in the\ncurrent window.\n\nA workspace limit is not reserved capacity. A request is refused when either the organization\nlimit or the workspace limit is reached. When usage cannot be read, `usage.status` is `unavailable` and\nthe remaining counts are `null`. `usage.workspace_remaining` is also `null` when neither a manual nor\nan automatic limit applies, or `attribution.status` is not `ready`, so check `usage.status` before treating `null`\nas a failed read.\n\nRate limits are served from the organization's home region. A request sent to another region returns `421 Misdirected Request`; retry it on that region's host.\n","tags":["rate-limits"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"workspace.rateLimits.list","responses":{"200":{"description":"The workspace's rate-limit policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceRateLimitList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"421":{"$ref":"#/components/responses/MisdirectedRequest"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/workspace/quotas":{"get":{"operationId":"listWorkspaceQuotas","summary":"List workspace quotas","description":"Returns each resource and value quota as it applies to the current workspace: the organization limit shared by\nall workspaces, the workspace's own limit when one is set, and this workspace's current usage.\nOrganization usage and shared remaining capacity are withheld: `organization_used`,\n`organization_remaining` and `remaining` are always `null` on this endpoint.\n\nA workspace limit is a ceiling, not reserved capacity. Each quota's `enforcement` says how both limits apply:\n`create` refuses a creation that would pass either one, `outbound_send` refuses outbound sends once the bytes\nalready held reach either one, and `value` bounds a setting when it is chosen. `usage` is `null` for a `value`\nquota. When usage cannot be read, `usage.status` is `unavailable` and the counts are `null`.\n","tags":["quotas"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"workspace.quotas.list","responses":{"200":{"description":"The workspace's quotas.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceQuotaList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/organization/workspaces":{"post":{"operationId":"createWorkspace","x-snippet-key":"organization.workspaces.create","summary":"Create a workspace","description":"Creates a workspace in the caller's organization. The caller needs organization workspace write access, which organization master keys and signed-in organization owners and administrators have, as do CLI or MCP access tokens they authorize with that access. Workspace API keys cannot create workspaces. The organization's workspace limit counts every workspace it holds, including workspaces awaiting permanent deletion, and a request beyond the limit fails with `E10014`.","tags":["workspaces"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceCreate"}}}},"responses":{"201":{"description":"The newly created workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"get":{"operationId":"listWorkspaces","x-snippet-key":"organization.workspaces.list","summary":"List workspaces","description":"Returns a paginated list of workspaces in the organization, ordered by creation date descending by default. Organization master keys and authorized CLI or MCP access tokens need organization workspace read access. Workspace API keys cannot list the organization's workspaces.","tags":["workspaces"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"name","in":"query","required":false,"description":"Substring match against the workspace name (case-insensitive).","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by `created_at` or `name`. Defaults to `created_at`.","schema":{"$ref":"#/components/schemas/WorkspaceSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The organization's workspaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationWorkspaceList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/organization/workspaces/{workspace_id}":{"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/WorkspaceID"},"description":"Workspace identifier. Starts with `ws_`."}],"get":{"operationId":"getOrganizationWorkspace","x-snippet-key":"organization.workspaces.get","summary":"Get a workspace in the organization","description":"Returns any workspace in the organization by ID. Organization administrators can read workspaces without holding a workspace-level role. Organization master keys and authorized CLI or MCP access tokens need organization workspace read access. Workspace API keys cannot call this operation.","tags":["workspaces"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"responses":{"200":{"description":"The requested workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateOrganizationWorkspace","x-snippet-key":"organization.workspaces.update","summary":"Update a workspace in the organization","description":"Updates mutable fields on any workspace in the organization by ID. Organization administrators can manage workspaces without holding a workspace-level role. Organization master keys and authorized CLI or MCP access tokens need organization workspace write access. Workspace API keys cannot call this operation.","tags":["workspaces"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationWorkspaceUpdate"}}}},"responses":{"200":{"description":"The workspace with the updated fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteOrganizationWorkspace","x-snippet-key":"organization.workspaces.delete","summary":"Delete a workspace in the organization","description":"Deletes the workspace. Access ends immediately: the workspace is hidden and its API keys are revoked. Its data and configuration are retained for 7 days and can be restored by contacting support within that window, after which everything is permanently purged. Returns a conflict if this is the organization's only workspace or a retained receiving claim depends on it. Receiving dependencies are checked before the workspace is hidden or its keys are revoked. Disable receiving for the affected domain in this workspace, poll it until `capabilities.inbound.status` is `not_configured`, then retry deletion. Failed or pending receiving claims still block deletion. Organization master keys and authorized CLI or MCP access tokens need organization workspace write access. Workspace API keys cannot call this operation.\n","tags":["workspaces"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The workspace is scheduled for permanent deletion."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/organization/workspaces/{workspace_id}/whatsapp/numbers":{"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/WorkspaceID"},"description":"The workspace the number belongs to. Starts with `ws_`."}],"post":{"operationId":"createOrganizationWorkspaceWhatsAppNumber","x-snippet-key":"organization.workspaces.whatsapp_numbers.create","summary":"Connect a number from your multi-partner solution","description":"Connects a number that your own Embedded Signup onboarded through your\nmulti-partner solution with Bird. Bird confirms that the WhatsApp Business\nAccount came through your solution and holds the number, then sets the\nnumber up in the workspace you name. Checking that your customer owns the\naccount is up to you.\n\nSetup continues in the background. Poll the returned number in the same\nworkspace, which an organization credential has to select explicitly. It\ncan send once its status is `connected`, and\n`failed` means setup stopped, with `error` saying why. Calling\nagain for a number already connected in the workspace runs its setup again,\nand the number cannot send until it reconnects.\n\nCall it with an organization credential: a master key, or a signed-in\nowner or organization admin. A workspace API key or a workspace member\ngets a 403. Only organizations with an active multi-partner solution can\ncall this.\nAn organization not enabled for multi-partner solutions gets a 403 and\nconnects numbers with Embedded Signup in the Bird dashboard. An enabled one\nwhose solution is not active, because it has none yet or Bird is still\nreviewing it, gets a 409.\n","tags":["whatsapp-numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationWorkspaceWhatsAppNumberCreate"},"example":{"waba":"102290129340398","meta_phone_number_id":"109364591979012","name":"Northwind Support"}}}},"responses":{"202":{"description":"The number was accepted and is being set up with WhatsApp.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppNumber"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["sdk"]}},"/v1/realtime/regions":{"get":{"operationId":"listRealtimeRegions","x-snippet-key":"none","summary":"List Realtime regions","description":"Returns the regions a Realtime app can be created in. Use one of these identifiers as the `region` when creating an app.","tags":["realtime-apps"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The available Realtime regions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeRegionList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n"]}},"/v1/realtime/apps":{"post":{"operationId":"createRealtimeApp","x-snippet-key":"none","summary":"Create a Realtime app","description":"Provisions a new Realtime app for the workspace and returns it with the initial key. Store the key secret when you receive it because later responses do not include it. If you lose the secret, create a new key and revoke this one.","tags":["realtime-apps"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeAppCreate"}}}},"responses":{"201":{"description":"Realtime app created. Includes the initial key's one-time secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeAppCreated"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n"]},"get":{"operationId":"listRealtimeApps","x-snippet-key":"none","summary":"List Realtime apps","description":"Returns the workspace's Realtime apps as a paginated list, filterable by a case-insensitive `name` substring. Each entry carries the app's configuration and connection details (`app_id`, `region`) but never key secrets. Use [List a Realtime app's keys](/docs/api/reference/list-realtime-app-keys) and [Create a Realtime app key](/docs/api/reference/create-realtime-app-key) to manage them.\n","tags":["realtime-apps"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"name","in":"query","required":false,"description":"Substring match against the app name (case-insensitive).","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Field to sort by.","schema":{"$ref":"#/components/schemas/RealtimeAppSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of Realtime apps.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeAppList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","n8n"]}},"/v1/realtime/apps/{realtime_app_id}":{"parameters":[{"name":"realtime_app_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RealtimeAppID"},"description":"ID of the Realtime app (`rap_` prefix), as returned when the app was created."}],"get":{"operationId":"getRealtimeApp","x-snippet-key":"none","summary":"Get a Realtime app","description":"Returns a single Realtime app with its configuration and connection details (`app_id`, `region`). Key secrets are never included; use [List a Realtime app's keys](/docs/api/reference/list-realtime-app-keys) to manage them. Returns a `404 Not Found` error if the app does not exist in the workspace.\n","tags":["realtime-apps"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"Realtime app with its current configuration and status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeApp"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n"]},"patch":{"operationId":"updateRealtimeApp","x-snippet-key":"none","summary":"Update a Realtime app","description":"Updates a Realtime app's name and configuration flags. Region is immutable; TLS is always enforced. Omitted fields are left unchanged.","tags":["realtime-apps"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeAppUpdate"}}}},"responses":{"200":{"description":"The updated Realtime app.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeApp"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n"]},"delete":{"operationId":"deleteRealtimeApp","x-snippet-key":"none","summary":"Delete a Realtime app","description":"Permanently deletes the app: disconnects all clients and removes its keys and configuration. This cannot be undone.","tags":["realtime-apps"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The app was deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n"]}},"/v1/realtime/apps/{realtime_app_id}/events":{"parameters":[{"name":"realtime_app_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RealtimeAppID"},"description":"ID of the Realtime app (`rap_` prefix), as returned when the app was created."}],"post":{"operationId":"publishRealtimeAppEvent","x-snippet-key":"realtime.publish","summary":"Publish a Realtime event","description":"Publishes an event to one or more channels of a Realtime app. Listing several channels broadcasts the event to all of them in one call. Connected clients subscribed to those channels receive it in real time.","tags":["realtime-events"],"security":[{"BearerAuth":[],"RealtimeKey":[],"RealtimeSecret":[]},{"CookieAuth":[],"RealtimeKey":[],"RealtimeSecret":[]}],"x-audiences":["public"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimePublish"},"examples":{"onboarding-realtime":{"summary":"The first publish from the dashboard's onboarding step","value":{"event":"order-updated","channels":["orders"],"data":{"id":42,"status":"shipped"}}}}}}},"responses":{"200":{"description":"The event was accepted for delivery.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimePublishResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["sdk"]}},"/v1/realtime/apps/{realtime_app_id}/batch-events":{"parameters":[{"name":"realtime_app_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RealtimeAppID"},"description":"ID of the Realtime app (`rap_` prefix), as returned when the app was created."}],"post":{"operationId":"publishRealtimeAppBatch","x-snippet-key":"realtime.publishBatch","summary":"Publish a batch of Realtime events","description":"Publishes up to 10 events (each to one channel) in a single request.","tags":["realtime-events"],"security":[{"BearerAuth":[],"RealtimeKey":[],"RealtimeSecret":[]},{"CookieAuth":[],"RealtimeKey":[],"RealtimeSecret":[]}],"x-audiences":["public"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeBatchPublish"}}}},"responses":{"200":{"description":"The events were accepted for delivery.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeBatchPublishResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["sdk"]}},"/v1/realtime/apps/{realtime_app_id}/channels":{"parameters":[{"name":"realtime_app_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RealtimeAppID"},"description":"ID of the Realtime app (`rap_` prefix), as returned when the app was created."}],"get":{"operationId":"listRealtimeAppChannels","x-snippet-key":"realtime.channels.list","summary":"List Realtime channels","description":"Lists the app's currently occupied channels, optionally filtered by name prefix.","tags":["realtime-events"],"security":[{"BearerAuth":[],"RealtimeKey":[],"RealtimeSecret":[]},{"CookieAuth":[],"RealtimeKey":[],"RealtimeSecret":[]}],"x-audiences":["public"],"parameters":[{"name":"prefix","in":"query","required":false,"description":"Only channels whose name starts with this prefix (for example, `presence-`).","schema":{"type":"string"}},{"name":"include","in":"query","required":false,"description":"Per-channel attributes to include. Repeatable. Requesting `member_count` without a presence-channel `prefix`, or `connection_count` when the app's connection-counting flag is off, returns a validation error (400).","schema":{"type":"array","items":{"$ref":"#/components/schemas/RealtimeChannelInclude"}}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The occupied channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeChannelsList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["sdk"]}},"/v1/realtime/apps/{realtime_app_id}/channels/{channel_name}":{"parameters":[{"name":"realtime_app_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RealtimeAppID"},"description":"ID of the Realtime app (`rap_` prefix), as returned when the app was created."},{"name":"channel_name","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RealtimeChannelName"},"description":"Name of the Realtime channel to retrieve."}],"get":{"operationId":"getRealtimeAppChannel","x-snippet-key":"realtime.channels.get","summary":"Get a Realtime channel","description":"Returns a single channel's occupancy and optional counts. A channel appears when its first connection subscribes and disappears when its last connection leaves. An unknown or unused name returns `200 OK` with `occupied: false`.","tags":["realtime-events"],"security":[{"BearerAuth":[],"RealtimeKey":[],"RealtimeSecret":[]},{"CookieAuth":[],"RealtimeKey":[],"RealtimeSecret":[]}],"x-audiences":["public"],"parameters":[{"name":"include","in":"query","required":false,"description":"Attributes to include. Repeatable. Requesting `member_count` for a non-presence channel, or `connection_count` when the app's connection-counting flag is off, returns a validation error (400).","schema":{"type":"array","items":{"$ref":"#/components/schemas/RealtimeChannelInclude"}}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The channel state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeChannelInfo"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["sdk"]}},"/v1/realtime/apps/{realtime_app_id}/channels/{channel_name}/members":{"parameters":[{"name":"realtime_app_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RealtimeAppID"},"description":"ID of the Realtime app (`rap_` prefix), as returned when the app was created."},{"name":"channel_name","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RealtimeChannelName"},"description":"Name of the presence channel whose members to list."}],"get":{"operationId":"listRealtimeAppChannelMembers","x-snippet-key":"realtime.channels.members","summary":"List members on a presence channel","description":"Lists the member IDs currently subscribed to a presence channel. IDs only: `member_info` (the profile data attached by your authorization endpoint) is delivered to subscribed clients over the realtime connection and is not available over REST.","tags":["realtime-events"],"security":[{"BearerAuth":[],"RealtimeKey":[],"RealtimeSecret":[]},{"CookieAuth":[],"RealtimeKey":[],"RealtimeSecret":[]}],"x-audiences":["public"],"responses":{"200":{"description":"The members on the presence channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeChannelMembers"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["sdk"]}},"/v1/realtime/apps/{realtime_app_id}/members/{member_id}/disconnect":{"parameters":[{"name":"realtime_app_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RealtimeAppID"},"description":"ID of the Realtime app (`rap_` prefix), as returned when the app was created."},{"name":"member_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RealtimeMemberID"},"description":"Member ID whose connections to disconnect."}],"post":{"operationId":"disconnectRealtimeAppMember","x-snippet-key":"realtime.members.disconnect","summary":"Disconnect a member","description":"Disconnects all of a member's active connections, for example on sign-out or ban.","tags":["realtime-events"],"security":[{"BearerAuth":[],"RealtimeKey":[],"RealtimeSecret":[]},{"CookieAuth":[],"RealtimeKey":[],"RealtimeSecret":[]}],"x-audiences":["public"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The member's connections were disconnected."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["sdk"]}},"/v1/realtime/apps/{realtime_app_id}/members/{member_id}/events":{"parameters":[{"name":"realtime_app_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RealtimeAppID"},"description":"ID of the Realtime app (`rap_` prefix), as returned when the app was created."},{"name":"member_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RealtimeMemberID"},"description":"The member to deliver the event to."}],"post":{"operationId":"sendRealtimeAppMemberEvent","x-snippet-key":"realtime.members.send","summary":"Send an event to a member","description":"Delivers an event to one member of a Realtime app, addressing the person\nrather than a channel. Every connection that member currently holds receives\nit across tabs and devices, without requiring a dedicated channel.\n\nThe member must have signed in on the connection for it to be addressable.\nDelivery is best-effort and not queued. A member with no active connections\nat the time of the call does not receive the event.","tags":["realtime-events"],"security":[{"BearerAuth":[],"RealtimeKey":[],"RealtimeSecret":[]},{"CookieAuth":[],"RealtimeKey":[],"RealtimeSecret":[]}],"x-audiences":["public"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeMemberPublish"}}}},"responses":{"204":{"description":"The event was accepted for delivery. No body: a member has no channel occupancy or counts to report, and whether they hold connections is not something a publish can confirm."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["sdk"]}},"/v1/realtime/apps/{realtime_app_id}/keys":{"parameters":[{"name":"realtime_app_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RealtimeAppID"},"description":"ID of the Realtime app (`rap_` prefix), as returned when the app was created."}],"get":{"operationId":"listRealtimeAppKeys","x-snippet-key":"none","summary":"List a Realtime app's keys","description":"Returns the app's keys, oldest first. Non-revoked only by default; pass include_revoked=true to include revoked keys. An app can hold several keys at once (create a new key, roll it out, then revoke the old one for zero-downtime rotation). Secrets are never included in this response.","tags":["realtime-apps"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"include_revoked","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"When true, include revoked keys in the response."},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The app's keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeAppKeyList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","n8n"]},"post":{"operationId":"createRealtimeAppKey","x-snippet-key":"none","summary":"Create a Realtime app key","description":"Adds a new key to the app and returns it with its secret. Store the secret when you receive it because later responses do not include it. Use this together with revoke for zero-downtime rotation: add a key, roll it out across your clients, then revoke the old key.","tags":["realtime-apps"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"201":{"description":"Key created. Includes the one-time secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeAppKey"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n"]}},"/v1/realtime/apps/{realtime_app_id}/keys/{realtime_app_key_id}/revoke":{"parameters":[{"name":"realtime_app_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RealtimeAppID"},"description":"ID of the Realtime app (`rap_` prefix), as returned when the app was created."},{"name":"realtime_app_key_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RealtimeAppKeyID"},"description":"ID of the Realtime app key (`rak_` prefix), as returned when the key was created."}],"post":{"operationId":"revokeRealtimeAppKey","x-snippet-key":"none","summary":"Revoke a Realtime app key","description":"Revokes a key immediately and returns it with `revoked_at` set. Clients that still use the key can no longer authenticate. An already revoked key returns `409`. The app's only key cannot be revoked and returns `422`.","tags":["realtime-apps"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Key revoked. Returns the updated key with `revoked_at` set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeAppKey"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n"]}},"/v1/email/messages":{"post":{"operationId":"createEmailMessage","summary":"Create an email message","description":"Sends an email to the recipients you list explicitly in `to`/`cc`/`bcc`. Use it for\ntransactional sends (receipts, password resets, alerts) and for marketing sends where\nyou have the recipient addresses on hand. To submit many independent messages in one\nrequest, use [Create a batch of email messages](/docs/api/reference/create-email-message-batch)\ninstead. The `category` field controls suppression policy independently of content:\nset it to `marketing` when sending marketing content.\n\nFor a published template, supply caller values in `template.parameters`.\nContact IDs are not recipient addresses.\n\nWhen the selected template language reads contact attributes, Bird looks up\neach To address in this workspace and saves the referenced values at\nacceptance. Each To receives its own personalized email; Cc and Bcc receive\na copy of each To's email and do not need matching contacts. A To address\nwithout a matching contact rejects the request with `422` (`E04099`), even\nif Liquid supplies a default. Existing contacts may have empty name fields.\nThis also applies to scheduled sends. Templates without contact attributes\nkeep the usual recipient behavior.\n\nThe `202` response means the message is safely accepted and awaiting delivery.\nFetch it by `id` or subscribe to webhook events to follow delivery. The\nrequest never half-succeeds: an unverified sender domain or any field-level\nvalidation failure rejects it immediately with a `422` naming the reason.\nSuppression is evaluated per recipient after acceptance, so a suppressed recipient\nappears as `rejected` on the message's recipient list rather than as a synchronous\nerror. New workspaces can send from the shared onboarding domain before verifying\ntheir own. The [quickstart](/docs/get-started/send-your-first-email) covers its\nrecipient and volume limits.\n","tags":["email-messages"],"x-audiences":["public","command"],"x-snippet-key":"email.send","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMessageSendRequest"},"examples":{"quickstart-first-email":{"summary":"The smallest send that works, from the getting-started guide","value":{"from":{"email":"onboarding@messagebird.dev","name":"Bird"},"to":[{"email":"delivered@messagebird.dev"}],"subject":"Hello from Bird","html":"<p>My first Bird email.</p>"}},"send-minimal":{"summary":"A minimal send: one sender, one recipient, one body","value":{"from":{"email":"hello@yourdomain.com"},"to":[{"email":"delivered@messagebird.dev"}],"subject":"Hello from Bird","html":"<p>It works.</p>"}},"send-template":{"summary":"A send that renders a stored template with parameters","value":{"from":{"email":"hello@yourdomain.com"},"to":[{"email":"delivered@messagebird.dev"}],"category":"transactional","template":{"slug":"welcome-email","parameters":{"first_name":"Jane"}}}},"send-from-ip-pool":{"summary":"A send routed through a named dedicated IP pool","value":{"from":{"email":"noreply@yourdomain.com"},"to":[{"email":"delivered@messagebird.dev"}],"subject":"Your receipt","html":"<p>Thanks for your order.</p>","ip_pool_id":"ipp_1btmn1nnkd8y6a4jckbkvvt9eh"}},"send-sandbox-bounce":{"summary":"A send to the sandbox address that always hard-bounces","value":{"from":{"email":"onboarding@messagebird.dev"},"to":[{"email":"bounce+signup-flow@messagebird.dev"}],"subject":"Sandbox bounce test","html":"<p>This message will hard-bounce.</p>","tags":[{"name":"flow","value":"signup"}],"metadata":{"test_run":"docs-capture-1"}}},"quickstart":{"summary":"A first send on a new workspace","value":{"from":{"email":"onboarding@messagebird.dev","name":"Bird"},"to":["delivered@messagebird.dev"],"subject":"Welcome to Bird","html":"<p>You are in.</p>"}},"onboarding-email":{"summary":"The first send from the dashboard's onboarding step","value":{"from":{"email":"onboarding@messagebird.dev","name":"Bird"},"to":["delivered@messagebird.dev"],"subject":"Hello World","html":"<p>You made your <strong>first email fly</strong>. Congratulations!</p>"}}}}}},"responses":{"202":{"description":"Message accepted for asynchronous delivery.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMessage"},"example":{"id":"em_01krdgeqcxet5s7t44vh8rt9mg","from":{"email":"onboarding@messagebird.dev","name":"Bird"},"to":[{"email":"delivered@messagebird.dev"}],"subject":"Hello from Bird","category":"transactional","status":"accepted","accepted_count":1,"processed_count":0,"delivered_count":0,"bounced_count":0,"complained_count":0,"deferred_count":0,"rejected_count":0,"open_count":0,"click_count":0,"track_opens":false,"track_clicks":false,"created_at":"2026-07-01T12:00:00Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["attio","cli","make","mcp","medusa","n8n","sdk"]},"get":{"operationId":"listEmailMessages","summary":"List messages","description":"Returns the workspace's sent and scheduled messages, newest first, as a cursor page. Each item has the aggregate delivery `status` and per-state recipient counts. Message bodies are omitted.\n\nCombine filters to narrow the page:\n\n- Delivery status.\n- Category.\n- Tag.\n- The broadcast that sent the messages.\n- An exact `to` or `from` address.\n- A `created_after` or `created_before` time window.\n","tags":["email-messages"],"x-audiences":["public","command"],"x-snippet-key":"email.list.iterate","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/CreatedAfter"},{"$ref":"#/components/parameters/CreatedBefore"},{"name":"broadcast_id","in":"query","required":false,"description":"Filter messages by broadcast ID.","schema":{"$ref":"#/components/schemas/EmailBroadcastID"}},{"name":"status","in":"query","required":false,"description":"Filter by aggregate delivery status.","schema":{"$ref":"#/components/schemas/EmailMessageStatus"}},{"$ref":"#/components/parameters/TagFilter"},{"$ref":"#/components/parameters/MessageReferenceFilter"},{"name":"category","in":"query","required":false,"description":"Filter by category.","schema":{"$ref":"#/components/schemas/EmailMessageCategory"}},{"name":"to","in":"query","required":false,"description":"Filter by recipient address. Exact match against any `to`/`cc`/`bcc` recipient on the message. The address is normalized to lowercase before comparison.\n","schema":{"type":"string","format":"email","example":"delivered@messagebird.dev"}},{"name":"from","in":"query","required":false,"description":"Filter by sender address. Exact match against the message `from` field. The address is normalized to lowercase before comparison.\n","schema":{"type":"string","format":"email","example":"noreply@acme.com"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of messages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMessageList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["attio","cli","mcp","n8n","sdk"]}},"/v1/email/batches":{"post":{"operationId":"createEmailMessageBatch","summary":"Create a batch of email messages","description":"Accepts up to 100 independent email messages and queues them for delivery.\nAll items are validated before any are queued: if one fails validation, the\nentire batch is rejected. Field-level validation failures and business-rule\nfailures, such as sending from a domain that is not verified, both return\n`422`. An item can set `scheduled_at` to send it later, on the same terms as\na single scheduled send, and one batch can mix scheduled and immediate\nmessages. Cancel a scheduled item before it sends with\n[Cancel an email message](/docs/api/reference/cancel-email-message).\nSuppression is evaluated per recipient after acceptance, never as a\nsynchronous error. The `202` response returns one entry per message in\nsubmission order, each with its own `id` you can use to fetch that message\nor match it against webhook events. Attachments are allowed per message.\nEach message must stay within the 20 MB estimated generated message-size\ncap, and the serialized JSON request body for the whole batch has a hard\n20 MB cap.\nSupply caller values in `template.parameters` for each message.\n\nTemplate sends support contact attributes on the same terms as individual\nsends. Each To receives its own personalized email, and Cc and Bcc receive a\ncopy for each To. Copies do not need matching contacts. If a To address has\nno matching contact when the template reads contact attributes, the entire\nbatch is rejected with `422` (`E04099`) before any item is accepted. Liquid\ndefaults do not waive that requirement. Values are saved at acceptance,\nincluding for scheduled items.\n","tags":["email-messages"],"x-audiences":["public","command"],"x-snippet-key":"email.sendBatch","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMessageBatchRequest"}}}},"responses":{"202":{"description":"Batch accepted for asynchronous delivery.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMessageBatchResponse"},"example":{"data":[{"id":"em_01krdgeqcxet5s7t44vh8rt9mg","status":"accepted","category":"marketing","requested_language":"pt-BR","resolved_language":"pt-BR","template_id":"emt_01krdgeqcxet5s7t44vh8rt9mg","template_version_id":"emv_01krdgeqcxet5s7t44vh8rt9mg"},{"id":"em_01krdgeqcxet5s7t44vh8rt9mh","status":"accepted","category":"transactional","scheduled_at":"2026-05-22T09:00:00Z"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/messages/{message_id}":{"get":{"operationId":"getEmailMessage","summary":"Get a message","description":"Returns a single message with its aggregate delivery `status` and per-state recipient counts. The response never includes the `html`/`text` bodies. When content storage is enabled for the send, fetch the stored bodies with [Get stored message content](/docs/api/reference/get-email-message-content). Per-recipient statuses and the event timeline are separate sub-resources.\n","tags":["email-messages"],"x-audiences":["public","command"],"x-snippet-key":"email.get","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"description":"ID of the message to fetch. A broadcast records one message per recipient, and [List email messages](/docs/api/reference/list-email-messages) returns those copies alongside ordinary sends. For a single send, this is the message's own ID, from the send response's `id` field.","schema":{"$ref":"#/components/schemas/EmailID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Message object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMessage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/messages/{message_id}/cancel":{"post":{"operationId":"cancelEmailMessage","summary":"Cancel a scheduled message","description":"Cancels a message that was scheduled with `scheduled_at` before it sends. Only a message that is still scheduled can be canceled. A message that already started sending, was delivered, or was previously canceled returns a conflict error. The message's status becomes `canceled` and an `email.canceled` webhook event fires. Canceling does not return consumed scheduled-send quota.\n","tags":["email-messages"],"x-audiences":["public","command"],"x-snippet-key":"email.cancel","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"description":"ID of the scheduled message to cancel, from the send response's `id` field.","schema":{"$ref":"#/components/schemas/EmailID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The message is canceled and no longer eligible to send."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/messages/{message_id}/recipients":{"get":{"operationId":"listEmailMessageRecipients","x-snippet-key":"email.recipients","summary":"List recipients of a message","description":"Returns the message's per-recipient delivery state as a cursor page: each entry is\none `to`/`cc`/`bcc` recipient with its role, current `status`, rejection or bounce\ndetail when delivery failed, and open/click counts. Use it to see which specific\naddresses failed when the aggregate message `status` is mixed (for example\n`partial_failure`).\n\nThis works for every email message, including one a broadcast sent. A broadcast\nrecords one message per recipient, so such a message has exactly one recipient\nhere: the address its copy went to.\n\nTemplate messages with recipient snapshots include each recipient's accepted\nsubject, even when body storage is disabled or the message is still scheduled.\nPass the recipient's `id` as `recipient_id` when reading that message's content.\n","tags":["email-messages"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"description":"ID of the message whose recipients to list. A broadcast records one message per recipient, and [List email messages](/docs/api/reference/list-email-messages) returns those copies alongside ordinary sends. For a single send, this is the message's own ID, from the send response's `id` field.","schema":{"$ref":"#/components/schemas/EmailID"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of recipients for this message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailRecipientList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/messages/{message_id}/events":{"get":{"operationId":"listEmailMessageEvents","summary":"List events for a message","description":"Returns the message's per-recipient event timeline, oldest first, as a cursor page. Lifecycle, failure, and engagement events interleave as they happen, and engagement events (`email.opened`, `email.clicked`) can repeat per recipient. Filter to one event type with `type`. For each recipient's current state rather than its history, use [List recipients of a message](/docs/api/reference/list-email-message-recipients).\n","tags":["email-messages"],"x-audiences":["public"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"description":"ID of the message whose timeline to read. A broadcast records one message per recipient, and [List email messages](/docs/api/reference/list-email-messages) returns those copies alongside ordinary sends. For a single send, this is the message's own ID, from the send response's `id` field.","schema":{"$ref":"#/components/schemas/EmailID"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"type","in":"query","required":false,"description":"Filter by event type, for example `email.bounced` or `email.opened`.","schema":{"$ref":"#/components/schemas/EmailEventType"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated event timeline for this message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailEventList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["n8n"]}},"/v1/email/messages/{message_id}/content":{"get":{"operationId":"getEmailMessageContent","x-snippet-key":"email.content","summary":"Get stored message content","description":"Returns the stored HTML and text bodies for a sent message. Content storage must be enabled for the message. Content is available for up to 30 days after sending. A broadcast message can return `404` even when workspace content storage is enabled. Verify email previews preserve the message with the verification code masked. A `404` indicates content is unavailable for this message. A scheduled send of a workspace template, rather than a built-in one, stores its content when it sends, so it answers `404` until then. A `425` indicates the content is still being stored and the request can be retried shortly. A `410` indicates the content was stored but has since expired.\n","tags":["email-messages"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"description":"ID of the message whose stored content to fetch. A broadcast records one message per recipient, and [List email messages](/docs/api/reference/list-email-messages) returns those copies alongside ordinary sends. For a single send, this is the message's own ID, from the send response's `id` field.","schema":{"$ref":"#/components/schemas/EmailID"}},{"name":"recipient_id","in":"query","required":false,"description":"Recipient whose accepted template values to render. Required for a message with multiple recipient snapshots; omission returns 422. A single recipient is selected automatically. An unknown recipient or one belonging to another message returns 404. Get the ID from the message's recipients listing.","schema":{"$ref":"#/components/schemas/RecipientID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Stored message content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMessageContent"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"425":{"$ref":"#/components/responses/TooEarly"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/messages/{message_id}/attachments/{attachment_id}":{"get":{"operationId":"getEmailMessageAttachment","summary":"Get a message attachment","description":"Downloads the raw bytes of one attachment from a sent message, returned with the attachment's own content type and a Content-Disposition header that includes its filename. The message must have content storage enabled and the attachment is available for up to 30 days after sending. A `404` indicates the message has no stored content or no attachment with this ID. A `425` indicates the attachment is still being stored and the request can be retried shortly. A `410` indicates the attachment was stored but has since expired.\n","tags":["email-messages"],"x-audiences":["public"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"description":"ID of the message the attachment belongs to, from the send response's `id` field.","schema":{"$ref":"#/components/schemas/EmailID"}},{"name":"attachment_id","in":"path","required":true,"description":"Attachment ID, as returned in the message's `attachments` list.","schema":{"$ref":"#/components/schemas/EmailAttachmentID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The raw attachment bytes.","headers":{"Content-Disposition":{"description":"Has the attachment's filename. The value is `attachment` for regular files, or `inline` for inline images referenced from the HTML body.\n","schema":{"type":"string"}}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"425":{"$ref":"#/components/responses/TooEarly"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":[]}},"/v1/email/broadcasts":{"post":{"operationId":"createEmailBroadcast","summary":"Create a broadcast","description":"Creates a broadcast for a stored audience. The default is an editable draft.\nSet `send` to `true` to send now or at `scheduled_at`; `scheduled_at` without\n`send` set to `true` returns `422`. Use\n[Create an email message](/docs/api/reference/create-email-message) for a small,\nexplicit recipient list.\n\nContacts in the audience at send time become recipients after suppressions. Read\ntheir states with\n[List recipients of a broadcast](/docs/api/reference/list-email-broadcast-recipients).\nWith `send`, the request returns `422` if any of these are true:\n\n- The selected Brand does not exist in this workspace or is archived.\n- The sender domain is not verified.\n- No audience is selected, or the selected audience no longer exists.\n- The audience has no contact with an email address, or every contact is suppressed for the broadcast's category.\n- No template is set, or the set template has no published version.\n- The organization has used its broadcast allowance for the current billing period, or (for an immediate send) is already at its concurrent-broadcast limit; schedule the send instead to wait for a free slot.\n\nThe first send or schedule fixes the selected Brand, or the workspace default\nif no Brand was selected. Preferences are evaluated for that Brand; retries\nkeep the same identity.\n\nIf the audience is empty when a scheduled send starts, the broadcast becomes\n`failed` with a readable reason instead of silently dropping it.\n","tags":["email-broadcasts"],"x-audiences":["public","command"],"x-snippet-key":"broadcasts.create","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcastCreateRequest"}}}},"responses":{"201":{"description":"Draft broadcast created.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcast"},"example":{"id":"eb_01krdgeqcxet5s7t44vh8rt9mg","from":{"email":"jane@acme.com","name":"Jane Doe"},"audience_id":"adn_01krdgeqcxet5s7t44vh8rt9mg","template":{"id":"emt_01krdgeqcxet5s7t44vh8rt9mg","version_id":null},"category":"marketing","reply_to":[{"email":"jane@acme.com","name":"Jane Doe"}],"tags":[{"name":"category","value":"welcome"}],"track_opens":true,"track_clicks":true,"created_at":"2026-09-01T09:14:02.418Z","recipient_count":0,"sent_at":null,"status":"draft"}}}},"202":{"description":"Broadcast accepted for delivery.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcast"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"get":{"operationId":"listEmailBroadcasts","summary":"List broadcasts","description":"Returns a paginated list of broadcasts in the workspace, newest first. `created_after` and `created_before` narrow the list to broadcasts created in a half-open window, which is how you page a single month or quarter rather than the whole history.\n","tags":["email-broadcasts"],"x-audiences":["public","command"],"x-snippet-key":"broadcasts.list","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/EmailBroadcastStatusFilter"},{"$ref":"#/components/parameters/BroadcastAudienceFilter"},{"$ref":"#/components/parameters/BroadcastTagFilter"},{"$ref":"#/components/parameters/EmailBroadcastSearchFilter"},{"$ref":"#/components/parameters/CreatedAfter"},{"$ref":"#/components/parameters/CreatedBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of broadcasts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcastList"},"example":{"data":[{"id":"eb_01krdgeqcxet5s7t44vh8rt9mg","from":{"email":"jane@acme.com","name":"Jane Doe"},"audience_id":"adn_01krdgeqcxet5s7t44vh8rt9mg","template":{"id":"emt_01krdgeqcxet5s7t44vh8rt9mg","version_id":"emv_01krdgeqcxet5s7t44vh8rt9mg"},"category":"marketing","reply_to":[{"email":"jane@acme.com","name":"Jane Doe"}],"status":"sent","failure_reason":null,"failure_detail":null,"recipient_count":4820,"sent_count":4820,"delivered_count":4712,"bounced_count":96,"complained_count":12,"open_count":3104,"click_count":812,"unique_opens_non_prefetched":2140,"unique_clicks":693,"out_of_band_bounces":14,"delivered_recipients":4724,"tags":[{"name":"category","value":"welcome"}],"track_opens":true,"track_clicks":true,"created_at":"2026-09-01T09:14:02.418Z","scheduled_at":"2026-09-02T08:00:00Z","started_at":"2026-09-02T08:00:03.771Z","sent_at":"2026-09-02T08:11:47.902Z"}],"next_cursor":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9","prev_cursor":null,"refresh_cursor":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/broadcasts/export":{"get":{"operationId":"getEmailBroadcastsExport","summary":"Export broadcasts as CSV","description":"Downloads the workspace's broadcasts as a CSV file, one row per broadcast,\nnewest first. The header names fifteen columns, in this order:\n`created_at`, `broadcast_id`, `status`, `template_name`, `audience_id`,\n`audience_name`, `recipient_count`, `sent_count`, `delivered_count`,\n`track_opens`, `open_rate`, `track_clicks`, `click_rate`, `scheduled_at`\nand `sent_at`. `broadcast_id` is what joins a row back to the rest of the\nAPI. It takes the same filters as the broadcast list, so the file matches\nwhat the list shows for the same query. `recipient_count` is empty until a\nsend resolves the audience, so an empty cell there means the broadcast has\nno recipient list yet rather than a list of nobody.\n\nCounter and rate columns use periodically refreshed saved totals, as the\nbroadcast list does. Refresh delays retain the last saved values. These\ncells are blank while historical totals are unavailable or incomplete.\n\n`open_rate` and `click_rate` are decimal fractions to four places, over the\nrecipients the message reached: `open_rate` is unique non-prefetched opens\ndivided by that number, and `click_rate` is unique clicks divided by it.\nThat divisor is not the `delivered_count` column, which resolves each\nrecipient to a single status and so counts a recipient who delivered and\nthen complained under the complaint, so neither rate can be reproduced from\nthis file alone. Either is empty when its `track_opens` or `track_clicks`\nflag is `false`, and also when the message reached nobody, so an empty rate\ndoes not mean tracking is off. Both flags default to `true` and the export\nnarrows by no status of its own, so a `draft` or `scheduled` row is included\nunless `status` excludes it, and carries `track_opens` as `true` with\n`open_rate` empty.\n\nA text cell whose first character is `=`, `+`, `-`, `@`, a tab or a carriage\nreturn is written with a leading apostrophe, so a spreadsheet reads it as\ntext rather than as a formula. A value that begins with an apostrophe of\nits own is written unchanged, so the original text cannot always be\nrecovered from the CSV cell. Match records by `broadcast_id` or `audience_id`,\nrather than by `template_name` or `audience_name`.\n\nThe file is complete or it is refused: a query matching more broadcasts than\none file carries returns a 422 naming the limit rather than a truncated\ndownload. Narrow it with `created_after` and `created_before` and request\neach window separately.\n","tags":["email-broadcasts"],"x-audiences":["public"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/EmailBroadcastStatusFilter"},{"$ref":"#/components/parameters/BroadcastAudienceFilter"},{"$ref":"#/components/parameters/BroadcastTagFilter"},{"$ref":"#/components/parameters/EmailBroadcastSearchFilter"},{"$ref":"#/components/parameters/CreatedAfter"},{"$ref":"#/components/parameters/CreatedBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The broadcasts as a CSV file.","headers":{"Content-Disposition":{"$ref":"#/components/headers/ContentDisposition"}},"content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/v1/email/broadcasts/{broadcast_id}":{"get":{"operationId":"getEmailBroadcast","summary":"Get a broadcast","description":"Returns one broadcast, with its audience reference and counters.\n\nThe full recipient list, with each recipient's own delivery status, is paginated separately: see [List recipients of a broadcast](/docs/api/reference/list-email-broadcast-recipients).\n","tags":["email-broadcasts"],"x-audiences":["public","command"],"x-snippet-key":"broadcasts.get","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"description":"Broadcast identifier. Starts with `eb_`.","schema":{"type":"string","pattern":"^eb_[0-9a-hjkmnp-tv-z]{26}$"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The broadcast.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcast"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateEmailBroadcast","summary":"Update a broadcast","description":"Updates a draft or scheduled broadcast. A field you supply in the request is changed. A field you leave out is left as it is.\n\nA scheduled broadcast stays editable right up until it is accepted for sending. After that, editing it returns a conflict error.\n","tags":["email-broadcasts"],"x-audiences":["public","command"],"x-snippet-key":"broadcasts.update","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"description":"Broadcast identifier. Starts with `eb_`.","schema":{"type":"string","pattern":"^eb_[0-9a-hjkmnp-tv-z]{26}$"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcastUpdateRequest"}}}},"responses":{"200":{"description":"The updated broadcast.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcast"},"example":{"id":"eb_01krdgeqcxet5s7t44vh8rt9mg","from":{"email":"jane@acme.com","name":"Jane Doe"},"audience_id":"adn_01krdgeqcxet5s7t44vh8rt9mg","template":{"id":"emt_01krdgeqcxet5s7t44vh8rt9mg","version_id":null},"category":"marketing","reply_to":[{"email":"jane@acme.com","name":"Jane Doe"}],"tags":[{"name":"category","value":"welcome"}],"track_opens":true,"track_clicks":true,"created_at":"2026-09-01T09:14:02.418Z","status":"scheduled","recipient_count":0,"scheduled_at":"2026-09-02T08:00:00Z","sent_at":null}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteEmailBroadcast","summary":"Delete a broadcast","description":"Deletes a draft broadcast. Only a draft can be deleted. To stop a scheduled or sending broadcast, use [Cancel a broadcast](/docs/api/reference/cancel-email-broadcast) instead.\n","tags":["email-broadcasts"],"x-audiences":["public","command"],"x-snippet-key":"broadcasts.delete","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"description":"Broadcast identifier. Starts with `eb_`.","schema":{"type":"string","pattern":"^eb_[0-9a-hjkmnp-tv-z]{26}$"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Draft broadcast deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/broadcasts/{broadcast_id}/counts":{"get":{"operationId":"getEmailBroadcastCounts","summary":"Get a broadcast's audience counts","description":"Returns a live estimate of how many contacts the broadcast can reach, narrowing from everyone in its audience down to the ones the send would go to.\n\n- `total` is every contact in the audience.\n- `addressable` is how many of those have an email address.\n- `sendable` is how many addressable contacts are not suppressed for the broadcast's category.\n\nA transactional broadcast still reaches a contact who unsubscribed from or complained about marketing mail. A marketing broadcast does not.\n\nThe estimate can change until the broadcast sends. The broadcast must have an audience selected; otherwise, the request returns `422`.\n\nThese are audience numbers, and sending does not change them: after a send they still describe who the broadcast resolved to, not what happened to them. `status` says which of the two situations you are in. For delivery outcomes, read [the broadcast's recipients](/docs/api/reference/list-email-broadcast-recipients) for per-recipient status, [its events](/docs/api/reference/list-email-broadcast-events) for the raw feed, or [email statistics by broadcast](/docs/api/reference/get-email-stats-by-broadcast) for the aggregates.\n","tags":["email-broadcasts"],"x-audiences":["public","command"],"x-snippet-key":"broadcasts.counts","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"description":"Broadcast identifier. Starts with `eb_`.","schema":{"$ref":"#/components/schemas/EmailBroadcastID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The broadcast's audience counts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcastCounts"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/broadcasts/{broadcast_id}/send-quota":{"get":{"operationId":"getEmailBroadcastSendQuota","summary":"Get the email send allowance for a broadcast","description":"Returns how many recipients the organization's email send allowance covers. Use this estimate before sending or scheduling to check whether the daily or monthly email limit would restrict the send.\n\n`recipients` is the number of contacts the broadcast could reach now. It matches the sendable count from the audience counts. `allowed` is the number covered by the email send allowance. It equals `recipients` when no email limit restricts the send. `limited_by` identifies the monthly email limit for the billing period or the daily email limit that prevents the rest from receiving the broadcast. `limit` and `remaining` describe that email limit. `resets_at` is its reset time. For a monthly email limit, `limit_reason` explains what sets it if you can read the organization's billing.\n\n`can_start` takes precedence over these allowance counts when deciding whether email limits permit starting. A temporary funding restriction can produce `allowed: 0` or `remaining: 0` while `can_start: true`; the broadcast can start and wait for funds. Full daily and funded monthly limits still apply. Other send checks still apply.\n\nIf the balance runs out while sending, the broadcast waits up to 20 minutes, checking once a minute, and continues by itself if a check before the wait ends finds enough funds for the next batch and its sending setup is usable. Otherwise it pauses until you resume it. Other send limits are checked again when sending continues. Waiting does not initiate a payment or change automatic top-up settings.\n\nPass `send_at` to check a later send, such as the `scheduled_at` you plan to use. If a daily or monthly window resets by that time, the check uses its full allowance. Otherwise, it uses the allowance remaining now. The check estimates your send quota using current limits without subtracting broadcasts that are scheduled but have not sent yet, so broadcasts scheduled for the same period may together exceed the limit even if each check shows enough quota. Without `send_at`, it checks a send now.\n\n`broadcasts` reports the separate broadcast count allowance for the billing period, or the UTC day when no current billing period is available. Sending or scheduling a draft uses one broadcast from this allowance. `send_at` does not change `broadcasts`.\n\nA `503` means the email limits could not be read. Retry the check; this error does not establish whether sending is allowed.\n\nThese counts are live estimates. Audience membership, suppressions, and email usage can change before the broadcast sends. This check reserves nothing. The email send allowance is checked again when the broadcast sends. The broadcast must have an audience selected. A broadcast without an audience returns a `422`.\n","tags":["email-broadcasts"],"x-audiences":["public","command"],"x-snippet-key":"broadcasts.send_quota","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"description":"ID of the broadcast to check the email send allowance for.\n","schema":{"$ref":"#/components/schemas/EmailBroadcastID"}},{"name":"send_at","in":"query","required":false,"description":"The proposed send time as an RFC 3339 date-time. If a daily or monthly window resets at or before this time, the check uses its full allowance. Otherwise, it uses the allowance remaining now. The check estimates your send quota at this time using current limits without subtracting broadcasts that are scheduled but have not sent yet, including those scheduled before this time. It does not reflect plan changes or temporary limit changes that take effect before this time.\n\nMust be at least 30 seconds and no more than 365 days in the future, the same range accepted by `scheduled_at`. Omit `send_at` to check a send now. A scheduled broadcast's `scheduled_at` is used only if you pass it as `send_at`.\n\nDoes not change `broadcasts`. The broadcast count allowance is used when you submit the send or schedule request.\n","schema":{"type":"string","format":"date-time","minLength":1,"example":"2026-11-02T09:00:00Z"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The recipients covered by the broadcast's email send allowance.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcastSendQuota"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/broadcasts/{broadcast_id}/recipients":{"get":{"operationId":"listEmailBroadcastRecipients","summary":"List recipients of a broadcast","description":"Returns recipient-level delivery state for a broadcast, paginated. This is who a broadcast reached and how far each one got.\n\nThe list is empty for a draft, scheduled, or accepted broadcast: recipients are resolved from the audience only once sending begins. Pass `to` to return just that address's row, which is how you answer \"did this person get it?\" on a send too large to page through.\n\nThe list is kept for 30 days after the broadcast is sent, fails or is canceled. After that, this returns `410` with `BroadcastRecipientsExpired`, while the broadcast itself stays readable, with its saved counts when they are available.\n","tags":["email-broadcasts"],"x-audiences":["public","command"],"x-snippet-key":"broadcasts.list_recipients","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"description":"ID of the broadcast whose recipients to read.","schema":{"type":"string","pattern":"^eb_[0-9a-hjkmnp-tv-z]{26}$"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"to","in":"query","required":false,"description":"Return only the recipient at this address. Exact match, normalised to lowercase before comparison, so it returns at most one row.","schema":{"type":"string","format":"email","example":"user@example.com"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of recipients for this broadcast.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailRecipientList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/broadcasts/{broadcast_id}/recipients/export":{"get":{"operationId":"getEmailBroadcastRecipientsExport","summary":"Export a broadcast's recipients as CSV","description":"Downloads a broadcast's recipients as a CSV file, one row per recipient. The\nheader names ten columns, in this order: `recipient`, `status`,\n`rejection_reason`, `open_count`, `click_count`, `processed_at`,\n`delivered_at`, `processing_latency_ms`, `delivery_latency_ms` and\n`total_latency_ms`.\n\n`rejection_reason` is filled only on a `status: rejected` row and names why\nthe message was never sent, which is not why it bounced. A bounce happens\nafter the send, so no column here carries `bounce_type` or `bounce_code`:\nread [List recipients of a broadcast](/docs/api/reference/list-email-broadcast-recipients)\nfor those. The three latency columns are milliseconds, and each is empty\nuntil the milestone it measures has happened: `processing_latency_ms` from\nthe send being accepted to the message being prepared for delivery,\n`delivery_latency_ms` from prepared to the receiving mail server accepting\nit, and `total_latency_ms` the accepted-to-delivered time end to end.\n\nRecipients can be exported for 30 days after the broadcast is sent, fails\nor is canceled. After that, this returns `410` with\n`BroadcastRecipientsExpired`.\n\nA text cell whose first character is `=`, `+`, `-`, `@`, a tab or a carriage\nreturn is written with a leading apostrophe, so a spreadsheet reads it as\ntext rather than as a formula. Nothing else is prefixed, so a value that\nbegins with an apostrophe of its own is written unchanged: strip a leading\napostrophe only when one of those six characters follows it, before matching\n`recipient` back to the API.\n\nThe file is complete or it is refused: a broadcast with more recipients than\none file carries returns a 422 naming the limit rather than a truncated\ndownload. Pass `to` to export one address, or page\n[List recipients of a broadcast](/docs/api/reference/list-email-broadcast-recipients),\nwhich has no limit.\n","tags":["email-broadcasts"],"x-audiences":["public"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"description":"Broadcast identifier. Starts with `eb_`.","schema":{"type":"string","pattern":"^eb_[0-9a-hjkmnp-tv-z]{26}$"}},{"name":"to","in":"query","required":false,"description":"Return only the recipient at this address. Exact match, normalised to lowercase before comparison, so the file carries at most one row.","schema":{"type":"string","format":"email","example":"user@example.com"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The broadcast's recipients as a CSV file.","headers":{"Content-Disposition":{"$ref":"#/components/headers/ContentDisposition"}},"content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/v1/email/broadcasts/{broadcast_id}/events":{"get":{"operationId":"listEmailBroadcastEvents","summary":"List events for a broadcast","description":"Returns the per-recipient delivery timeline for a broadcast, oldest first, as a cursor page. Each entry is one event, such as a send, an open, a click, or a bounce.\n","tags":["email-broadcasts"],"x-audiences":["public","command"],"x-snippet-key":"broadcasts.list_events","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"description":"ID of the broadcast whose event timeline to read.","schema":{"type":"string","pattern":"^eb_[0-9a-hjkmnp-tv-z]{26}$"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"type","in":"query","required":false,"description":"Filter by event type, for example `email.bounced` or `email.opened`. A broadcast timeline is recipient-scoped, so `email.scheduled` and `email.canceled` never appear on it; a canceled broadcast reports that in its own `status`.","schema":{"$ref":"#/components/schemas/EmailEventType"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated event timeline for this broadcast.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailEventList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/broadcasts/{broadcast_id}/clicked-links":{"get":{"operationId":"listEmailBroadcastClickedLinks","summary":"List a broadcast's clicked links","description":"Returns the destination URLs a broadcast's recipients clicked, grouped by URL and sorted by click count. Each entry carries an exact click count and distinct-recipient count over every click event the broadcast has, plus the link's name: the name used by the most clicks that named it, or null if no click through that URL ever carried one. `data` is capped at the 100 most-clicked URLs; `total` carries the actual number of distinct URLs clicked, so a capped response is never mistaken for a complete one.\n","tags":["email-broadcasts"],"x-audiences":["public","command"],"x-snippet-key":"broadcasts.list_clicked_links","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"description":"ID of the broadcast whose clicked links to read.","schema":{"$ref":"#/components/schemas/EmailBroadcastID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The broadcast's clicked links, grouped by URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcastClickedLinkList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/broadcasts/{broadcast_id}/validate":{"post":{"operationId":"validateEmailBroadcast","summary":"Validate a broadcast","description":"Check the saved broadcast or the changes supplied in this request against the template's published content. This does not save changes, select a template version for sending or evaluate recipients. Requires template read permission in addition to broadcast read. Warnings about the broadcast's automatic seed test also need Inbox Insights read, and a result without them does not confirm that the seed test will run. Each call computes a fresh result. An Idempotency-Key header is accepted but does not replay an earlier result.","tags":["email-broadcasts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"broadcasts.validate","parameters":[{"name":"broadcast_id","in":"path","required":true,"description":"Broadcast identifier.","schema":{"$ref":"#/components/schemas/EmailBroadcastID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Broadcast input validation result.","headers":{"Cache-Control":{"schema":{"type":"string"},"description":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcastValidationResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcastValidationRequest"}}}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/broadcasts/{broadcast_id}/preview":{"post":{"operationId":"previewEmailBroadcast","summary":"Preview a broadcast for a contact","description":"Render the template's published content using the saved broadcast, the changes supplied in this request and contact values the caller can read. Supplied fields replace the saved values for this preview only. Requires template read permission. Supply contact_id when the template uses contact data. The preview's unsubscribe link does not unsubscribe a contact. This does not send mail. Each call renders a fresh result. An Idempotency-Key header is accepted but does not replay an earlier preview.","tags":["email-broadcasts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"broadcasts.preview","parameters":[{"name":"broadcast_id","in":"path","required":true,"description":"Broadcast identifier.","schema":{"$ref":"#/components/schemas/EmailBroadcastID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Rendered broadcast preview.","headers":{"Cache-Control":{"schema":{"type":"string"},"description":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcastPreviewResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcastPreviewRequest"}}}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/broadcasts/{broadcast_id}/test":{"post":{"operationId":"sendEmailBroadcastTest","summary":"Send a rendered broadcast test","description":"Supply the same changes, contact and fingerprint as a new preview to send the exact rendered content to an authorized current organization member with workspace access. Requires template read and emails write permission. Alternate-member and machine destinations also require members read. A change to template content, envelope fields, parameters or contact values returns E04089 (BroadcastPreviewChanged), a conflict_error. This does not send the campaign audience. Brand overrides must match the preview too. If the preview reports `brand_unavailable`, preview again with an available `brand_id` or `null`, then use the same override and new fingerprint here. Null uses the workspace default when selection is enabled, otherwise it sends an unbranded test. Omitting the override keeps a historical broadcast's saved identity. A confirmed response replays unchanged for the same key and request within the configured idempotency window, with fresh authorization and member access checks. A replay sends no other test.","tags":["email-broadcasts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"broadcasts.test","parameters":[{"name":"broadcast_id","in":"path","required":true,"description":"Broadcast identifier.","schema":{"$ref":"#/components/schemas/EmailBroadcastID"}},{"$ref":"#/components/parameters/BroadcastTestIdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"202":{"description":"Test email accepted.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"},"Cache-Control":{"schema":{"type":"string"},"description":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcastTestResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcastTestRequest"}}}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/broadcasts/{broadcast_id}/send":{"post":{"operationId":"sendEmailBroadcast","summary":"Send a broadcast","description":"Sends a draft or scheduled broadcast, either immediately or at `scheduled_at`.\nCalling this on a scheduled broadcast replaces its schedule or sends it now if\n`scheduled_at` is omitted. Calling it again on a broadcast that is already\n`accepted` retries dispatch rather than returning an error. Adding\n`scheduled_at` to an `accepted` broadcast reschedules it. The request can\ninstead return `409` with code `E04107` when the broadcast is already being\nprepared to send now. The schedule then did not change and the send can still\ngo out. To stop it, cancel the broadcast right away: canceling stops the\ndeliveries that have not gone out yet. Read the broadcast to follow its\nprogress. A broadcast that has started sending, or\nthat already reached a final state, returns a conflict.\n\nThe audience's contacts at send time become the recipients after suppressions.\nThe request returns `422` if any of these are true:\n\n- The selected Brand does not exist in this workspace or is archived.\n- The sender domain is not verified.\n- No audience is selected, or the selected audience no longer exists.\n- The audience has no contact with an email address, or every contact is suppressed for the broadcast's category.\n- No template is set, or the set template has no published version.\n- The organization has used its broadcast allowance for the current billing period, or (for an immediate send) is already at its concurrent-broadcast limit; schedule the send instead to wait for a free slot.\n\nThe first send or schedule fixes the selected Brand, or the workspace default\nif no Brand was selected. Preferences are evaluated for that Brand; retries\nkeep the same identity.\n\nIf the audience is empty when a scheduled send starts, the broadcast becomes\n`failed` with a readable reason instead of silently dropping it.\n","tags":["email-broadcasts"],"x-audiences":["public","command"],"x-snippet-key":"broadcasts.send","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"description":"Broadcast identifier. Starts with `eb_`.","schema":{"type":"string","pattern":"^eb_[0-9a-hjkmnp-tv-z]{26}$"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcastSendNowRequest"}}}},"responses":{"202":{"description":"Broadcast accepted for delivery.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcast"},"example":{"id":"eb_01krdgeqcxet5s7t44vh8rt9mg","from":{"email":"jane@acme.com","name":"Jane Doe"},"audience_id":"adn_01krdgeqcxet5s7t44vh8rt9mg","template":{"id":"emt_01krdgeqcxet5s7t44vh8rt9mg","version_id":null},"category":"marketing","reply_to":[{"email":"jane@acme.com","name":"Jane Doe"}],"tags":[{"name":"category","value":"welcome"}],"track_opens":true,"track_clicks":true,"created_at":"2026-09-01T09:14:02.418Z","status":"accepted","recipient_count":0,"sent_at":null}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/broadcasts/{broadcast_id}/cancel":{"post":{"operationId":"cancelEmailBroadcast","summary":"Cancel a broadcast","description":"Cancels a broadcast that is scheduled, accepted, sending, waiting for funds, or paused. Canceling it while it is sending stops every delivery that has not gone out yet, though messages already on their way to a recipient are not recalled.\n\nCalling this again on a broadcast that is already canceling or canceled is idempotent: it returns the broadcast's current state rather than an error. A draft cannot be canceled, because it was never sent; use [Delete a broadcast](/docs/api/reference/delete-email-broadcast) instead. A broadcast that already sent or failed has reached a terminal state and returns a conflict.\n","tags":["email-broadcasts"],"x-audiences":["public","command"],"x-snippet-key":"broadcasts.cancel","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"description":"Broadcast identifier. Starts with `eb_`.","schema":{"type":"string","pattern":"^eb_[0-9a-hjkmnp-tv-z]{26}$"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"202":{"description":"Cancellation accepted.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcast"},"example":{"id":"eb_01krdgeqcxet5s7t44vh8rt9mg","from":{"email":"jane@acme.com","name":"Jane Doe"},"audience_id":"adn_01krdgeqcxet5s7t44vh8rt9mg","template":{"id":"emt_01krdgeqcxet5s7t44vh8rt9mg","version_id":"emv_01krdgeqcxet5s7t44vh8rt9mg"},"category":"marketing","reply_to":[{"email":"jane@acme.com","name":"Jane Doe"}],"tags":[{"name":"category","value":"welcome"}],"track_opens":true,"track_clicks":true,"created_at":"2026-09-01T09:14:02.418Z","status":"canceling","failure_reason":null,"failure_detail":null,"recipient_count":4820,"scheduled_at":"2026-09-02T08:00:00Z","started_at":"2026-09-02T08:00:03.771Z","sent_at":null,"canceled_at":"2026-09-02T08:06:12.204Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/broadcasts/{broadcast_id}/resume":{"post":{"operationId":"resumeEmailBroadcast","summary":"Resume a broadcast","description":"Continues a `paused` broadcast using its saved template references and recipient list, skipping recipients already sent to and applying current consent and suppression checks for its saved category and Brand. If the broadcast has a `brand_id`, resuming keeps that ID; it does not select the current default. Legacy broadcasts with `brand_id: null` keep their original consent scope. Workspace-wide protections still apply. The selected Brand stays in use while the broadcast waits for funds, is paused, or resumes. It cannot be archived until the broadcast finishes or cancellation completes. Marketing broadcasts skip newly unsubscribed recipients; transactional broadcasts retain their category exemptions. Resuming does not use another broadcast from your monthly allowance. A `202` returns `status: sending`; delivery continues asynchronously. Use [get the broadcast](/docs/api/reference/get-email-broadcast) to follow progress.\n\nIf the broadcast first started sending at least 24 hours ago, review its message and set `confirm` to `true` to acknowledge late delivery. For older broadcasts without `started_at`, the threshold uses the send authorization time, or the creation time if neither timestamp was recorded. You can also send `confirm: true` before that threshold; it does not skip other checks. To review the message, first [get the template](/docs/api/reference/get-email-template) with the broadcast's `template.id` and check its `scope`, which the version read does not return. A `scope` of `system` marks a built-in template, whose lookups return current catalogue content; a `404` means a deleted workspace template, whose pinned version stays readable by ID. For a workspace template, use `template.id` and `template.version_id` with [get a template version](/docs/api/reference/get-email-template-version), then check `template.language` or the version's `default_language`. Both reads require `email_management:read`. Published workspace versions retain the template's own original content and remain readable by ID after template deletion, but sections they link from reusable blocks show as currently published; a deleted or reused slug cannot identify the original message. Broadcasts with frozen content keep sending that content, but older broadcasts can read the catalogue again when resumed. Neither the current lookup nor a copy of an earlier message alone proves what remaining recipients will receive. Leave the broadcast paused unless you can verify that content. Once the funding wait has ended, adding funds alone does not restart a paused broadcast: call this operation explicitly after reviewing its content.\n\nReturns `403` if the workspace is suspended or has been suspended since the original send authorization. `E04102` means a later suspension revoked this broadcast's authorization; reactivation does not restore it, so cancel the broadcast instead of retrying. Do not resend to its full audience without excluding recipients already sent to. Returns `402` if the account is blocked for insufficient funds, or `409` if the broadcast is not paused or needs late-delivery confirmation. A `422` can mean the concurrent broadcast limit is reached or the sender or IP pool needs repair. Read the error details, then wait for a free slot or repair the sender or pool and retry. A `429` can mean a sending limit prevents resuming. These refusals leave the broadcast paused. A `503` means the balance or email limits could not be checked, or Brand unsubscribe links are temporarily unavailable; the broadcast stays paused and you can retry.\n","tags":["email-broadcasts"],"x-audiences":["public","command"],"x-snippet-key":"broadcasts.resume","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"description":"Broadcast identifier. Starts with `eb_`.","schema":{"$ref":"#/components/schemas/EmailBroadcastID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcastResume"}}}},"responses":{"202":{"description":"Resumption accepted with `status: sending`. Poll [get the broadcast](/docs/api/reference/get-email-broadcast) to follow delivery and later status changes.\n","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcast"},"example":{"id":"eb_01krdgeqcxet5s7t44vh8rt9mg","from":{"email":"jane@acme.com","name":"Jane Doe"},"audience_id":"adn_01krdgeqcxet5s7t44vh8rt9mg","template":{"id":"emt_01krdgeqcxet5s7t44vh8rt9mg","version_id":"emv_01krdgeqcxet5s7t44vh8rt9mg"},"category":"marketing","brand_id":null,"reply_to":[{"email":"jane@acme.com","name":"Jane Doe"}],"tags":[{"name":"category","value":"welcome"}],"track_opens":true,"track_clicks":true,"created_at":"2026-09-01T09:14:02.418Z","status":"sending","failure_reason":null,"failure_detail":null,"recipient_count":4820,"started_at":"2026-09-02T08:00:03.771Z","sent_at":null}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/labels":{"get":{"operationId":"listLabels","summary":"List labels","description":"Returns every label in the workspace, ordered by name, in one list without\npagination. Each label carries its colour and a description of when to\napply it. A workspace creates no new label once it has 100 or more.\n\nMailbox system labels are a fixed set that every mailbox has, so they are\nnot in this list: `inbox`, `archive`, `spam`, `blocked`, `sent`, `trash`\nand `unread`. A thread's `folder` sets `inbox`, `archive` or `spam`, and\nits `read` field sets `unread`. Deleting a thread moves it to `trash` and\nrestoring it moves it back. `sent` and `blocked` are assigned automatically.\n","tags":["labels"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"labels.list","responses":{"200":{"description":"The workspace's labels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n","sdk"]},"post":{"operationId":"createLabel","summary":"Create a label","description":"Adds a label to the workspace's catalogue. Give it a description of when\nto apply it, so people and agents label conversations the same way.\n\nNames are unique in the workspace regardless of case; a name already in\nuse returns a conflict error. System names such as `inbox`, `sent`,\n`unread`, `open` and `assigned` are reserved. Creating a label fails once\nthe workspace has 100 labels.\n","tags":["labels"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"labels.create","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelCreate"}}}},"responses":{"201":{"description":"Label created.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Label"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/labels/{label_id}":{"parameters":[{"name":"label_id","in":"path","required":true,"description":"The catalogue label to act on.","schema":{"$ref":"#/components/schemas/LabelID"}}],"get":{"operationId":"getLabel","summary":"Get a label","description":"Returns one label from the workspace's catalogue.\n","tags":["labels"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"labels.get","responses":{"200":{"description":"The label.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Label"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n","sdk"]},"patch":{"operationId":"updateLabel","summary":"Update a label","description":"Renames a label, or changes or removes its colour or description.\nOmitted fields are left unchanged, and the label keeps its ID. The new\nname must not already be in use in the workspace, regardless of case.\n","tags":["labels"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"labels.update","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelUpdate"}}}},"responses":{"200":{"description":"The updated label.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Label"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"delete":{"operationId":"deleteLabel","summary":"Delete a label","description":"Deletes a label from the workspace's catalogue. It leaves every\nconversation and message that carried it at once. Deleting cannot be\nundone: creating a label with the same name later makes a new label with\na new ID.\n","tags":["labels"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"labels.delete","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The label was deleted.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/contacts":{"post":{"operationId":"createContact","x-snippet-key":"contacts.create","summary":"Create a contact","description":"Creates a contact in the workspace, identified by an email address, a phone number, or both; at least one is required. Email is stored trimmed and lowercased, and phone in its canonical international form. Creating a second contact with the same email or phone number, or reusing another contact's `external_id`, returns a conflict error.\n\nTo create or update many contacts in one request, or to write a contact without knowing whether the address already exists, use [Create or update contacts in bulk](/docs/api/reference/create-contact-batch) instead.\n","tags":["email-contacts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCreateRequest"}}}},"responses":{"201":{"description":"Contact created.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","make","mcp","n8n","sdk"]},"get":{"operationId":"listContacts","x-snippet-key":"contacts.list","summary":"List contacts","description":"Returns a paginated list of contacts in the workspace, newest first. Look up a single contact by its exact `email`, `phone_number`, or `external_id`, or search by email, first name, last name, or phone substring with `q`. Repeat `phone_number` to resolve up to 50 numbers to their contacts in one request, raising `limit` to at least the number of values you pass. Pass `include_total=true` to add the total number of matching contacts to the response.\n","tags":["email-contacts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"email","in":"query","required":false,"description":"Return the contact with exactly this email address (case-insensitive). Email is unique within a workspace, so this matches at most one contact. An empty value is a validation error, never an unfiltered page.","schema":{"type":"string"},"example":"user@example.com"},{"name":"phone_number","in":"query","required":false,"description":"Return the contacts with exactly this phone number in international E.164 form. Repeat the parameter to match any of up to 50 numbers. Set `limit` to at least the number of values you pass. The default `limit` is 25, and a page cut short by it looks exactly like numbers that matched nothing. Different identifier parameters still combine with AND, so `phone_number=a&phone_number=b&email=c` asks for a contact whose phone number is `a` or `b` and whose email is `c`. Encode the leading plus sign as `%2B` (an unencoded `+` arrives as a space and is rejected). Phone numbers are unique within a workspace, so each value matches at most one contact. Non-canonical forms of the same number match the contact they canonicalize to; a value that is not a phone number shape, or an empty value, is a validation error, never an unfiltered page.","schema":{"type":"array","maxItems":50,"items":{"type":"string"}},"example":["+31612345678","+31698765432"]},{"name":"external_id","in":"query","required":false,"description":"Return the contact with exactly this external_id (your own identifier for the contact). Unique within a workspace, so this matches at most one contact. An empty value is a validation error, never an unfiltered page.","schema":{"type":"string"},"example":"user_12345"},{"name":"q","in":"query","required":false,"description":"Case-insensitive substring match against the contact's email address, first name, last name, or phone number. Phone matching is over the digits of the international form, so a full pasted number, a formatted number, or trailing digits all match; a national form with a leading trunk zero does not.","schema":{"type":"string","minLength":1},"example":"acme.com"},{"name":"identifier","in":"query","required":false,"description":"Filter to contacts that have a specific identifier on file.","schema":{"$ref":"#/components/schemas/ContactIdentifierFilter"},"example":"email"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of contacts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["attio","cli","make","mcp","n8n","sdk"]}},"/v1/contacts/batch":{"post":{"operationId":"createContactBatch","x-snippet-key":"contacts.batch","summary":"Create or update contacts in bulk","description":"Creates or updates up to 1,000 contacts in one request. Each entry is matched automatically against every identifier it supplies: its email address (trimmed and lowercased), its phone number (normalized to international form), and your own `external_id`. An entry with no match creates a contact. An entry whose identifiers all match one contact updates the supplied fields and preserves omitted fields. This lets an email address change under a stable `external_id` without creating a second contact. An entry whose identifiers belong to several contacts fails with an error naming each match; contacts are never merged automatically. Supplying `match_on` makes that field the only matching key, and every entry must include it. You can also add every contact in the request to up to 10 audiences.\n\nEach entry succeeds or fails on its own: the response lists one result per contact in submission order (`created`, `updated`, or `failed` with the reason), and a failed entry does not abort the rest. If the request itself is invalid, for example when an entry in `audience_ids` does not exist, the whole request fails with a validation error and no contacts are written.\n\nThe JSON request body can contain up to 24 MiB (25,165,824 bytes), including escaped characters. Larger requests return HTTP `413` before any contacts are written. Split an oversized request into smaller batches.\n","tags":["email-contacts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpsertRequest"}}}},"responses":{"200":{"description":"Per-contact results, in submission order.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpsertResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["attio","cli","mcp","n8n","sdk"]}},"/v1/contacts/{contact_id}":{"get":{"operationId":"getContact","x-snippet-key":"contacts.get","summary":"Get a contact","description":"Returns a single contact, including its custom `data` values and the channels it can be reached on. To find a contact's ID by email address or `external_id`, use [List contacts](/docs/api/reference/list-contacts).\n","tags":["email-contacts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"contact_id","in":"path","required":true,"description":"ID of the contact to fetch.","schema":{"$ref":"#/components/schemas/ContactID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["attio","cli","make","mcp","n8n","sdk"]},"patch":{"operationId":"updateContact","x-snippet-key":"contacts.update","summary":"Update a contact","description":"Updates a contact. Supplied fields are changed and omitted fields are left unchanged; set `first_name`, `last_name`, or `external_id` to `null` to clear them. Custom values in `data` are merged: keys you supply are set, keys set to `null` are removed, and keys you omit are unchanged.\n\nChanging the email address, phone number, or `external_id` to a value already used by another contact returns a conflict error. A contact always keeps at least one identifier. Clearing both email and phone in the same contact is rejected.\n","tags":["email-contacts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"contact_id","in":"path","required":true,"description":"ID of the contact to update.","schema":{"$ref":"#/components/schemas/ContactID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdateRequest"}}}},"responses":{"200":{"description":"The updated contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","make","mcp","n8n","sdk"]},"delete":{"operationId":"deleteContact","x-snippet-key":"contacts.delete","summary":"Delete a contact","description":"Deletes a contact permanently and removes it from every audience it belongs to. Suppression records for the address are not affected: an unsubscribed or bounced address stays suppressed even after the contact is deleted. Deletion is refused while any eSIM subscriber links to the contact, including subscribers without an active eSIM. Subscriber links cannot currently be deleted, detached, or anonymized; ending or releasing an eSIM does not restore Contact deletion.\n","tags":["email-contacts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"contact_id","in":"path","required":true,"description":"ID of the contact to delete.","schema":{"$ref":"#/components/schemas/ContactID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Contact deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/contacts/{contact_id}/preferences":{"parameters":[{"name":"contact_id","in":"path","required":true,"description":"ID of the contact.","schema":{"$ref":"#/components/schemas/ContactID"},"example":"con_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"listContactPreferences","summary":"List a contact's preferences","description":"Returns the preferences on record for the contact's current handles: rows keyed to their email address on the email channel, and to their phone number on SMS and WhatsApp. A contact with no handles, or with no statements on record, returns an empty page.\n\nRows are keyed by handle, not by contact: changing a contact's email address or phone number changes which rows this returns, and the old handle's rows remain in force for anything still sent to it.\n","tags":["preferences"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public"],"x-snippet-key":"contacts.preferences.list","parameters":[{"$ref":"#/components/parameters/PreferenceBrandID"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of the contact's preferences.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["n8n","sdk"]}},"/v1/preferences":{"get":{"operationId":"listPreferences","summary":"List preferences","description":"Returns the workspace's recorded preferences, most recently created first. Pass `channel` to narrow to one channel, and `handle` with it to look up everything on record for one address or number.\n\nEach row is a key's current statement. A person can hold several rows on one channel (a channel-wide opt-out next to sender-scoped ones), and the most restrictive statement is what decides whether a message goes out.\n","tags":["preferences"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"preferences.list","parameters":[{"name":"channel","in":"query","required":false,"description":"Return only preferences on this channel.","schema":{"$ref":"#/components/schemas/PreferenceChannel"}},{"name":"handle","in":"query","required":false,"description":"Return only preferences for this exact handle: an email address or an E.164 phone number. Requires `channel`, since a handle only means something on its channel.\n","schema":{"type":"string","minLength":1,"maxLength":320},"example":"+15550001234"},{"$ref":"#/components/parameters/PreferenceBrandID"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of preferences.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"post":{"operationId":"createPreference","summary":"Record a preference","description":"Records one statement, a grant or an opt-out, for a handle on one channel. Writing is an upsert: the key is the channel, handle, optional sender scope, and email Brand, and a new statement replaces the key's current one.\n\nStatements are ordered by when they were made, not when they arrive. A statement older than the key's current one is refused and returned with `applied: false` alongside the statement that survived; refusals are recorded on the key's history. Granting over a stored opt-out needs `consented_at` later than the opt-out. For an email Brand complaint, only this individual-recipient operation can record the newer consent that clears complaint protection. Bulk writes and imports cannot clear it. Bird accepts your assertion that the recipient has consented; optional `source` describes where consent came from, without verification. Other applicable opt-outs and workspace-wide delivery blocks still apply. Consent history can still be retained when a later ordinary opt-out or deletion remains in force. Such a grant returns `applied: false` with the surviving preference, or null after deletion.\n\nA `201` means this key had no record and one was created; a `200` returns the key's surviving record, or `preference: null` when a later deletion remains in force. The result distinguishes an effective preference write, repeat, or refusal.\n","tags":["preferences"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"preferences.create","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceIndividualCreate"},"example":{"channel":"sms","handle":"+15550001234","status":"revoked","coverage":"non_transactional"}}}},"responses":{"200":{"description":"No new live record was created. The result says whether this statement replaced a record, repeated it, or was refused. Consent history may still be recorded for a refused grant. The preference is null when a later deletion remains in force.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceWriteResult"}}}},"201":{"description":"The key had no record; this statement created one.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceWriteResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/preferences/{preference_id}":{"parameters":[{"name":"preference_id","in":"path","required":true,"description":"ID of the preference, as returned when it was recorded or listed. The ID stays stable while the key holds a record; deleting and re-recording the same key mints a new one.\n","schema":{"$ref":"#/components/schemas/PreferenceID"},"example":"prf_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"getPreference","summary":"Get a preference","description":"Returns one preference: the key it is about, the current statement on it, and the statement's provenance. An ID that does not exist in the workspace returns `404`, including after a delete, which removes the record its ID pointed at.\n","tags":["preferences"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"preferences.get","responses":{"200":{"description":"Preference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Preference"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n","sdk"]},"delete":{"operationId":"deletePreference","summary":"Delete a preference","description":"Deletes a preference, returning its key to having no record, as if nothing had ever been stated. The deletion itself is kept on the key's history, so a later statement is still ordered against what was deleted.\n\n**Person-stated opt-outs and active email Brand complaints cannot be deleted.** Attempts return `422 E25005`. To record renewed consent, use the individual `POST /v1/preferences` operation with `status: granted` and `consented_at` strictly later than the opt-out or complaint. Bulk writes and imports cannot clear complaints. Other applicable opt-outs and delivery blocks still apply.\n\nA delete is ordered like any statement, using the time it is received: if the record carries a statement made after that moment, the delete is refused and returned with `applied: false` alongside the surviving record. An ID that does not exist in the workspace returns `404`.\n","tags":["preferences"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"preferences.delete","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The outcome. `applied: true` with a null `preference` means the record is gone; `applied: false` means a newer statement survived the delete and is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceWriteResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/contact-properties":{"post":{"operationId":"createContactProperty","x-snippet-key":"contact_properties.create","summary":"Create a contact property","description":"Defines a custom property that contacts in the workspace can carry. The key becomes available in contact `data` and as a template variable in broadcasts. The key and type cannot be changed after creation.\n\nA key already in use returns a conflict error. A workspace can hold at most 200 properties; archived properties keep their key and count toward that limit.\n","tags":["email-contacts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactPropertyCreateRequest"}}}},"responses":{"201":{"description":"Contact property created.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactProperty"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"get":{"operationId":"listContactProperties","x-snippet-key":"contact_properties.list","summary":"List contact properties","description":"Returns a paginated list of the workspace's contact properties, newest first. Archived properties are included; check each entry's `archived` flag.\n","tags":["email-contacts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of contact properties.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactPropertyList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/contact-properties/{property_id}":{"get":{"operationId":"getContactProperty","x-snippet-key":"contact_properties.get","summary":"Get a contact property","description":"Returns a single contact property: its immutable key and type, the fallback value, and whether it is archived.\n","tags":["email-contacts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"property_id","in":"path","required":true,"description":"ID of the contact property to fetch.","schema":{"$ref":"#/components/schemas/ContactPropertyID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The contact property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactProperty"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"patch":{"operationId":"updateContactProperty","x-snippet-key":"contact_properties.update","summary":"Update a contact property","description":"Updates a contact property's fallback value, the only mutable field. The key and type cannot be changed after creation; create a new property instead.\n","tags":["email-contacts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"property_id","in":"path","required":true,"description":"ID of the contact property to update.","schema":{"$ref":"#/components/schemas/ContactPropertyID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactPropertyUpdateRequest"}}}},"responses":{"200":{"description":"The updated contact property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactProperty"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/contact-properties/{property_id}/archive":{"post":{"operationId":"archiveContactProperty","x-snippet-key":"contact_properties.archive","summary":"Archive a contact property","description":"Archiving is how you remove a contact property. Bird keeps its values so you can restore it with Unarchive.\n\nThe property disappears from property pickers, including import column mapping. New template versions that read it cannot be published. The publish error names the property. Templates already published keep sending and fill in its value. You can still read and update the property's values through the API and imports. Values must match the property's type. See [Archiving a property](/docs/guides/email/contacts#archiving-a-property) for more details.\n\nArchiving returns a `409` conflict while a published automation, including a paused one, uses the property in a trigger or contact write. An active run that writes the property also blocks archiving. Remove the property from those automations or archive them. Let active runs finish or cancel them, then archive the property again. If you have permission to read automations, the error names up to five that use the property.\n\nThe key stays reserved and counts toward the workspace's 200-property limit. Archiving an already archived property also returns a `409` conflict. Use [Unarchive a contact property](/docs/api/reference/unarchive-contact-property) to restore it.\n","tags":["email-contacts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"property_id","in":"path","required":true,"description":"ID of the contact property to archive.","schema":{"$ref":"#/components/schemas/ContactPropertyID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The archived contact property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactProperty"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/contact-properties/{property_id}/unarchive":{"post":{"operationId":"unarchiveContactProperty","x-snippet-key":"contact_properties.unarchive","summary":"Unarchive a contact property","description":"Restores an archived contact property with its stored values. It appears in property pickers again and can be used in new template versions. Unarchiving a property that is not archived returns a `409` conflict.\n","tags":["email-contacts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"property_id","in":"path","required":true,"description":"ID of the contact property to unarchive.","schema":{"$ref":"#/components/schemas/ContactPropertyID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The reactivated contact property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactProperty"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/audiences":{"post":{"operationId":"createAudience","x-snippet-key":"audiences.create","summary":"Create an audience","description":"Creates an audience in the workspace. New audiences start empty: add members with [Add contacts to an audience](/docs/api/reference/assign-audience-contacts) or through [Create or update contacts in bulk](/docs/api/reference/create-contact-batch). The `type` field currently accepts only `static` audiences.\n","tags":["email-audiences"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceCreateRequest"}}}},"responses":{"201":{"description":"The created audience.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Audience"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["attio","cli","mcp","n8n","sdk"]},"get":{"operationId":"listAudiences","x-snippet-key":"audiences.list","summary":"List audiences","description":"Returns a paginated list of audiences in the workspace, newest first. Filter to audiences whose name contains a substring with `q`.\n","tags":["email-audiences"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"q","in":"query","required":false,"description":"Case-insensitive substring match against the audience's name.","schema":{"type":"string","minLength":1},"example":"newsletter"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of audiences.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["attio","cli","mcp","n8n","sdk"]}},"/v1/audiences/{audience_id}":{"get":{"operationId":"getAudience","x-snippet-key":"audiences.get","summary":"Get an audience","description":"Returns a single audience: its name, description, and type. The member list is separate; fetch it with [List an audience's contacts](/docs/api/reference/list-audience-contacts).\n","tags":["email-audiences"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"audience_id","in":"path","required":true,"description":"ID of the audience to fetch.","schema":{"$ref":"#/components/schemas/AudienceID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The audience.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Audience"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["attio","cli","mcp","n8n","sdk"]},"patch":{"operationId":"updateAudience","x-snippet-key":"audiences.update","summary":"Update an audience","description":"Updates an audience's name or description. Omitted fields are left unchanged; set `description` to `null` to clear it.\n","tags":["email-audiences"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"audience_id","in":"path","required":true,"description":"ID of the audience to update.","schema":{"$ref":"#/components/schemas/AudienceID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceUpdateRequest"}}}},"responses":{"200":{"description":"The updated audience.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Audience"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"delete":{"operationId":"deleteAudience","x-snippet-key":"audiences.delete","summary":"Delete an audience","description":"Deletes an audience and its memberships. Contacts themselves are not deleted. An audience cannot be deleted while a broadcast targeting it is scheduled, accepted, sending, waiting_for_funds, paused, or canceling; cancel that broadcast first, then retry.\n","tags":["email-audiences"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"audience_id","in":"path","required":true,"description":"ID of the audience to delete.","schema":{"$ref":"#/components/schemas/AudienceID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The audience was deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/audiences/{audience_id}/membership":{"get":{"operationId":"getAudienceMembership","x-snippet-key":"audiences.membership","summary":"Get audience membership","description":"Returns the exact number of audience members at the source evaluation instant, including contacts without email and unsubscribed contacts. Membership is absent when the count is unavailable; an empty audience has total zero. For daily observations, use [Get audience membership statistics](/docs/api/reference/get-audience-membership-statistics).\n\nReturns 421 when the workspace's organization is served from a different region from the API host. Retry against that workspace's regional host.\n","tags":["email-audiences"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"audience_id","in":"path","required":true,"description":"ID of the audience whose membership to read.","schema":{"$ref":"#/components/schemas/AudienceID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Exact audience membership, when available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceMembershipResponse"},"examples":{"available":{"summary":"Exact membership count","value":{"membership":{"total":1284,"data_as_of":"2026-10-12T09:41:07.512843Z"}}},"unavailable":{"summary":"Count unavailable, so membership is omitted rather than zero","value":{}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"421":{"$ref":"#/components/responses/MisdirectedRequest"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/audiences/{audience_id}/membership-statistics":{"get":{"operationId":"getAudienceMembershipStatistics","x-snippet-key":"audiences.membership_history","summary":"Get audience membership statistics","description":"Returns the first successful observation for each requested UTC date, in chronological order. Changes between observations are unobserved. A missing observation has null total and observed_at; a successful empty audience has zero members. History retains today and the preceding 364 UTC dates; older requested dates are gaps. No history is reconstructed before observation began.\n\nOnly daily UTC observations are supported. Period data_as_of is always null because samples do not establish continuous freshness; each point carries its actual observed_at. Future, reversed, invalid or longer-than-365-date windows return 422. For the current exact count, use [Get audience membership](/docs/api/reference/get-audience-membership).\n\nReturns 421 when the workspace's organization is served from a different region from the API host. Retry against that workspace's regional host.\n","tags":["email-audiences"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"audience_id","in":"path","required":true,"description":"ID of the audience whose observations to read.","schema":{"$ref":"#/components/schemas/AudienceID"}},{"name":"from","in":"query","required":false,"description":"Inclusive first UTC date. Defaults to 30 days before to, yielding 31 inclusive dates.","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"description":"Inclusive last UTC date. Defaults to today in UTC; future dates are rejected. At most 365 inclusive dates.","schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Daily membership observations for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceMembershipStatisticsResponse"},"examples":{"daily-with-gap":{"summary":"A missing observation, an empty audience, and two observed counts","value":{"period":{"from":"2026-10-09","to":"2026-10-12","data_as_of":null},"data":[{"bucket":"2026-10-09","total":null,"observed_at":null},{"bucket":"2026-10-10","total":0,"observed_at":"2026-10-10T00:07:12.218Z"},{"bucket":"2026-10-11","total":1279,"observed_at":"2026-10-11T00:05:48.903Z"},{"bucket":"2026-10-12","total":1284,"observed_at":"2026-10-12T00:06:31.44Z"}]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"421":{"$ref":"#/components/responses/MisdirectedRequest"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/audiences/{audience_id}/contacts":{"get":{"operationId":"listAudienceContacts","x-snippet-key":"audiences.list_contacts","summary":"List an audience's contacts","description":"Lists the contacts in a static audience as a cursor page, ordered by the time each contact joined the audience, most recent first. Each entry is the contact together with the time it joined.\n","tags":["email-audiences"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"audience_id","in":"path","required":true,"description":"ID of the audience whose contacts to list.","schema":{"$ref":"#/components/schemas/AudienceID"}},{"name":"q","in":"query","required":false,"description":"Case-insensitive substring match against a contact's email address, first name, last name, or the digits in its international phone number.","schema":{"type":"string","minLength":1},"example":"acme.com"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of the audience's contacts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceMemberList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"post":{"operationId":"assignAudienceContacts","x-snippet-key":"audiences.add_contacts","summary":"Assign contacts to an audience","description":"Adds up to 1,000 contacts to an audience. Adding is idempotent: contacts that are already members are left in place and keep their original join time. If any contact ID does not exist in the workspace, the whole request fails with `422 Unprocessable Entity` and no contacts are added.\n","tags":["email-audiences"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"audience_id","in":"path","required":true,"description":"ID of the audience to add contacts to.","schema":{"$ref":"#/components/schemas/AudienceID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceContactsAddRequest"}}}},"responses":{"204":{"description":"Contacts added to the audience.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["attio","cli","mcp","n8n","sdk"]}},"/v1/audiences/{audience_id}/contacts/remove":{"post":{"operationId":"unassignAudienceContacts","x-snippet-key":"audiences.remove_contacts","summary":"Unassign contacts from an audience","description":"Removes up to 1,000 contacts from an audience. Contacts that are not members are skipped. If any contact ID does not exist in the workspace, the whole request fails with `422 Unprocessable Entity` and no memberships are removed. The contacts themselves are not deleted and remain members of any other audiences.\n","tags":["email-audiences"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"audience_id","in":"path","required":true,"description":"ID of the audience to remove contacts from.","schema":{"$ref":"#/components/schemas/AudienceID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceContactsRemoveRequest"}}}},"responses":{"204":{"description":"Contacts removed from the audience.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["attio","cli","mcp","n8n","sdk"]}},"/v1/audiences/{audience_id}/contacts/{contact_id}":{"delete":{"operationId":"unassignAudienceContact","x-snippet-key":"audiences.remove_contact","summary":"Unassign a contact from an audience","description":"Removes a contact's membership in an audience. The contact itself is not deleted and remains a member of any other audiences. Removing a contact that is not a member of the audience succeeds with no effect (`204 No Content`); an unknown audience or contact returns a not-found error.\n","tags":["email-audiences"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"audience_id","in":"path","required":true,"description":"ID of the audience to remove the contact from.","schema":{"$ref":"#/components/schemas/AudienceID"}},{"name":"contact_id","in":"path","required":true,"description":"ID of the contact to remove.","schema":{"$ref":"#/components/schemas/ContactID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The contact was removed from the audience, or was already not a member."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/messages":{"post":{"operationId":"createSMSMessage","x-snippet-key":"sms.send","summary":"Create an SMS message","description":"Sends one SMS or MMS to one recipient. Direct sends require `text` or\n`media_urls`, plus `category` and `from`. A nonempty `subject` or `media_urls`\nselects MMS, which requires a recipient with calling code `+1` and an\nMMS-capable number held by the workspace. A subject alone is invalid.\nStored templates remain text-only: they supply the category; workspace\ntemplates require `from`, while built-in templates select their sender.\nFor up to 100 messages, use [Send a batch](/docs/api/reference/create-sms-message-batch).\n\nThe `202 Accepted` response confirms acceptance for asynchronous delivery.\nFollow [Get an SMS message](/docs/api/reference/get-sms-message) or `sms.*`\nwebhook events for delivery status. SMS is billed per segment; MMS uses one\nmessage unit and separate MMS rates. Media must remain publicly fetchable;\nthe carrier's 600 KiB per-file and 900 KiB total limits are checked during delivery.\n\nInvalid content, SMS exceeding 12 segments, a disabled destination country,\nor a sender not permitted for the destination returns `422`.\nInsufficient wallet balance returns `402`.\n","tags":["sms-messages"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSMessageSendRequest"},"examples":{"sms-smart-encoding":{"summary":"A send with smart encoding, which downgrades look-alike characters to GSM-7","value":{"to":"+31612345678","from":"Bird","text":"Your order shipped, track it here…","category":"transactional","options":{"smart_encoding":true}}},"sms-template":{"summary":"A send that renders a stored template","value":{"to":"+14155550100","template":{"slug":"bird_otp_verification","parameters":{"code":"123456"}}}},"onboarding-sms":{"summary":"The first send from the dashboard's onboarding step","value":{"to":"+14155550100","template":{"slug":"bird_otp_verification","parameters":{"code":"493021"}}}}}}}},"responses":{"202":{"description":"Message accepted for asynchronous delivery.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSMessage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["attio","cli","make","mcp","medusa","n8n","sdk"]},"get":{"operationId":"listSMSMessages","x-snippet-key":"sms.list","summary":"List SMS messages","description":"Returns the workspace's SMS messages as a cursor-paginated list, newest\nfirst. Filter by message type, direction, status, category, recipient, sender,\ndestination country, failure reason, tag, or creation time; pass the\nresponse's `next_cursor` back as `starting_after` to fetch the next page.\nTo follow a single message's delivery, use\n[Get an SMS message](/docs/api/reference/get-sms-message) instead.\n\nMessages are retained for **30 days**. A `created_after` earlier than that\nis accepted and raised to the retention bound rather than rejected, so a\nwider window returns what is still retained instead of failing. Messages\nolder than the retention window cannot be retrieved.\n","tags":["sms-messages"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/CreatedAfter"},{"$ref":"#/components/parameters/CreatedBefore"},{"name":"content_type","in":"query","required":false,"description":"Filter by the message's actual type: sms or mms. Omit to include both. Binary messages count as SMS. Message history retains the stored type; previously recorded statistics may attribute the same message to SMS.","schema":{"$ref":"#/components/schemas/SMSContentType"}},{"name":"direction","in":"query","required":false,"description":"Filter by direction. Omit for both.","schema":{"$ref":"#/components/schemas/MessageDirection"}},{"name":"status","in":"query","required":false,"description":"Keep only messages whose current `status` matches; repeat the parameter to match any of several. One of `scheduled`, `accepted`, `sent`, `delivered`, `undelivered`, `failed`, `rejected`, `canceled`, `expired`, or `received`. `scheduled` and `canceled` are accepted but match nothing until send-later scheduling ships. With a `status` or `error_code` filter a page can hold fewer messages than `limit`, or none; keep paging until `next_cursor` is null.\n","schema":{"type":"array","items":{"type":"string","minLength":1}}},{"name":"error_code","in":"query","required":false,"description":"Keep only messages whose failure reason (`last_error.code`) matches; repeat the parameter to match any of several. Accepts any SMS error code, including codes added later, such as `invalid_destination`, `unreachable`, `blocked_by_carrier`, `blocked_by_fraud_protection`, `blocked_by_recipient`, `landline_unreachable`, `content_rejected`, `sender_unregistered`, `recipient_opted_out`, `provider_unavailable`, `insufficient_balance`, `workspace_suspended`, or `unknown`. With a `status` or `error_code` filter a page can hold fewer messages than `limit`, or none; keep paging until `next_cursor` is null.\n","schema":{"type":"array","items":{"type":"string","minLength":1}}},{"name":"category","in":"query","required":false,"description":"Filter by category.","schema":{"$ref":"#/components/schemas/SMSMessageCategory"}},{"name":"to","in":"query","required":false,"description":"Filter by recipient phone number (E.164 exact match).","schema":{"type":"string","example":"+14155550100"}},{"name":"from","in":"query","required":false,"description":"Filter by sender (E.164, alphanumeric, or short code; exact match).","schema":{"type":"string","example":"+15557654321"}},{"name":"country","in":"query","required":false,"description":"Filter by destination country, as an ISO 3166-1 alpha-2 code. An outbound message's country is the recipient's; a received message's is the country of the Bird number it arrived on.\n","schema":{"$ref":"#/components/schemas/CountryCode"}},{"$ref":"#/components/parameters/TagFilter"},{"$ref":"#/components/parameters/MessageReferenceFilter"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of messages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSMessageList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["attio","cli","mcp","n8n","sdk"]}},"/v1/sms/batches":{"post":{"operationId":"createSMSMessageBatch","x-snippet-key":"sms.sendBatch","summary":"Create a batch of SMS messages","description":"Sends up to 100 independent SMS or MMS messages in one request. Each item is a\ncomplete send request with its own recipient, content, ID, status, and\ncost. For a single message, use\n[Send an SMS message](/docs/api/reference/create-sms-message) instead.\n\nA nonempty `subject` or `media_urls` selects MMS for that item. MMS requires\ntext or media, a `+1` recipient and an MMS-capable number held by the workspace;\nit uses one message unit at MMS rates. Templates remain text-only.\n\nAcceptance is all-or-nothing: every item is validated before any is queued,\nand one invalid item rejects the whole batch with a `422` (nothing is\nsent). A batch from a workspace with no wallet balance fails with a `402`.\nThe `202` response lists the accepted messages in submission order; each\ndelivers asynchronously and is tracked individually, like a single send.\n","tags":["sms-messages"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSMessageBatchRequest"},"example":{"messages":[{"to":"+15551111111","from":"+15557654321","text":"Hi Alice!","category":"marketing"},{"to":"+15552222222","from":"+15557654321","text":"Hi Bob!","category":"marketing"}]}}}},"responses":{"202":{"description":"Batch accepted for asynchronous delivery.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSMessageBatchResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["mcp","n8n","sdk"]}},"/v1/sms/messages/{message_id}":{"get":{"operationId":"getSMSMessage","x-snippet-key":"sms.get","summary":"Get an SMS message","description":"Returns a single SMS message: its current delivery status, segment breakdown, cost, and failure detail when it failed. The `status` advances asynchronously as delivery progresses, and `cost` is null until the message has been priced, so poll this operation (or subscribe to `sms.*` webhook events) after a send to confirm delivery. To scan messages in bulk, use [List SMS messages](/docs/api/reference/list-sms-messages) instead.\n","tags":["sms-messages"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"description":"ID of the message, as returned in the send response's `id` field.","schema":{"$ref":"#/components/schemas/SMSMessageID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"SMS message with its current delivery status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSMessage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/messages/{message_id}/events":{"get":{"operationId":"listSMSMessageEvents","summary":"List events for an SMS message","description":"Returns the lifecycle event timeline for a message, in chronological order.","tags":["sms-messages"],"x-audiences":["public","command"],"x-snippet-key":"sms.list_events","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"description":"ID of the SMS message (`sms_` prefix), as returned when the message was accepted.","schema":{"$ref":"#/components/schemas/SMSMessageID"}},{"name":"type","in":"query","required":false,"description":"Filter by event type, such as `sms.delivered` or `sms.failed`.","schema":{"type":"string"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Event timeline for this message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSEventList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/messages/{message_id}/media/{media_id}":{"parameters":[{"name":"message_id","in":"path","required":true,"description":"SMS message ID.","schema":{"$ref":"#/components/schemas/SMSMessageID"}},{"name":"media_id","in":"path","required":true,"description":"Media ID, as returned in `id` on the message's `media` entry.","schema":{"$ref":"#/components/schemas/SMSFileID"}}],"get":{"operationId":"getSMSMessageMedia","x-snippet-key":"sms.messages.media","summary":"Get an SMS message's media","description":"Redirects to a short-lived URL for one attachment on a received MMS. This\nendpoint is what the `url` on an entry of the message's `media` points at.\nThe bytes live in object storage and are served straight from there, so they\nnever transit the API.\n\nThe response is a `302` whose `Location` is that pre-authorized storage URL,\nvalid for 15 minutes; your client must follow redirects. The `Authorization`\nheader must be absent from the request that fetches that URL.\n\nThe `sms.received` webhook can arrive before the message is readable. If\nthis operation returns `404` immediately after that event, retry the same\nmessage and media IDs with exponential backoff and a retry deadline. Retain\nthe event for later investigation if the deadline is reached; a `404` alone\ndoes not distinguish a delayed message from a missing one.\n\nAn attachment is kept for 30 days after the message is received. A `410`\nmeans the stored file is gone while the message is still readable: the\nmessage still lists the attachment's `mime_type` and `filename`, but the\nbytes cannot be served. Once the message itself expires this operation\nreturns `404`.\n","tags":["sms-messages"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"responses":{"302":{"description":"Redirect to a storage URL valid for 15 minutes.","headers":{"Location":{"description":"The storage URL to fetch the attachment from.","schema":{"type":"string","format":"uri"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/sms/templates":{"get":{"operationId":"listSMSTemplates","x-snippet-key":"smsTemplates.list","summary":"List SMS templates","description":"Returns SMS templates as a cursor-paginated list. The workspace's templates\ncome first, newest first, followed by our built-in templates by default.\nSet `order=asc` to reverse this order.\n\nFilter by scope, category, status, or language. Use `q` for a\ncase-insensitive substring match against slug, name, and description. The\nresponse is shallow; read a version to retrieve its content and variables.\n","tags":["sms-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"scope","in":"query","required":false,"description":"Filter by who owns the template. Use `system` for built-in templates and `workspace` for templates your workspace created.","schema":{"$ref":"#/components/schemas/TemplateScope"}},{"name":"category","in":"query","required":false,"description":"Return templates in this category.","schema":{"$ref":"#/components/schemas/SMSTemplateCategory"}},{"name":"status","in":"query","required":false,"description":"Return templates with this lifecycle status.","schema":{"$ref":"#/components/schemas/TemplateStatus"}},{"name":"language","in":"query","required":false,"description":"Return templates whose published content contains this language, after the tag is canonicalized. Draft-only languages do not match.","schema":{"$ref":"#/components/schemas/LanguageTag"}},{"name":"q","in":"query","required":false,"description":"A case-insensitive substring search across slug, name, and description.","schema":{"type":"string","minLength":1}},{"name":"sort","in":"query","required":false,"description":"Field to sort by.","schema":{"$ref":"#/components/schemas/SMSTemplateSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of SMS templates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSTemplateList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["attio","cli","mcp","n8n","sdk"]}},"/v1/sms/templates/{template_ref}":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's ID (`smt_…`) or slug. Built-in templates use a `bird_` slug. Write operations accept workspace templates because built-in templates are read-only.\n","schema":{"type":"string","minLength":1,"maxLength":63},"example":"bird_otp_verification"}],"get":{"operationId":"getSMSTemplate","x-snippet-key":"smsTemplates.get","summary":"Get an SMS template","description":"Returns one SMS template's metadata, policies, language states, draft revision, and draft and live version IDs. The response is shallow; read a version to retrieve content and variables. An unknown or deleted template returns `404`.\n","tags":["sms-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The requested SMS template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSTemplate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["attio","cli","mcp","n8n","sdk"]}},"/v1/sms/templates/{template_ref}/versions":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's ID (`smt_…`) or slug.","schema":{"type":"string","minLength":1,"maxLength":63},"example":"order-shipped"}],"get":{"operationId":"listSMSTemplateVersions","x-snippet-key":"smsTemplates.versions.list","summary":"List an SMS template's versions","description":"Returns a cursor-paginated version history, newest first. Each entry is shallow and names its variables and languages. Read a version item or one of its languages to retrieve text. A built-in template exposes its current catalogue content as one synthetic published version.\n","tags":["sms-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"sort","in":"query","required":false,"description":"Field to sort by.","schema":{"$ref":"#/components/schemas/SMSTemplateSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of template versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSTemplateVersionList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/sms/templates/{template_ref}/versions/{version_id}":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's ID (`smt_…`) or slug.","schema":{"type":"string","minLength":1,"maxLength":63},"example":"order-shipped"},{"name":"version_id","in":"path","required":true,"description":"The version to read or reset.","schema":{"$ref":"#/components/schemas/SMSTemplateVersionID"}}],"get":{"operationId":"getSMSTemplateVersion","x-snippet-key":"smsTemplates.versions.get","summary":"Get an SMS template version","description":"Returns one version with its variables and text in every language. A workspace draft is editable, while published workspace versions are immutable. A built-in template exposes its current catalogue content through a synthetic published version.\n","tags":["sms-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The requested SMS template version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSTemplateVersion"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["attio","cli","mcp","sdk"]}},"/v1/sms/templates/{template_ref}/versions/{version_id}/languages":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's ID (`smt_…`) or slug.","schema":{"type":"string","minLength":1,"maxLength":63},"example":"order-shipped"},{"name":"version_id","in":"path","required":true,"description":"The version whose languages to list.","schema":{"$ref":"#/components/schemas/SMSTemplateVersionID"}}],"get":{"operationId":"listSMSTemplateVersionLanguages","x-snippet-key":"smsTemplates.versions.languages.list","summary":"List an SMS template version's languages","description":"Returns the languages a version holds, ordered by canonical language tag, without their text. Each summary includes the revision and content hash needed to detect changes. A version holds at most 25 languages.\n","tags":["sms-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The version's language summaries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSTemplateLanguageList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/sms/templates/{template_ref}/versions/{version_id}/languages/{language}":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's ID (`smt_…`) or slug.","schema":{"type":"string","minLength":1,"maxLength":63},"example":"order-shipped"},{"name":"version_id","in":"path","required":true,"description":"The version that holds the language.","schema":{"$ref":"#/components/schemas/SMSTemplateVersionID"}},{"name":"language","in":"path","required":true,"description":"The language as a BCP-47 tag. Case and separator differences are accepted and canonicalized.","schema":{"$ref":"#/components/schemas/LanguageTag"},"example":"pt-BR"}],"get":{"operationId":"getSMSTemplateVersionLanguage","x-snippet-key":"smsTemplates.versions.languages.get","summary":"Get an SMS template version's language","description":"Returns one language's full text, revision, content hash, and update time. The response echoes the language in its canonical BCP-47 form.\n","tags":["sms-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The requested language and its text.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSTemplateLanguage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/sms/suppressions":{"get":{"operationId":"listSMSSuppressions","summary":"List SMS suppressions","description":"Returns the suppressions currently stopping your messages, most recent opt-out first. Pass `destination` to look up one subscriber before sending to them.\n\nA suppression covers one sender and one subscriber, so the same number can appear more than once: opting out of one of your senders does not opt out of the others.\n\nEnded suppressions are excluded. A subscriber who opted back in is reachable again and does not appear in this list.\n","tags":["sms-suppressions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"sms_suppressions.list","parameters":[{"name":"destination","in":"query","required":false,"description":"Return only suppressions for this exact subscriber number in E.164 form. Prefix matching is unsupported.\n","schema":{"type":"string","minLength":2,"maxLength":20},"example":"+15550001234"},{"name":"originator","in":"query","required":false,"description":"Return only suppressions covering this sender.","schema":{"type":"string","minLength":1,"maxLength":20},"example":"+15557654321"},{"name":"reason","in":"query","required":false,"description":"Return only suppressions with this reason:\n\n- `keyword_stop`: The subscriber texted a stop keyword to the sender.\n- `carrier_opted_out`: Their carrier reported the opt-out.\n- `manual`: Added through the API or dashboard.\n","schema":{"$ref":"#/components/schemas/SMSSuppressionReasonFilter"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of SMS suppressions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSSuppressionList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"post":{"operationId":"createSMSSuppression","summary":"Create an SMS suppression","description":"Stops a sender's messages to a subscriber, with reason `manual`, blocking every category including transactional. Both ends are required: a suppression covers a sender-and-subscriber pair, so stopping all of your senders means one call per sender.\n\nAdding is idempotent. A `201` means a new suppression was recorded, and a `200` means a `manual` one for that pair was already in place and is returned with `last_asserted_at` moved to this call, nothing else changed. A pair already stopped for another reason, such as the subscriber having texted a stop keyword, still gets its own `manual` record, and messages stay stopped until every one of them has ended.\n","tags":["sms-suppressions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"sms_suppressions.add","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSSuppressionCreate"},"example":{"destination":"+15550001234","originator":"+15557654321"}}}},"responses":{"200":{"description":"A manual suppression for this pair was already in place. The existing one is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSSuppression"}}}},"201":{"description":"Suppression recorded.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSSuppression"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/suppressions/{suppression_id}":{"parameters":[{"name":"suppression_id","in":"path","required":true,"description":"ID of the suppression, as returned when it was created or listed.\n","schema":{"$ref":"#/components/schemas/SMSSuppressionID"},"example":"ssu_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"getSMSSuppression","summary":"Get an SMS suppression","description":"Returns one suppression: the sender and subscriber it covers, why messages are stopped, how the record came to exist, what it blocks, and whether it is still in force.\n\nThis operation also returns a suppression that has already ended. The `blocking` field is `false`, and the `ended_*` fields say when and why. An ID you kept from a create or delete therefore stays readable. To find one when you only know the number, use `GET /v1/sms/suppressions` with the `destination` parameter. An ID that does not exist in the workspace returns `404`.\n","tags":["sms-suppressions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"sms_suppressions.get","responses":{"200":{"description":"SMS suppression.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSSuppression"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n","sdk"]},"delete":{"operationId":"deleteSMSSuppression","summary":"End an SMS suppression","description":"Ends a suppression, so the sender reaches the subscriber again. The record stays with the ending noted on it. This history helps answer later complaints or carrier audits.\n\n**Only the `manual` reason can be ended here.** A `keyword_stop` is the subscriber's own statement. It ends only when they text a start keyword to that sender. A `carrier_opted_out` mirrors what the carrier reported, so it ends when the carrier says so. Attempts to end either reason return `422`.\n\nEnding a suppression resumes messaging to someone your own records say did not want it, so do it only when you know why the `manual` record exists. An ID that does not exist in the workspace returns `404`, and one that has already ended returns `204`.\n","tags":["sms-suppressions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"sms_suppressions.remove","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Suppression ended."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/keyword-rules":{"get":{"operationId":"listSMSKeywordRules","summary":"List SMS keyword rules","description":"Returns the default and workspace keyword rules that apply to inbound messages, most specific first. Where the default catalog covers a country, opt-out, opt-in, and help keywords work without setup.\n\nUse the filters to narrow the full, unpaginated list. Set `scope=system` for default rules only. Set `number` for rules in evaluation order, and add `from_country` to account for the sender's country.\n\nDefault coverage varies by country. If a country has no default rules, the service does not recognize keywords, send replies, or record opt-outs there. You can add `custom` keywords for that country. Opt-out, opt-in, and help rules require default coverage.\n","tags":["sms-keyword-rules"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"sms_keyword_rules.list","parameters":[{"name":"country","in":"query","required":false,"description":"Keep only rules that apply in this country, as an ISO 3166-1 alpha-2 code. Omit for every country the default catalog covers, plus your own rules.\n","schema":{"type":"string","minLength":2,"maxLength":2,"example":"NL"}},{"name":"number","in":"query","required":false,"description":"Keep only the rules that apply to this number of yours, in E.164 format or as a short code, ordered the way they are applied to an inbound message.\n","schema":{"type":"string","minLength":1,"example":"+18005551234"}},{"name":"from_country","in":"query","required":false,"description":"The country a sender is messaging from, as an ISO 3166-1 alpha-2 code. Use it with `number` to see what someone in that country gets, which can differ from what a local sender gets. Ignored without `number`.\n","schema":{"type":"string","minLength":2,"maxLength":2,"example":"CA"}},{"name":"operation","in":"query","required":false,"description":"Keep only rules for this operation. Omit for all of them.","schema":{"$ref":"#/components/schemas/SMSKeywordOperation"}},{"name":"scope","in":"query","required":false,"description":"Keep only default rules (`system`) or only the rules you created (`workspace`). Omit for both.\n","schema":{"$ref":"#/components/schemas/SMSKeywordRuleScope"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The keyword rules that apply to your workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSKeywordRuleList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"post":{"operationId":"createSMSKeywordRule","summary":"Create an SMS keyword rule","description":"Creates a workspace keyword rule. Use it to replace the default opt-out, opt-in, or help reply for one country, or to add a `custom` keyword.\n\nYour rule takes precedence over the default for the same country and keeps default keywords unless you add more. Opt-out and opt-in keywords cannot be assigned to another operation.\n","tags":["sms-keyword-rules"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"sms_keyword_rules.create","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSKeywordRuleCreate"}}}},"responses":{"201":{"description":"The created rule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSKeywordRule"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/keyword-rules/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"ID of the default or workspace keyword rule, as returned by the list operation.","schema":{"$ref":"#/components/schemas/SMSKeywordRuleID"}}],"get":{"operationId":"getSMSKeywordRule","summary":"Get an SMS keyword rule","description":"Returns one keyword rule, either one of Bird's defaults or one you created, including\nevery keyword that matches it and the reply it sends.\n","tags":["sms-keyword-rules"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"sms_keyword_rules.get","responses":{"200":{"description":"The keyword rule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSKeywordRule"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n","sdk"]},"patch":{"operationId":"updateSMSKeywordRule","summary":"Update an SMS keyword rule","description":"Changes the reply or the added keywords of a rule you created. Bird's defaults cannot be\nchanged. To replace one, create a rule with the same operation and country and yours\ntakes precedence.\n\nWhat the rule applies to is fixed once created, so this changes the reply and the keywords\nonly.\n","tags":["sms-keyword-rules"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"sms_keyword_rules.update","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSKeywordRuleUpdate"}}}},"responses":{"200":{"description":"The updated rule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSKeywordRule"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"delete":{"operationId":"deleteSMSKeywordRule","summary":"Delete an SMS keyword rule","description":"Deletes a rule you created. Bird's default for that operation and country applies again straight away, so deleting an opt-out rule restores Bird's reply rather than switching opt-out off. Bird's defaults cannot be deleted.\n","tags":["sms-keyword-rules"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"sms_keyword_rules.delete","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The rule was deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/messaging-profiles":{"get":{"operationId":"listSMSMessagingProfiles","summary":"List SMS messaging profiles","description":"Returns your workspace's messaging profiles, newest first. A profile holds the senders, reply numbers, and sending defaults for one program.\n","tags":["sms-messaging-profiles"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"sort","in":"query","required":false,"description":"Field to sort by.","schema":{"$ref":"#/components/schemas/SMSMessagingProfileSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of messaging profiles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSMessagingProfileList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp"]},"post":{"operationId":"createSMSMessagingProfile","summary":"Create an SMS messaging profile","description":"Creates a messaging profile for one program in your workspace.\n\nA profile chooses the sender for each destination country, lists the numbers that receive replies, and sets defaults such as the category and smart encoding. Every sender and number must belong to your workspace, and a number can belong to one profile at a time. A profile can also hold a keyword: a received message that opens with it belongs to the profile on any of the workspace's numbers, and one profile in a workspace can hold a given keyword. A send that names the profile in `messaging_profile_id` takes its sender, default category, and smart encoding from it when the send leaves them out. The values on a profile are defaults: an explicit `from`, `category`, or `options.smart_encoding` on the send wins.\n","tags":["sms-messaging-profiles"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSMessagingProfileCreate"}}}},"responses":{"201":{"description":"The created profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSMessagingProfile"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp"]}},"/v1/sms/messaging-profiles/{profile_id}":{"parameters":[{"name":"profile_id","in":"path","required":true,"description":"ID of the messaging profile, as returned when you created or listed profiles.","schema":{"$ref":"#/components/schemas/SMSMessagingProfileID"}}],"get":{"operationId":"getSMSMessagingProfile","summary":"Get an SMS messaging profile","description":"Returns one messaging profile, including its senders, reply numbers, and sending defaults.\n","tags":["sms-messaging-profiles"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The messaging profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSMessagingProfile"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp"]},"patch":{"operationId":"updateSMSMessagingProfile","summary":"Update an SMS messaging profile","description":"Changes a messaging profile. Properties you omit keep their value, including those inside `inbound` and `options`, and `null` clears a property that accepts it.\n\n`senders` and `inbound.numbers` replace the whole list, so send every entry you want to keep. The change applies to later sends that name the profile; messages already sent keep what they used. Sends and inbound attribution can use the previous settings for up to 60 seconds.\n","tags":["sms-messaging-profiles"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSMessagingProfileUpdate"}}}},"responses":{"200":{"description":"The updated profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSMessagingProfile"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp"]},"delete":{"operationId":"deleteSMSMessagingProfile","summary":"Delete an SMS messaging profile","description":"Deletes a messaging profile and releases its reply numbers and keyword, so another profile can use them and a new profile can reuse the name.\n\nMessages already sent are not affected. A later send that names the deleted profile returns `422` `SMSMessagingProfileNotFound`. Sends and inbound reply attribution can keep using a deleted profile for up to 60 seconds, because Bird caches profiles for that long.\n","tags":["sms-messaging-profiles"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The profile was deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp"]}},"/v1/compliance/identities":{"post":{"operationId":"createComplianceIdentity","x-snippet-key":"compliance_identities.create","summary":"Create an identity","description":"Stores a party you register on behalf of, so its business details can prefill\nthe countries you register in next.\n\nAn identity belongs to the workspace that creates it. Register the same party\nfrom another workspace and it is a party of its own there, reviewed on its own\nterms.\n\nYou can name a party now and fill its business details in later. Required\ndetails depend on the destination country and are validated when you submit a\nregistration.\n","tags":["compliance"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard"],"x-data-region":"regional","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceIdentityCreate"}}}},"responses":{"201":{"description":"The identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceIdentity"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["sdk"]},"get":{"operationId":"listComplianceIdentities","x-snippet-key":"compliance_identities.list","summary":"List identities","description":"Returns the parties this workspace has stored, newest first.\n","tags":["compliance"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"x-data-region":"regional","parameters":[{"name":"sort","in":"query","required":false,"description":"Field to sort by. Defaults to `created_at`.","schema":{"$ref":"#/components/schemas/ComplianceIdentitySortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The identities.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceIdentityList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/compliance/identities/{identity_id}":{"parameters":[{"name":"identity_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ComplianceIdentityID"},"description":"Identity ID."}],"get":{"operationId":"getComplianceIdentity","x-snippet-key":"compliance_identities.get","summary":"Get an identity","description":"Returns one of this workspace's parties, with the business details it holds.\n","tags":["compliance"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"x-data-region":"regional","responses":{"200":{"description":"The identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceIdentity"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateComplianceIdentity","x-snippet-key":"compliance_identities.update","summary":"Update an identity name","description":"Renames the party.\n\nOnly the name is yours to set. The business details are filled in from your\nregistrations: each single-value answer you file about the party is written\nback onto it, whatever the verdict. Documents and multi-value answers are\nnot kept on the party. To correct one, send the new value on a registration.\n\nRenaming does not disturb registrations already filed with this party. A verdict\nalready given stands against the details it was given for.\n","tags":["compliance"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard"],"x-data-region":"regional","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceIdentityUpdate"}}}},"responses":{"200":{"description":"The updated identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceIdentity"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["sdk"]},"delete":{"operationId":"deleteComplianceIdentity","x-snippet-key":"compliance_identities.delete","summary":"Delete an identity","description":"Retires a party so it no longer appears in your list or prefills a\nregistration.\n\nRegistrations already filed with it are untouched, and so are the verdicts they\nearned: a review already given stands whether or not the party is still listed.\n","tags":["compliance"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard"],"x-data-region":"regional","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The identity was deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["sdk"]}},"/v1/compliance/attachments":{"post":{"operationId":"createComplianceAttachment","x-snippet-key":"compliance_attachments.create","summary":"Create a registration attachment","description":"Uploads a document that answers a compliance requirement, such as the proof\nof address a country asks for before it approves a number. Send the file as a\n`multipart/form-data` body with the bytes in a `file` part.\n\nA requirement whose `data_type` is `document` is answered with attachment IDs\nrather than a typed value. Pass the returned ID as the answer's\n`attachment_id`, or in its `attachment_ids` where the requirement accepts\nseveral. Upload before you file the submission that cites the attachment. An\nunused attachment expires after seven days. After a submission cites it, the\nattachment no longer expires and you can reuse it elsewhere in the workspace,\nincluding as evidence for a 10DLC registration. Toll-free verification\nevidence must be a PNG or JPEG image.\n\nPNG, JPEG, and PDF files up to 10 MB are accepted. Uploading a file whose\ncontents match an existing attachment returns that attachment instead of\ncreating a duplicate.\n","tags":["attachments"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AttachmentUpload"}}}},"responses":{"200":{"description":"An attachment with identical contents already existed and was returned unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attachment"}}}},"201":{"description":"The uploaded attachment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attachment"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"get":{"operationId":"listComplianceAttachments","x-snippet-key":"compliance_attachments.list","summary":"List registration attachments","description":"Returns the registration attachments uploaded for the workspace, most recent first. Use this to offer a previously uploaded file for reuse on a new registration instead of uploading it again. Attachments that were never cited by a registration and have expired are not listed.\n","tags":["attachments"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"sort","in":"query","required":false,"description":"Field to sort by. Defaults to `created_at`.","schema":{"$ref":"#/components/schemas/AttachmentSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of attachments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/compliance/attachments/{attachment_id}":{"parameters":[{"name":"attachment_id","in":"path","required":true,"description":"Attachment ID.","schema":{"$ref":"#/components/schemas/AttachmentID"}}],"get":{"operationId":"getComplianceAttachment","x-snippet-key":"compliance_attachments.get","summary":"Get a registration attachment","description":"Downloads the raw bytes of a registration attachment, returned with its own content type and a Content-Disposition header carrying its filename.\n","tags":["attachments"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"responses":{"200":{"description":"The raw attachment bytes.","headers":{"Content-Disposition":{"description":"Carries the attachment filename. `inline` for images, `attachment` for everything else.\n","schema":{"type":"string"}}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteComplianceAttachment","x-snippet-key":"compliance_attachments.delete","summary":"Delete a registration attachment","description":"Deletes an uploaded registration attachment. This succeeds only while the file is unused. After a registration cites the attachment, it is retained as evidence and the request returns `409`.\n","tags":["attachments"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Attachment deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/asset-upload-sessions":{"post":{"operationId":"createAssetUploadSession","x-snippet-key":"assets.uploads.create","summary":"Create a media-library upload session","description":"Creates or recovers a session. An upload instruction is omitted when the session is no longer pending or another instruction was issued within the last 30 seconds; follow the returned state and next steps. Repeating the same client reference with identical input recovers its original session, including the active file descriptor if a browser selection changed it. A changed request with that reference is refused. Upload instructions can be refreshed after 30 seconds. Creating a session does not publish the file. Completion publishes it at a permanent public URL.\n\nIn each region, you can have up to 20 unexpired sessions per workspace, 100 per organization, and 500 MiB of reserved source bytes per organization. A new session reserves `file.size_bytes`; a request that would exceed a limit returns `429` with `E20021`. Replaying an existing session does not reserve capacity again.\n\nSessions count toward the session limits until their one-hour expiry, including completed and cancelled sessions. Completing, cancelling, or expiring a session does not immediately release its reserved bytes: issued upload URLs must expire and cleanup must succeed. Retry new creates after capacity becomes available.\n","tags":["asset-uploads"],"security":[{"BearerAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetUploadSessionCreate"}}}},"responses":{"200":{"description":"The upload session and its next steps.","headers":{"Cache-Control":{"description":"Responses are not stored by caches.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetUploadSessionInstruction"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/asset-upload-sessions/{upload_id}":{"get":{"operationId":"getAssetUploadSession","x-snippet-key":"assets.uploads.get","summary":"Get a media-library upload session","description":"Returns the upload session and its saved publication receipt. Requires current asset write access and the connection that created the session. Status checks do not issue another upload capability.","tags":["asset-uploads"],"security":[{"BearerAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/AssetUploadSessionId"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The upload session and its next steps.","headers":{"Cache-Control":{"description":"Responses are not stored by caches.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetUploadSessionDetails"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/asset-upload-sessions/{upload_id}/prepare":{"post":{"operationId":"createAssetUploadInstruction","x-snippet-key":"assets.uploads.prepare","summary":"Refresh a media-library upload instruction","description":"Refreshes the temporary upload instruction for a pending session. File properties and the one-hour session deadline remain unchanged. This operation accepts no replacement file or metadata; an authorized browser may have selected a different source since creation. Use the returned file descriptor.","tags":["asset-uploads"],"security":[{"BearerAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AssetUploadSessionId"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The pending session, its upload instruction, and its next steps.","headers":{"Cache-Control":{"description":"Responses are not stored by caches.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetUploadSessionPrepared"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/asset-upload-sessions/{upload_id}/complete":{"post":{"operationId":"publishAssetUploadSession","x-snippet-key":"assets.uploads.complete","summary":"Complete a media-library upload","description":"Verifies the uploaded file and publishes a media-library asset at a permanent public URL. Images use normal media-library processing; other supported files retain their bytes. Identical active files reuse the existing asset and metadata. Retries return the saved receipt and never recreate a removed result.","tags":["asset-uploads"],"security":[{"BearerAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AssetUploadSessionId"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The upload session and its next steps.","headers":{"Cache-Control":{"description":"Responses are not stored by caches.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetUploadSessionDetails"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/asset-upload-sessions/{upload_id}/cancel":{"post":{"operationId":"cancelAssetUploadSession","x-snippet-key":"assets.uploads.cancel","summary":"Cancel a media-library upload","description":"Cancels an unfinished upload. The temporary file is reclaimed after issued upload instructions expire. A completed session remains completed and its published asset is unchanged.","tags":["asset-uploads"],"security":[{"BearerAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AssetUploadSessionId"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The upload session and its next steps.","headers":{"Cache-Control":{"description":"Responses are not stored by caches.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetUploadSessionDetails"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/asset-upload-sessions/{upload_id}/browser":{"post":{"operationId":"createAssetUploadBrowserHandoff","x-snippet-key":"assets.uploads.handoff","summary":"Open a browser fallback for a media upload","description":"Offers an existing upload session to a signed-in person with asset write access in its workspace. Only the same OAuth connection or API key that created the session can request this fallback. Enabling the handoff leaves the file and reservation unchanged. The browser can then bind a selected file to the pending session and adjust its reservation. Publication metadata and the one-hour deadline stay unchanged. Repeating the request returns the same page for a pending session. A non-pending session returns its current state without a browser URL. Enabling the handoff allows any currently authorized person in that workspace to complete or cancel it, independently of the original connection's continued access. Completion validates the selected bytes; opening the page never publishes them.","tags":["asset-uploads"],"security":[{"BearerAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AssetUploadSessionId"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The session, its browser fallback URL when pending, and its next steps.","headers":{"Cache-Control":{"description":"Responses are not stored by caches.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetUploadBrowserHandoff"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/assets":{"post":{"operationId":"createAsset","x-snippet-key":"none","summary":"Create a media-library asset","description":"Uploads a file to the workspace's media library and returns its permanent public\nURL. Send a `multipart/form-data` body with the bytes in the `file` part.\n\nThe file's contents determine its type, and the type determines its `kind`:\n\n| Kind | Accepted formats | Maximum size |\n| --- | --- | --- |\n| `image` | PNG, JPEG, GIF, static WebP | 5 MiB (5,242,880 bytes) |\n| `video` | MP4, WebM, QuickTime | 25 MB |\n| `audio` | MP3, M4A, Ogg, WAV | 25 MB |\n| `document` | PDF | 25 MB |\n\nImages are re-encoded to remove embedded metadata and apply recorded rotation.\nAnimated GIFs keep their animation, and static WebP images become JPEG or PNG.\nAnimated WebP is not supported. Other\nfiles pass container-structure validation and are stored byte-for-byte. Validation\ndoes not scan for malware. Files that exceed image-processing or container-complexity\nlimits can be rejected even below the byte limit. Documents are downloads; other media displays\ninline. Asset bytes and URLs do not change. Upload new content as a new asset.\nA duplicate file in the same workspace returns the existing active asset with\n`200 OK`; a new asset returns `201 Created`. Uploading the same bytes after\nremoving the library entry creates a new asset and URL.\nAn organization can retain at most 100,000 assets per region, including removed library\nentries whose URLs still serve. Reusing an existing asset does not use another slot.\n\nInclude each multipart field at most once. `file` is required. Optional `name`\nis a display name of up to 255 characters and defaults to the filename when\nomitted or empty after trimming;\n`alt_text` allows up to 1,000 characters; `folder_id` places a new asset in an\nexisting folder. Omit `folder_id` for the library root. Each text part is\nlimited to 8 KiB before trimming surrounding whitespace. Duplicate uploads\nretain the existing asset's metadata and folder.\n\nSee [Manage media-library files](/docs/guides/media-library) for HTTP upload examples, CLI and MCP use, and storage-quota guidance.\n","tags":["assets"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AssetUpload"}}}},"responses":{"200":{"description":"An asset with identical contents already existed and was returned unchanged.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Asset"}}}},"201":{"description":"The uploaded asset.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Asset"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp"]},"get":{"operationId":"listAssets","x-snippet-key":"assets.list","summary":"List workspace media-library assets","description":"Returns a cursor page of the workspace's media-library assets, most recently created first. Filters can narrow results by media type, name, deletion status, or folder placement.\n","tags":["assets"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"sort","in":"query","required":false,"description":"Field to sort by. Defaults to `created_at`.","schema":{"$ref":"#/components/schemas/AssetSortField"}},{"name":"kind","in":"query","required":false,"description":"Return only assets in this category. This groups exact `content_type` values into images, video, audio, and documents.","schema":{"$ref":"#/components/schemas/AssetKindFilter"}},{"name":"content_type","in":"query","required":false,"description":"Return only assets stored with this media type.","schema":{"$ref":"#/components/schemas/AssetContentTypeFilter"}},{"name":"deleted","in":"query","required":false,"description":"Whether to include assets that have been removed from the library. Removed assets keep serving at their original URL, so they remain listable.\n","schema":{"$ref":"#/components/schemas/AssetDeletedFilter"}},{"name":"q","in":"query","required":false,"description":"A case-insensitive substring match against the asset's name.","schema":{"type":"string","minLength":1}},{"name":"folder_id","in":"query","required":false,"description":"Return only the assets filed directly in this folder. Subfolders are not included, and a folder that does not exist matches nothing. Cannot be combined with `root_only`.","schema":{"$ref":"#/components/schemas/AssetFolderID"}},{"name":"root_only","in":"query","required":false,"description":"Return only the assets at the top level of the library, filed in no folder. Cannot be combined with `folder_id`.","schema":{"type":"boolean"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of assets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetList"},"example":{"data":[{"id":"ast_01krdgeqcxet5s7t44vh8rt9mg","url":"https://us1.assets.birdusercontent.com/6fcy8y6a483sewgnjk2g35y2qz/01krdgeqcxet5s7t44vh8rt9mg/banner.png","thumbnail_url":"https://us1.assets.birdusercontent.com/6fcy8y6a483sewgnjk2g35y2qz/01krdgeqcxet5s7t44vh8rt9mg/thumb/image.png","name":"Summer banner","content_type":"image/png","kind":"image","size_bytes":48210,"width":1200,"height":630,"alt_text":"Sunset over the ocean","folder_id":null,"deleted_at":null,"created_at":"2026-05-20T09:14:52Z","updated_at":"2026-05-20T09:14:52Z"}],"next_cursor":null,"prev_cursor":null,"refresh_cursor":"eyJ2IjoxLCJzIjoiMjAyNi0wNS0yMFQwOToxNDo1MloiLCJpIjoiMDE5ZTFiMDctNWQ5ZC03NjhiLTkzZTgtODRkYzUxOGQyNjkwIn0"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/assets/{asset_id}":{"get":{"operationId":"getAsset","x-snippet-key":"assets.get","summary":"Get a media-library asset by ID","description":"Returns one media-library asset. An asset that has been removed from the library is returned with `deleted_at` set rather than as a missing resource, because its URL keeps serving and messages already sent still reference it.\n","tags":["assets"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"asset_id","in":"path","required":true,"description":"ID of the asset.","schema":{"$ref":"#/components/schemas/AssetID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The asset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Asset"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"}},"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateAsset","x-snippet-key":"assets.update","summary":"Update asset metadata or folder placement","description":"Renames an asset, sets its default alternative text, or moves it to a folder. These changes preserve the asset's URL and bytes.\n","tags":["assets"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"asset_id","in":"path","required":true,"description":"ID of the asset.","schema":{"$ref":"#/components/schemas/AssetID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetUpdate"}}}},"responses":{"200":{"description":"The updated asset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Asset"},"example":{"id":"ast_01krdgeqcxet5s7t44vh8rt9mg","url":"https://us1.assets.birdusercontent.com/6fcy8y6a483sewgnjk2g35y2qz/01krdgeqcxet5s7t44vh8rt9mg/document.pdf","thumbnail_url":null,"name":"Summer banner","content_type":"application/pdf","kind":"document","size_bytes":48210,"width":null,"height":null,"alt_text":"Sunset over the ocean","folder_id":null,"deleted_at":null,"created_at":"2026-05-20T09:14:52Z","updated_at":"2026-05-25T16:42:01Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteAsset","x-snippet-key":"assets.delete","summary":"Remove an asset from the media library","description":"Removes an asset from the library. The asset is excluded from default list results, but remains readable by ID or with the `deleted` list filter unless blocked by staff. Deleting the library entry does not revoke public access: anyone with its URL can continue using it. A separate security or abuse takedown can make the entry and public URL unavailable. Deleting is idempotent.\n","tags":["assets"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"asset_id","in":"path","required":true,"description":"ID of the asset.","schema":{"$ref":"#/components/schemas/AssetID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The asset was removed from the library."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/assets/{asset_id}/references":{"get":{"operationId":"listAssetReferences","x-snippet-key":"assets.references.list","summary":"List editable resources that use an asset","description":"Returns editable resources that reference this asset. Each entry indicates whether\nthe reference appears in the resource's draft, published version, or both. Results\nreflect the latest saved versions, so they exclude unsaved editor changes and older\npublished versions.\n\nOnly resources you have permission to read are included. Email-template and reusable-block\nreferences require `email_management:read` in addition to `assets:read`. Hidden resources\ndo not affect the `truncated` flag.\n\nRemoving an asset does not break existing references because its original URL keeps\nserving. Use this list to find content that should reference a replacement asset.\n","tags":["assets"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"asset_id","in":"path","required":true,"description":"ID of the asset.","schema":{"$ref":"#/components/schemas/AssetID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The resources that reference the asset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetReferenceList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/asset-folders":{"post":{"operationId":"createAssetFolder","x-snippet-key":"assets.folders.create","summary":"Create a folder in the media library","description":"Creates a folder in the workspace's media library. Omit `parent_id` to create it\nat the top level, or name another folder to nest it up to 10 levels deep.\nA workspace supports up to 1,000 active folders and 10,000 retained folders,\nincluding deleted folders. Deleting a folder frees an active slot but does\nnot release retained capacity.\n\nFolders organize the library for the people browsing it. They are never part of\nan asset's URL, so filing an asset, renaming a folder, or moving a whole branch\nleaves every message that already embeds those assets rendering exactly as it did.\n","tags":["asset-folders"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetFolderCreate"}}}},"responses":{"201":{"description":"The created folder.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetFolder"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"get":{"operationId":"listAssetFolders","x-snippet-key":"assets.folders.list","summary":"List workspace media-library folders","description":"Returns the workspace's media-library folders as a flat list, each carrying its\n`parent_id` and its resolved `path`, most recently created first.\n\nAssemble the tree from `parent_id`. The ordering is by creation time rather\nthan by position in the tree, so a page can contain a folder whose parent has\nnot arrived yet. Page through to the end before treating a missing parent as\nan orphan. A workspace supports up to 1,000 active folders and 10,000 retained\nfolders, including deleted folders. Deletion frees an active slot but does not\nrelease retained capacity.\n","tags":["asset-folders"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"sort","in":"query","required":false,"description":"Field to sort by. Defaults to `created_at`.","schema":{"$ref":"#/components/schemas/AssetSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of folders.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetFolderList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/asset-folders/{folder_id}":{"get":{"operationId":"getAssetFolder","x-snippet-key":"assets.folders.get","summary":"Get a media-library folder by ID","description":"Returns one folder from the workspace's media library, including its resolved path. A deleted folder is not returned.\n","tags":["asset-folders"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"folder_id","in":"path","required":true,"description":"ID of the asset folder.","schema":{"$ref":"#/components/schemas/AssetFolderID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The folder.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetFolder"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"}},"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateAssetFolder","x-snippet-key":"assets.folders.update","summary":"Rename or move a media-library folder","description":"Renames a folder, moves it, or both. Send `parent_id` to move the folder into\nanother folder, or `null` to move it to the top level.\n\nMoving a folder carries its subfolders and assets with it and changes no URLs, so\nmessages that embed those assets are unaffected. A folder cannot be moved into\nitself or into one of its own subfolders, and the resulting tree cannot exceed 10\nlevels.\n","tags":["asset-folders"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"folder_id","in":"path","required":true,"description":"ID of the asset folder.","schema":{"$ref":"#/components/schemas/AssetFolderID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetFolderUpdate"}}}},"responses":{"200":{"description":"The updated folder.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetFolder"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteAssetFolder","x-snippet-key":"assets.folders.delete","summary":"Delete a folder and move its contents up","description":"Deletes a folder. Its subfolders and its assets move up one level, to the folder\nit sat in, so nothing is removed from the library as a side effect and no URL\nchanges.\n\nIf a subfolder's name is already taken where it would land, the delete is refused\nand the response names the folders to resolve first. Deleting is idempotent.\n","tags":["asset-folders"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"folder_id","in":"path","required":true,"description":"ID of the asset folder.","schema":{"$ref":"#/components/schemas/AssetFolderID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The folder was deleted and its contents moved up one level."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/compliance/requirements":{"get":{"operationId":"getWorkspaceComplianceRequirements","x-snippet-key":"compliance_requirements.get","summary":"Get what a registration needs","description":"Returns everything a country requires before a registration can be approved, in the order to\npresent it, along with what you have already supplied and where each item stands.\n\nEverything you need to answer an item comes back with it. That covers the accepted values\nwhere an item takes a fixed set, the constraints a value must satisfy, and guidance on what\na good answer looks like. Items that take a document say so, and some offer a blank form to download and\ncomplete. An unsupported country returns `422` rather than an empty result.\n\nThis answers one country for one registration you already hold. Omit `subject_id` and it\nanswers the form alone, unanswered: every requirement reads `not_supplied`, nothing is\nsatisfied, and there is no submission behind it, which is the state a registration you\nhave not started is in anyway. Reading it that way needs `program`, since the coordinate\nis otherwise resolved from the registration.\n\nFor a number you hold, pass its ID from `GET /v1/numbers` as `subject_id`. For an SMS sender,\ncall `GET /v1/sms/senders/{sender_id}/requirements` and pass a row's `registration_id` as\n`subject_id`.\n","tags":["compliance"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"subject_kind","in":"query","required":true,"description":"What you are registering.","schema":{"$ref":"#/components/schemas/ComplianceSubjectKind"}},{"name":"subject_id","in":"query","required":false,"description":"The registration to answer for. Omit it to read the form on its own, before you hold anything to register: the requirements come back unanswered, which is what to do when you are deciding whether to take a number or a sender on in the first place. Omitting it makes `program` required, since the coordinate is otherwise resolved from the subject. When you do supply it, it is an `scr_` id when `subject_kind` is `sms_sender`, an `nda_` id when it is `number`, an `nes_` id when it is `number_emergency`, and a `cid_` party id when it is `identity`.","schema":{"$ref":"#/components/schemas/ComplianceSubjectID"}},{"name":"country_code","in":"query","required":true,"description":"The destination country. For `identity` send `ZZ`, the international coordinate: your business registers once, not per country.","schema":{"$ref":"#/components/schemas/CountryCode"}},{"name":"program","in":"query","required":false,"description":"The programme to read. Optional alongside `subject_id`, because a registration is under exactly one programme and that is the one used; supply it there only to confirm the programme you expect, since one that is not the registration's own returns a 422, as does supplying one at all for a country that runs no registration programme. Required when `subject_id` is omitted, because there is then no registration to resolve it from and a country can run more than one.","schema":{"$ref":"#/components/schemas/ComplianceProgram"}},{"name":"identity_id","in":"query","required":false,"description":"Prefill the business details from a party you have already described. Requirements that ask about the party come back carrying its answers, marked `prefilled`; requirements about this sender never prefill because you write the sender's intended use fresh each time. Anything you have already filed for this registration wins over the party's answer.","schema":{"$ref":"#/components/schemas/ComplianceIdentityID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"What this country requires, and where you stand with it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceRequirement"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/compliance/document-templates/{template_id}":{"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ComplianceTemplateID"},"description":"Blank compliance form ID."}],"get":{"operationId":"getComplianceDocumentTemplate","x-snippet-key":"compliance_document_templates.get","summary":"Get a blank registration form","description":"Downloads a blank form referenced by a published registration requirement. Draft forms are not available. Complete the form and upload a PDF, JPEG, or PNG as a registration attachment for the corresponding document requirement. Export Word templates to PDF before uploading the completed form.\n","tags":["compliance"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"x-data-region":"global","responses":{"200":{"description":"The blank form bytes.","headers":{"Content-Disposition":{"description":"Carries the safe filename and forces a download.","schema":{"type":"string"}}},"content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/compliance/submissions":{"post":{"operationId":"createWorkspaceComplianceSubmission","x-snippet-key":"compliance_submissions.create","summary":"Create a registration submission","description":"Submits every answer at once. Because submissions have no multi-call draft, send a complete\nset; anything missing or malformed comes back named field by field.\n\nA business verification returns `412 Precondition Failed` (`E33003`) while the organization is\nnot eligible to verify a business.\n\nEach answer is then reviewed on its own. Submitting again for a registration that already has\none returns a 409. Use `POST /v1/compliance/submissions/{submission_id}/resupply` to replace\nrejected, expired, or missing answers, and read the submission ID from the requirements for\nthat registration. Accepted answers normally cannot be changed. During an open verifier\ncorrection and before its deadline, you can replace selected accepted answers. Unchanged entries are ignored; at least\none answer must change. Other answers remain unchanged. A closed number or SMS sender submission must be\nreopened by Bird before you can submit an updated form.\n\nAn `identity` submission registers your business itself. Its subject is the party: send the\n`cid_` id of a party your workspace holds as `subject_id`, with `program` `business` and\n`country_code` `ZZ`, the international coordinate: your business registers once, not per\ncountry. When `subject_kind` is `identity`, send neither `identity_id` nor `identity`,\nbecause the subject already names the party.\n\nThe answers are a legal representation under the name of the business they describe. Accepted\ndossiers can be registered with the carrier or regulator after compliance review.\nFor SMS sender registrations with an unpaid setup fee, your wallet must cover\nsetup and the first recurring charge. This submission charges the setup fee;\ninsufficient funds return `402`.\n","tags":["compliance"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceSubmissionCreate"}}}},"responses":{"201":{"description":"The new submission, with every answer on it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceSubmission"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/compliance/submissions/{submission_id}":{"parameters":[{"name":"submission_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ComplianceSubmissionID"},"description":"Submission ID."}],"get":{"operationId":"getWorkspaceComplianceSubmission","x-snippet-key":"compliance_submissions.get","summary":"Get a submission","description":"Returns every answer on a submission and where each one stands. Each is decided on its own, so\nsome can be accepted while others are still under review or need replacing, and a rejected\nanswer carries the reason it was refused.\n","tags":["compliance"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"responses":{"200":{"description":"The submission, with every answer and where it stands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceSubmission"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/compliance/submissions/{submission_id}/resupply":{"parameters":[{"name":"submission_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ComplianceSubmissionID"},"description":"Submission ID."}],"post":{"operationId":"updateWorkspaceComplianceSubmission","x-snippet-key":"compliance_submissions.resupply","summary":"Update compliance answers","description":"Replaces rejected, expired, or missing answers on an existing submission, and a business\ncontact still `awaiting_confirmation`. Accepted answers normally cannot be changed and should\nbe omitted. A business verification returns `412 Precondition Failed` (`E33003`) while the\norganization is not eligible to verify a business.\n\nA number, emergency calling service, business identity or SMS sender registration accepts changes to any answer until its submission is approved, including\nanswers awaiting review or already accepted; read `answers_editable` on the requirements. Each\nchanged answer loses its verdict and is reviewed again, and unchanged entries are ignored. When\nBird closed this submission and the requirements report `resubmission_allowed` with this\n`submission_id`, your changes reopen it for review. When they report `submission_id: null`\ninstead, the form changed since: create a new submission.\n\nWhen a verifier requests corrections, you can replace selected accepted answers while that\ncorrection remains open and before its deadline. Unchanged entries are ignored, and at least one answer must change.\nChanged answers are reviewed again; other answers remain unchanged.\n\nAfter an emergency calling submission is approved, its service-address fields can also be\nchanged without an open verifier correction. Business details are corrected through the\nnumber's ownership registration; contact support for help correcting those details.\n\nThe answers are a legal representation under the name of the business they describe. Accepted\ndossiers can be registered with the carrier or regulator after compliance review.\n","tags":["compliance"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceSubmissionResupply"}}}},"responses":{"200":{"description":"The submission, with your replacement answers on it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceSubmission"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/compliance/submissions/{submission_id}/contact-confirmation":{"parameters":[{"name":"submission_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ComplianceSubmissionID"},"description":"Submission ID."}],"post":{"operationId":"sendWorkspaceComplianceSubmissionContactConfirmation","x-snippet-key":"compliance_submissions.send_contact_confirmation","summary":"Send the contact's confirmation link again","description":"Emails the business contact of a business verification a new confirmation link, for a\nsubmission whose `contact_email` is `awaiting_confirmation`. The previous link stops working.\nTo use another address, resupply `contact_email` instead; that sends a link to the new\naddress.\n\nReturns `409 Conflict` when the submission is not waiting for its contact to confirm.\n","tags":["compliance"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The submission, still waiting for its contact to confirm.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceSubmission"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/sms/stats/summary":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSStatsSummary","summary":"Get aggregate outbound SMS statistics","description":"Returns one aggregate row for the requested period. It includes SMS lifecycle counts, delivery and failure rates, and processing, delivery, and total latency percentiles (`p50`, `p95`, and `p99`). Rows use send-time attribution, so recent periods can under-report `delivered` while delivery reports arrive.\n\nRate fields are `null` when their denominator is zero. For example, `delivery_rate` is `null` when no message was accepted.\n\n`from` and `to` must both be days or RFC 3339 instants. Day windows cover up to 365 days. Instant bounds round down to the hour and may span up to 720 hours. Mixing the forms returns `422`. Set `timezone` for local boundaries, one dimension filter at most, or `compare=previous_period` for the preceding equal-length window.\n","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.summary","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window: a calendar day (YYYY-MM-DD) or an RFC 3339 instant rounded down to the hour. The `timezone` parameter makes a calendar day local and rounds an instant down to the local hour. Omit `timezone` to use UTC. When `timezone` is set, a numeric UTC offset such as `+05:45` is rejected; use a calendar day or a `Z` (UTC) instant. This value must use the same form as `to`. When omitted, it defaults to 30 days before `to` for day windows or 168 hours (7 days) before `to` for hour windows.\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window: a calendar day (YYYY-MM-DD) or an RFC 3339 instant rounded down to the hour. The `timezone` parameter makes a calendar day local and rounds an instant down to the local hour. Omit `timezone` to use UTC. When `timezone` is set, a numeric UTC offset is rejected; use a calendar day or a `Z` (UTC) instant. This value must use the same form as `from`. When omitted, it defaults to today for day windows or the current hour for hour windows in that timezone. Day windows may not exceed 365 days; hour windows may not exceed 720 hours (30 days).\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"originator","in":"query","required":false,"description":"Restrict the statistics to a single originator (the sender address messages were sent from). Mutually exclusive with the other dimension filters; only one may be set per request. Matches the message `from`.\n","schema":{"type":"string","minLength":1,"example":"BirdSMS"}},{"name":"country","in":"query","required":false,"description":"Restrict the statistics to a single destination country, as an ISO 3166-1 alpha-2 code. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"US"}},{"name":"category","in":"query","required":false,"description":"Restrict the statistics to a single category. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"transactional"}},{"name":"carrier","in":"query","required":false,"description":"Restrict the statistics to a single delivery carrier. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"Verizon"}},{"name":"cost_center","in":"query","required":false,"description":"Restrict the statistics to messages sent with this cost center. The match is exact. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"maxLength":64,"example":"CC001234"}},{"name":"compare","in":"query","required":false,"description":"Set to `previous_period` to also include the same statistics for the immediately preceding window of equal length, plus the change between the two, so you can show \"+X% vs last period\" without a second request.\n","schema":{"$ref":"#/components/schemas/StatsComparePeriod"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Aggregate summary for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSStatsSummary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/daily":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSStatsDaily","summary":"Get daily outbound SMS statistics","description":"Returns one row of SMS lifecycle counts per calendar day. Rows use send-time attribution, so a delivery confirmation is counted on the day when its message was accepted. Recent rows can under-report `delivered` while delivery reports arrive. Days without activity contain zero counts.\n\nRates and latency are whole-window aggregates available from the summary endpoint. Use the message detail endpoints for individual message status.\n\nA request may span up to 365 days; a longer window returns `422`. Set `timezone` for local calendar days instead of UTC.\n","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.daily","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"originator","in":"query","required":false,"description":"Restrict the statistics to a single originator (the sender address messages were sent from). Mutually exclusive with the other dimension filters; only one may be set per request. Matches the message `from`.\n","schema":{"type":"string","minLength":1,"example":"BirdSMS"}},{"name":"country","in":"query","required":false,"description":"Restrict the statistics to a single destination country, as an ISO 3166-1 alpha-2 code. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"US"}},{"name":"category","in":"query","required":false,"description":"Restrict the statistics to a single category. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"transactional"}},{"name":"carrier","in":"query","required":false,"description":"Restrict the statistics to a single delivery carrier. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"Verizon"}},{"name":"cost_center","in":"query","required":false,"description":"Restrict the statistics to messages sent with this cost center. The match is exact. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"maxLength":64,"example":"CC001234"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Daily aggregate stats for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSStatsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/hourly":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSStatsHourly","summary":"Get hourly outbound SMS statistics","description":"Returns one row of SMS lifecycle counts per hour. Rows use send-time attribution, so a delivery confirmation is counted in the hour when its message was accepted. Recent rows can under-report `delivered` while delivery reports arrive.\n\nRates and latency are whole-window aggregates available from the summary endpoint. Set `timezone` for local hours instead of UTC, including zones with sub-hour offsets.\n\nA request may span up to 30 days (720 rows). `from` and `to` are ISO 8601 instants; each bound rounds down to the hour and remains inclusive. An excessive or reversed window returns `422`. Use the daily endpoint for longer ranges.\n","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.hourly","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start of the window (ISO 8601 instant), rounded down to the start of its hour and included. The boundary uses the local hour when `timezone` is set and the UTC hour otherwise. When `timezone` is set, a numeric UTC offset such as `+05:45` is rejected; use a `Z` (UTC) instant. Defaults to 7 days before `to` when omitted.","schema":{"type":"string","format":"date-time","example":"2026-05-25T00:00:00Z"}},{"name":"to","in":"query","required":false,"description":"End of the window (ISO 8601 instant), rounded down to the start of its hour and included. The boundary uses the local hour when `timezone` is set and the UTC hour otherwise, so both bounds are inclusive. When `timezone` is set, a numeric UTC offset is rejected; use a `Z` (UTC) instant. Defaults to the current hour when omitted. The window may not exceed 30 days (720 hours).","schema":{"type":"string","format":"date-time","example":"2026-05-25T23:59:59Z"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"originator","in":"query","required":false,"description":"Restrict the statistics to a single originator (the sender address messages were sent from). Mutually exclusive with the other dimension filters; only one may be set per request. Matches the message `from`.\n","schema":{"type":"string","minLength":1,"example":"BirdSMS"}},{"name":"country","in":"query","required":false,"description":"Restrict the statistics to a single destination country, as an ISO 3166-1 alpha-2 code. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"US"}},{"name":"category","in":"query","required":false,"description":"Restrict the statistics to a single category. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"transactional"}},{"name":"carrier","in":"query","required":false,"description":"Restrict the statistics to a single delivery carrier. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"Verizon"}},{"name":"cost_center","in":"query","required":false,"description":"Restrict the statistics to messages sent with this cost center. The match is exact. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"maxLength":64,"example":"CC001234"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Hourly aggregate stats for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSStatsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/originators":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSStatsByOriginator","summary":"Get outbound SMS statistics by originator","description":"Returns aggregate delivery and latency stats grouped by originator (the sender address messages were sent from) for the requested period. Rows are ranked by the `sort` metric (default `accepted`) descending and capped at the requested `limit` (default 50, hard maximum 200). Use this to compare sending performance across the senders you dispatch from.\n\nRows use send-time attribution. A delivery confirmed during the period for a message accepted earlier counts against the earlier period. A recent period therefore under-reports `delivered` while delivery reports are still arriving, and its counts grow as reports arrive.\n\nThe maximum window is 365 days; requesting a longer range returns 422.\n","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.by_originator","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted; with `include_trend=true` and `trend_grain=hourly` the default tightens to keep the window within the 720-hour trend cap.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. Any lifecycle count or derived rate in the response may be used; rows whose rate is undefined (zero denominator) sort last. Defaults to `accepted`.\n","schema":{"$ref":"#/components/schemas/SMSStatsSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of originator rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"include_trend","in":"query","required":false,"description":"When true, each row also carries a `trend` array: a short per-bucket lifecycle-count series for that row over the window. Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns 422.\n","schema":{"type":"boolean","default":false}},{"name":"trend_grain","in":"query","required":false,"description":"Bucket grain for the `trend` series. Has no effect unless `include_trend=true`.","schema":{"$ref":"#/components/schemas/StatsTrendGrain"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-originator breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSStatsByOriginatorResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/countries":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSStatsByCountry","summary":"Get outbound SMS statistics by country","description":"Returns aggregate delivery and latency stats grouped by destination country for the requested period. Rows are ranked by the `sort` metric (default `accepted`) descending and capped at the requested `limit` (default 50, hard maximum 200). Use this to compare sending performance across the countries you send to.\n\nRows use send-time attribution. A delivery confirmed during the period for a message accepted earlier counts against the earlier period. A recent period therefore under-reports `delivered` while delivery reports are still arriving, and its counts grow as reports arrive.\n\nThe maximum window is 365 days; requesting a longer range returns 422.\n","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.by_country","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted; with `include_trend=true` and `trend_grain=hourly` the default tightens to keep the window within the 720-hour trend cap.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. Any lifecycle count or derived rate in the response may be used; rows whose rate is undefined (zero denominator) sort last. Defaults to `accepted`.\n","schema":{"$ref":"#/components/schemas/SMSStatsSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of country rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"include_trend","in":"query","required":false,"description":"When true, each row also carries a `trend` array: a short per-bucket lifecycle-count series for that row over the window. Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns 422.\n","schema":{"type":"boolean","default":false}},{"name":"trend_grain","in":"query","required":false,"description":"Bucket grain for the `trend` series. Has no effect unless `include_trend=true`.","schema":{"$ref":"#/components/schemas/StatsTrendGrain"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-country breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSStatsByCountryResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/categories":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSStatsByCategory","summary":"Get outbound SMS statistics by category","description":"Returns aggregate delivery and latency stats grouped by message category for the requested period. Rows are ranked by the `sort` metric (default `accepted`) descending and capped at the requested `limit` (default 50, hard maximum 200). Use this to compare sending performance across the categories you send under.\n\nRows use send-time attribution. A delivery confirmed during the period for a message accepted earlier counts against the earlier period. A recent period therefore under-reports `delivered` while delivery reports are still arriving, and its counts grow as reports arrive.\n\nThe maximum window is 365 days; requesting a longer range returns 422.\n","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.by_category","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted; with `include_trend=true` and `trend_grain=hourly` the default tightens to keep the window within the 720-hour trend cap.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. Any lifecycle count or derived rate in the response may be used; rows whose rate is undefined (zero denominator) sort last. Defaults to `accepted`.\n","schema":{"$ref":"#/components/schemas/SMSStatsSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of category rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"include_trend","in":"query","required":false,"description":"When true, each row also carries a `trend` array: a short per-bucket lifecycle-count series for that row over the window. Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns 422.\n","schema":{"type":"boolean","default":false}},{"name":"trend_grain","in":"query","required":false,"description":"Bucket grain for the `trend` series. Has no effect unless `include_trend=true`.","schema":{"$ref":"#/components/schemas/StatsTrendGrain"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-category breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSStatsByCategoryResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/content-types":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSStatsByContentType","summary":"Get outbound SMS statistics by message type","description":"Returns delivery counts, rates and latency grouped by SMS or MMS over the requested period. Previously recorded statistics remain attributed to SMS. New activity uses the message type, so a late MMS delivery can appear under MMS while its earlier send remains under SMS. A type-filtered delivery rate is null when that type has no accepted messages. Delivery reports belong to the period when the message was accepted, including reports received later.","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.by_content_type","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted; with `include_trend=true` and `trend_grain=hourly` the default tightens to keep the window within the 720-hour trend cap.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. Any lifecycle count or derived rate in the response may be used; rows whose rate is undefined (zero denominator) sort last. Defaults to `accepted`.\n","schema":{"$ref":"#/components/schemas/SMSStatsSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of message-type rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"include_trend","in":"query","required":false,"description":"When true, each row also carries a `trend` array: a short per-bucket lifecycle-count series for that row over the window. Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns 422.\n","schema":{"type":"boolean","default":false}},{"name":"trend_grain","in":"query","required":false,"description":"Bucket grain for the `trend` series. Has no effect unless `include_trend=true`.","schema":{"$ref":"#/components/schemas/StatsTrendGrain"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-message-type breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSStatsByContentTypeResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/error-codes":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSStatsByErrorCode","summary":"Get outbound SMS statistics by error code","description":"Returns aggregate delivery and latency statistics grouped by normalized failure reason for the requested period. The grouping key matches the `error_code` filter on the message list, so each row maps directly to the affected messages rather than a raw carrier code. Rows are ranked by the `sort` metric (default `failed`) descending and capped at the requested `limit` (default 50, hard maximum 200).\n\nRows use send-time attribution. A delivery confirmed during the period for a message accepted earlier counts against the earlier period. A recent period therefore under-reports `delivered` while delivery reports are still arriving, and its counts grow as reports arrive. The maximum window is 365 days; requesting a longer range returns 422.\n","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.by_error_code","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted; with `include_trend=true` and `trend_grain=hourly` the default tightens to keep the window within the 720-hour trend cap.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. Defaults to `failed`. Only lifecycle counts are sortable; this breakdown has no rates.\n","schema":{"$ref":"#/components/schemas/SMSStatsLifecycleSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of error-code rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"include_trend","in":"query","required":false,"description":"When true, each row also carries a `trend` array: a short per-bucket lifecycle-count series for that row over the window. Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns 422.\n","schema":{"type":"boolean","default":false}},{"name":"trend_grain","in":"query","required":false,"description":"Bucket grain for the `trend` series. Has no effect unless `include_trend=true`.","schema":{"$ref":"#/components/schemas/StatsTrendGrain"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-error-code breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSStatsByErrorCodeResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/carriers":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSStatsByCarrier","summary":"Get outbound SMS statistics by carrier","description":"Returns aggregate delivery and latency stats grouped by delivery carrier for the requested period. Rows are ranked by the `sort` metric (default `accepted`) descending and capped at the requested `limit` (default 50, hard maximum 200). Use this to compare delivery performance across the carriers that handled your messages.\n\nRows use send-time attribution. A delivery confirmed during the period for a message accepted earlier counts against the earlier period. A recent period therefore under-reports `delivered` while delivery reports are still arriving, and its counts grow as reports arrive.\n\nThe maximum window is 365 days; requesting a longer range returns 422.\n","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.by_carrier","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted; with `include_trend=true` and `trend_grain=hourly` the default tightens to keep the window within the 720-hour trend cap.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. Any lifecycle count or derived rate in the response may be used; rows whose rate is undefined (zero denominator) sort last. Defaults to `accepted`.\n","schema":{"$ref":"#/components/schemas/SMSStatsSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of carrier rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"include_trend","in":"query","required":false,"description":"When true, each row also carries a `trend` array: a short per-bucket lifecycle-count series for that row over the window. Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns 422.\n","schema":{"type":"boolean","default":false}},{"name":"trend_grain","in":"query","required":false,"description":"Bucket grain for the `trend` series. Has no effect unless `include_trend=true`.","schema":{"$ref":"#/components/schemas/StatsTrendGrain"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-carrier breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSStatsByCarrierResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/tags":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSStatsByTag","summary":"Get outbound SMS statistics by tag","description":"Returns delivery and latency statistics grouped by tag (`name:value`). Rows sort by the selected metric in descending order and are capped by `limit`. The default sort is `accepted`; the default limit is 50 and the maximum is 200.\n\nOnly tagged messages appear. A message with several tags is counted once under each, so rows do not sum to the period total.\n\nRows use send-time attribution, so recent periods can under-report `delivered` while delivery reports arrive. A request may span up to 365 days; a longer window returns `422`.\n","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.by_tag","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted; with `include_trend=true` and `trend_grain=hourly` the default tightens to keep the window within the 720-hour trend cap.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. Any lifecycle count or derived rate in the response may be used; rows whose rate is undefined (zero denominator) sort last. Defaults to `accepted`.\n","schema":{"$ref":"#/components/schemas/SMSStatsSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of tag rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"include_trend","in":"query","required":false,"description":"When true, each row also carries a `trend` array: a short per-bucket lifecycle-count series for that row over the window. Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns 422.\n","schema":{"type":"boolean","default":false}},{"name":"trend_grain","in":"query","required":false,"description":"Bucket grain for the `trend` series. Has no effect unless `include_trend=true`.","schema":{"$ref":"#/components/schemas/StatsTrendGrain"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-tag breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSStatsByTagResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/cost-centers":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSStatsByCostCenter","summary":"Get outbound SMS statistics by cost center","description":"Returns aggregate delivery and latency stats grouped by the `cost_center` messages were sent with, for the requested period. Messages sent without a cost center are not counted, so rows do not sum to the period total. Rows are ranked by the `sort` metric (default `accepted`) descending and capped at the requested `limit` (default 50, hard maximum 200).\n\nRows use send-time attribution. A delivery confirmed during the period for a message accepted earlier counts against the earlier period. A recent period therefore under-reports `delivered` while delivery reports are still arriving, and its counts grow as reports arrive.\n\nThe maximum window is 365 days; requesting a longer range returns 422.\n","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.by_cost_center","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted; with `include_trend=true` and `trend_grain=hourly` the default tightens to keep the window within the 720-hour trend cap.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. Any lifecycle count or derived rate in the response may be used; rows whose rate is undefined (zero denominator) sort last. Defaults to `accepted`.\n","schema":{"$ref":"#/components/schemas/SMSStatsSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of cost center rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"include_trend","in":"query","required":false,"description":"When true, each row also carries a `trend` array: a short per-bucket lifecycle-count series for that row over the window. Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns 422.\n","schema":{"type":"boolean","default":false}},{"name":"trend_grain","in":"query","required":false,"description":"Bucket grain for the `trend` series. Has no effect unless `include_trend=true`.","schema":{"$ref":"#/components/schemas/StatsTrendGrain"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-cost-center breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSStatsByCostCenterResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/statuses":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSStatsByStatus","summary":"Get outbound SMS statistics by status","description":"Returns one row per lifecycle status with activity in the requested period, ordered by count descending. The statuses are `accepted`, `sent`, `delivered`, `undelivered`, `failed`, `rejected`, and `expired`.\n\nRows use send-time attribution. A delivery confirmed during the period for a message accepted earlier counts against the earlier period. A recent period therefore under-reports `delivered` while delivery reports are still arriving. With at most seven statuses, this breakdown has no cap, ranking, limit, or trend parameters.\n\nThe maximum window is 365 days; requesting a longer range returns 422.\n","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.by_status","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-status breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSStatsByStatusResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/inbound/summary":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSInboundStatsSummary","summary":"Get aggregate inbound SMS statistics","description":"Returns the total number of messages your numbers received over the period, using the time the carrier received each message.\n\nThe response contains only a count because a received message has one state. Use the outbound statistics endpoints for delivery rates and latency data about messages you send.\n\nThe maximum window is 365 days; a longer range returns 422. Set `timezone` to resolve the period against your local calendar instead of UTC.\n","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.inbound.summary","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, either a calendar day (YYYY-MM-DD) or an RFC 3339 instant rounded down to the hour. The form you use selects the grain the total is resolved at. Interpreted in `timezone`, or in UTC when `timezone` is omitted. Must use the same form as `to`. A numeric UTC offset (for example `+05:45`) is rejected when `timezone` is set; pass a calendar day or a `Z` instant instead. Defaults to 30 days before `to` for day windows, or 168 hours before `to` for hour windows.\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, in the same form as `from`. Defaults to today, or the current hour for an hour window. A day window may not exceed 365 days and an hour window 720 hours.\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"compare","in":"query","required":false,"description":"Set to `previous_period` to include the received-message count for the immediately preceding window of equal length. The response also includes the change between the two, so you can show \"+X% vs last period\" without a second request.\n","schema":{"$ref":"#/components/schemas/StatsComparePeriod"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Total received messages for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSInboundStatsSummaryResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/inbound/daily":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSInboundStatsDaily","summary":"Get daily inbound SMS statistics","description":"Returns the number of messages your numbers received, one row per calendar day. Rows use the time the carrier received each message, and days with no messages contain a zero count.\n\nEach row contains only a count because a received message has one state. Use the outbound statistics endpoints for lifecycle and delivery-latency data about messages you send.\n\nThe maximum window is 365 days; a longer range returns 422. Set `timezone` to bucket rows by your local calendar day instead of UTC.\n","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.inbound.daily","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Received-message counts per day for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSInboundStatsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/inbound/hourly":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSInboundStatsHourly","summary":"Get hourly inbound SMS statistics","description":"Returns the number of messages your numbers received, one row per hour. Rows use the time the carrier received each message, and hours with no messages contain a zero count.\n\nEach row contains only a count because a received message has one state. Use the outbound statistics endpoints for lifecycle and delivery-latency data about messages you send.\n\nThe maximum window is 720 hours; a longer range returns 422. Set `timezone` to bucket rows by your local hour instead of UTC.\n","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.inbound.hourly","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start of the window (inclusive), an RFC 3339 instant truncated to the hour. Defaults to 7 days (168 hours) before `to` when omitted.","schema":{"type":"string","format":"date-time","example":"2026-05-01T00:00:00Z"}},{"name":"to","in":"query","required":false,"description":"End of the window (inclusive), an RFC 3339 instant truncated to the hour. Defaults to the current hour when omitted. Window may not exceed 720 hours. A numeric UTC offset (for example `+05:45`) is rejected when `timezone` is set; pass a calendar day or a `Z` instant instead.","schema":{"type":"string","format":"date-time","example":"2026-05-25T23:00:00Z"}},{"$ref":"#/components/parameters/StatsTimezone"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Received-message counts per hour for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSInboundStatsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/inbound/countries":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSInboundStatsByCountry","summary":"Get inbound SMS statistics by country","description":"Returns the number of messages your numbers received, grouped by the receiving number's country. Rows are ranked by volume, highest first, and use the time the carrier received each message.\n\nEach row contains only a count because a received message has one state. The maximum window is 365 days; a longer range returns `422`. Set `timezone` to resolve the period against your local calendar.\n","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.inbound.by_country","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum rows to return, ranked by volume. Defaults to 50; the maximum is 200, and asking for more returns 422 rather than silently returning fewer.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"example":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Received-message volume by country for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSInboundStatsByCountryResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/inbound/content-types":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSInboundStatsByContentType","summary":"Get inbound SMS statistics by message type","description":"Returns received-message counts grouped by SMS or MMS over the requested period. Previously recorded statistics remain attributed to SMS. New activity uses the message type.","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.inbound.by_content_type","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum rows to return, ranked by volume. Defaults to 50; the maximum is 200, and asking for more returns 422 rather than silently returning fewer.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"example":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Received-message volume by message type for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSInboundStatsByContentTypeResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/inbound/operators":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSInboundStatsByOperator","summary":"Get inbound SMS statistics by operator","description":"Returns the number of messages your numbers received, grouped by the sender's mobile operator. Rows are ranked by volume, highest first, and use the time the carrier received each message. Operators are identified by MCC-MNC when the carrier reports it.\n\nEach row contains only a count because a received message has one state. Messages without a reported sending operator are excluded, so the rows can sum to less than the summary total.\n\nThe maximum window is 365 days; a longer range returns `422`. Set `timezone` to resolve the period against your local calendar.\n","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.inbound.by_operator","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum rows to return, ranked by volume. Defaults to 50; the maximum is 200, and asking for more returns 422 rather than silently returning fewer.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"example":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Received-message volume by operator for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSInboundStatsByOperatorResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/stats/inbound/numbers":{"parameters":[{"$ref":"#/components/parameters/SMSStatsContentType"}],"get":{"operationId":"getSMSInboundStatsByNumber","summary":"Get inbound SMS statistics by number","description":"Returns how many messages each of your numbers received. Rows are ranked by volume, highest first, and use the time the carrier received each message.\n\nEach row contains only a count because a received message has one state. The maximum window is 365 days; a longer range returns `422`. Set `timezone` to resolve the period against your local calendar.\n","tags":["sms-stats"],"x-audiences":["public","command"],"x-snippet-key":"sms.stats.inbound.by_number","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum rows to return, ranked by volume. Defaults to 50; the maximum is 200, and asking for more returns 422 rather than silently returning fewer.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"example":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Received-message volume by number for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSInboundStatsByNumberResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/sms/senders":{"get":{"operationId":"listWorkspaceSMSSenders","x-snippet-key":"sms_senders.list","summary":"List your SMS senders","description":"Returns the dedicated numbers and alphanumeric senders your workspace holds, newest first, with each sender's per-country registration status.","tags":["sms-senders"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"type","in":"query","required":false,"description":"Filter senders by source type: a dedicated number, shared shortcode, or alphanumeric sender string.","schema":{"$ref":"#/components/schemas/SMSSenderSourceKind"}},{"name":"number_id","in":"query","required":false,"description":"Return the sender for one number you hold, using the ID from [List workspace numbers](/docs/api/reference/list-workspace-numbers). Exactly one sender exists per number, so this returns at most one result.","schema":{"$ref":"#/components/schemas/AllocatedNumberID"}},{"name":"sort","in":"query","required":false,"description":"Field to sort by. `created_at` (the default) sorts newest first with the default `order`. `sender` sorts alphabetically by the sender's own value (phone number, short code, or alphanumeric sender string), all treated as plain text.\n","schema":{"$ref":"#/components/schemas/SMSSenderSortField","default":"created_at"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of your SMS senders with their registrations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSSenderList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createWorkspaceSMSSender","x-snippet-key":"sms_senders.create","summary":"Create an SMS sender","description":"Claims an alphanumeric sender string for your workspace. Country and sender-type policies determine whether registration is unavailable, optional, or required before sending.","tags":["sms-senders"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSSenderCreate"}}}},"responses":{"201":{"description":"The claimed sender.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSSender"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/sms/senders/{sender_id}":{"parameters":[{"name":"sender_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/SMSSenderID"},"description":"ID of the SMS sender (`snd_` prefix), as returned when the sender was created."}],"get":{"operationId":"getWorkspaceSMSSender","x-snippet-key":"sms_senders.get","summary":"Get an SMS sender","description":"Returns one of your workspace's SMS senders with its per-country registration status.","tags":["sms-senders"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"responses":{"200":{"description":"The requested sender with its registrations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSSender"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/sms/senders/{sender_id}/requirements":{"parameters":[{"name":"sender_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/SMSSenderID"},"description":"ID of the SMS sender (`snd_` prefix), as returned when the sender was created."}],"get":{"operationId":"listWorkspaceSMSSenderRequirements","x-snippet-key":"sms_sender_requirements.list","summary":"List what a sender needs to send","description":"Returns the countries a sender can reach, each country's requirements, and the current registration status. Omit `country_code` for the full list. An empty filtered result means the sender has no route to that country.\n\n`registration_mode` distinguishes optional registration from registration required before sending. `status` reports registration progress. Optional registration can be pending while messages are accepted with an overwritten sender ID. `sender_id_behavior` reports the effective behavior without overwrite details; those are published in the country messaging context. Check `destination_enabled` and other sending restrictions before sending.\n\nEach row's `next` lists actions for that country, including starting an optional registration. An empty list means there is no next registration action; an absent one means this read does not report it.\n\nThe operation depends on `program`: `alpha` and `numeric` use compliance submissions, `tfn` uses toll-free verification, and `10dlc` uses campaign assignment. `short_code` is filed and maintained by Bird: no API action exists, and a rejected one is resolved through support, as the row's `next` says. Read each row's `next` after each operation for the next step.\n","tags":["sms-senders"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"country_code","in":"query","required":false,"description":"Ask about one destination country. Omit to return every country relevant to the sender.","schema":{"$ref":"#/components/schemas/CountryCode"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"What this sender needs, per country.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSSenderRequirementList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/sms/senders/{sender_id}/registrations":{"parameters":[{"name":"sender_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/SMSSenderID"},"description":"ID of the SMS sender (`snd_` prefix), as returned when the sender was created."}],"post":{"operationId":"createWorkspaceSMSSenderRegistration","x-snippet-key":"sms_sender_registrations.create","summary":"Create a sender registration for a country","description":"Registers a sender for a destination country. If the country requires review, the sender can send there after approval. If registration is optional, it takes effect immediately and records the intended message category.\n\nA priced sender, alphanumeric or a number, incurs a setup fee and a recurring monthly charge.\nWhere the country approves immediately,\nboth are billed on this call. Where the country reviews, the registration is created unbilled:\nthe setup fee is charged when its paperwork is submitted, or on approval if it needs none, and\nthe recurring charge starts on approval. This call returns `402` only when it bills, on an\nimmediate approval or a reactivation. A reviewed registration's paperwork submission charges\nonly the setup fee but needs balance for the setup fee and the first monthly charge together,\nand returns `402` otherwise; that submission is the request to retry after topping up.\nWhether a sender is priced depends on its country and sender type.\nA `412` means required identity verification is incomplete or organization eligibility\nprevents registration. Follow the error's recovery guidance: complete missing verification,\nor contact support about an eligibility review or denial. An eligibility assessment still\nin progress returns `503`; retry later. A registration that already exists for the country and is\nneither rejected nor suspended returns `409`, and that includes one still `pending` review; a\nrejected registration is resubmitted, and a suspended one reactivated, by calling this again.\nA `409` can also mean the contract's billing frequency changed just before the call: a priced\nsender's setup fee is then charged and no registration is kept, so retrying pays it again;\ncontact support instead.\n\nA sender covered by a dedicated program, such as a US 10DLC campaign or toll-free\nverification, returns `422` and must use that program instead. Short-code registrations\nare ones we manage, and they also return `422`.\n","tags":["sms-senders"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSCountryRegistrationCreate"}}}},"responses":{"201":{"description":"The sender's new country registration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSCountryRegistration"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/lookup/phone-number":{"post":{"operationId":"createPhoneNumberLookup","x-snippet-key":"lookup.phone_number","summary":"Create a phone number lookup","description":"Returns the number's serving and issuing networks, porting state, country, and line type. The baseline fields are included in each lookup. Request additional `type` blocks for classification, presence, roaming, SIM-swap, porting-history, or credibility data. Each block reports its own `status`; only blocks with an `ok` status incur an additional charge.\n\nThis form keeps the number out of the URL. The [URL form](/docs/api/reference/get-phone-number-lookup) performs the same lookup but cannot use an idempotency key. With this form, reuse an `Idempotency-Key` to return the stored result without another lookup or charge.\n","tags":["lookup"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberLookupRequest"}}}},"responses":{"200":{"description":"Available network and number-intelligence information.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberLookup"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/lookup/phone-number/{number}":{"get":{"operationId":"getPhoneNumberLookup","x-snippet-key":"none","summary":"Get a phone number lookup by URL","description":"Performs the same lookup as [Create a phone number lookup](/docs/api/reference/create-phone-number-lookup), with the number in the URL. The response includes the number's serving and issuing networks, porting state, country, and line type. Repeat `type` to request additional blocks, such as `?type=classification&type=score`; only blocks with an `ok` status incur an additional charge.\n\nBecause the number is in the URL, it can appear in proxies, access logs, and browser history. This form does not accept an `Idempotency-Key`; each retry performs and charges for another lookup.\n","tags":["lookup"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard"],"parameters":[{"name":"number","in":"path","required":true,"description":"The number to look up, in international format. The leading `+` is optional, and `00` works in its place, so `31612345678` and `+31612345678` are the same number, with nothing to percent-encode. If you do send the `+`, percent-encode it as `%2B` when your client does not do that for you.","schema":{"type":"string","minLength":2,"maxLength":20}},{"name":"type","in":"query","required":false,"description":"An additional data block to request. Repeat the parameter for multiple blocks; each block is billed separately only when its status is `ok`.","schema":{"type":"array","items":{"$ref":"#/components/schemas/LookupProperty"}}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Available network and number-intelligence information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberLookup"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":[]}},"/v1/lookup/email":{"post":{"operationId":"createEmailLookup","x-snippet-key":"lookup.email","summary":"Create an email address lookup","description":"Returns a deliverability `result`, a `delivery_confidence` score, address characteristics, an assessment `reason`, and a suggested correction when available. `result` and `reason` are open vocabularies. Handle unknown values and use `delivery_confidence` as the stable fallback. Each completed lookup incurs the same charge regardless of its result.\n\nThis form keeps the address out of the URL. The [URL form](/docs/api/reference/get-email-lookup) performs the same lookup but cannot use an idempotency key. With this form, reuse an `Idempotency-Key` to return the stored result without another lookup or charge.\n","tags":["lookup"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLookupRequest"}}}},"responses":{"200":{"description":"Available deliverability information about the address.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLookup"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/lookup/email/batch":{"post":{"operationId":"createEmailLookupBatch","x-snippet-key":"lookup.email_batch","summary":"Create a batch of email address lookups","description":"Assesses up to 1,000 email addresses synchronously and returns one result per\ninput in submission order. Malformed addresses receive individual assessments.\nDuplicate addresses remain separate entries and each answered entry is billed\nat the email lookup rate. Use [Create an email address lookup](/docs/api/reference/create-email-lookup)\nfor a single address. A batch consumes one request allowance under the shared\nlookup rate limit, regardless of its number of addresses.\n\nRequests must fit within 128 KiB. Split larger lists into separate requests.\nReuse an `Idempotency-Key` for retries of the same batch. Successful responses\nup to 256 KiB can be retained for replay; larger responses are returned but\nare not retained, so retrying can perform and charge for another batch.\nAn unavailable lookup returns `503` without charging for the batch.\n","tags":["lookup"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLookupBatchRequest"}}}},"responses":{"200":{"description":"Completed assessments in submission order.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLookupBatchResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/lookup/email/{address}":{"get":{"operationId":"getEmailLookup","x-snippet-key":"none","summary":"Get an email address lookup by URL","description":"Performs the same deliverability lookup as [Create an email address lookup](/docs/api/reference/create-email-lookup), with the address in the URL. The response includes a result, confidence score, address characteristics, assessment reason, and suggested correction when available. Treat unknown `result` and `reason` values as valid additions.\n\nBecause the address is in the URL, it can appear in proxies, access logs, and browser history. This form does not accept an `Idempotency-Key`; each retry performs and charges for another lookup.\n","tags":["lookup"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard"],"parameters":[{"name":"address","in":"path","required":true,"description":"The email address to look up. Percent-encode it, because a local part may legally contain characters a URL path reads as structure. The `@` itself is safe either way.","schema":{"type":"string","minLength":3,"maxLength":254}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Available deliverability information about the address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLookup"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":[]}},"/v1/verify/verifications":{"post":{"operationId":"createVerification","summary":"Create a verification","description":"Creates a verification and sends the recipient a one-time passcode. Provide an email address, a phone number, or both in `to`. The service sends over one channel at a time and moves to the next planned channel if delivery fails.\n\nCalling this again for the same recipient reuses the verification in progress. During the resend cooldown, it returns the current state without sending, so nothing is charged and no send budget is spent. After the cooldown, it sends a fresh passcode, and that send draws on the recipient's hourly send cap exactly as a new verification does, so repeated resends can exhaust the cap and return `429` for the rest of that rolling hour. [Abuse guardrails](/docs/guides/verify/sending-verifications#abuse-guardrails) gives the figures.\n\nThe `200` response contains the current state, never the passcode. Submit the recipient's passcode with [Check a verification](/docs/api/reference/create-verification-check) before `expires_at`. An invalid recipient returns `422`; exceeding the send rate limit returns `429`.\n","tags":["verify-verifications"],"x-audiences":["public","command"],"x-snippet-key":"verify.verifications.create","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationCreateRequest"},"examples":{"onboarding-verify-create":{"summary":"The first verification from the dashboard's onboarding step","value":{"to":{"email":"user@example.com"}}}}}}},"responses":{"200":{"description":"The verification's current state, whether newly opened or reused.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Verification"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/verify/verifications/check":{"post":{"operationId":"createVerificationCheck","summary":"Create a verification passcode check","description":"Checks a passcode for a recipient and returns the outcome together with the verification's current state. Identify the verification by the same `to` used to create it; you do not need to store a verification ID.\n\nA wrong or expired passcode returns `200 OK` with `success: false` and a `reason` such as `incorrect_code` or `expired`. `success: true` means the verification is complete. Each verification reports its final outcome once and cannot be checked again.\n\nAn error status is returned only when the check cannot be evaluated. A `404\nE13000` means no active verification matched the recipient: either none\nexists for it, or the most recent one is already resolved as verified,\nexpired, or out of attempts. One code covers all of those, so a `404` is not\nevidence the recipient failed to verify. Treat your own record of an earlier\n`success: true` as the outcome, and create a new verification only if the\nrecipient still needs to verify. A `422` indicates an invalid recipient. A\n`429` means passcodes for a recipient are being checked too quickly.\n","tags":["verify-verifications"],"x-audiences":["public","command"],"x-snippet-key":"verify.verifications.check","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationCheckRequest"},"examples":{"onboarding-verify-check":{"summary":"Checking the passcode from the dashboard's onboarding step","value":{"to":{"email":"user@example.com"},"code":"123456"}}}}}},"responses":{"200":{"description":"The check outcome and the verification's current state.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationCheckResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/verify/verifications/next-channel":{"post":{"operationId":"createVerificationNextChannel","summary":"Create the next verification channel attempt","description":"Advances an in-progress verification to the next channel in its plan and sends a fresh passcode there. Identify the verification by the same `to` recipient used to create it; no verification ID is required.\n\nThe send bypasses the resend cooldown and does not draw on the recipient's hourly send cap; what bounds it is the channel plan, since each call advances by at most one channel. Passcodes sent earlier remain valid. The response sets `last_channel` to the most recent completed send. Concurrent requests each advance the plan by at most one channel and return committed state.\n\nA recipient with no in-progress verification returns `404 E13000`, whether none was ever created or the most recent one is already resolved. A recipient who has already verified is in that set, so a `404` here is not evidence they still need verifying, and creating another verification would send a passcode they no longer need. A plan with no further channel returns `422 NoNextChannel`; create the verification again to resend on the current channel. If every remaining channel fails, the operation returns `422 NoAvailableChannel`. When one cause explains every remaining channel it is named instead, as `402 WalletInsufficientBalance` for a wallet that refused them all or `422 VerificationBlockedByFraudProtection` for fraud protection that blocked them all. Requests that exceed the send rate limit return `429`.\n","tags":["verify-verifications"],"x-audiences":["public","command"],"x-snippet-key":"verify.verifications.next_channel","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationNextChannelRequest"},"example":{"to":{"phone_number":"+15551234567"}}}}},"responses":{"200":{"description":"Verification state after the advance. `last_channel` identifies the most recent completed send.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Verification"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/whatsapp/messages":{"get":{"operationId":"listWhatsAppMessages","x-snippet-key":"whatsapp.list","summary":"List WhatsApp messages","description":"Returns the workspace's WhatsApp messages as a cursor-paginated list,\nnewest first, outbound and inbound alike. Each message carries the one\ncontent object it was built from: `template`, or free-form `text`,\n`image`, `video`, `audio`, `sticker`, `document`, `location`,\n`interactive` or `contact_cards`. An inbound message carries\n`interactive_reply` when the contact tapped a reply button or a list row,\non an interactive message or on a template's quick reply. An inbound\nmessage whose content WhatsApp models and we do not carries `unsupported`\ninstead, naming the type rather than reading back empty.\nFilter by direction, status, recipient (`to`), sender (`from`),\nbusiness-scoped user ID (`bsuid`), group (`group_id`), template category,\ntag, or creation\ntime. `to` and `from` name the same ends of the message the response\ndoes, and each accepts an E.164 phone number or a business-scoped user\nID. Pair either with `direction` to search a single side of the message.\nNeither matches a group, so `group_id` is what narrows the list to one\ngroup's messages.\nPass the response's `next_cursor` back as\n`starting_after` to fetch the next page. To follow a single message's\ndelivery, use\n[Get a WhatsApp message](/docs/api/reference/get-whatsapp-message)\ninstead.\n\nMessages are retained for **30 days**. A `created_after` earlier than that\nis accepted and raised to the retention bound rather than rejected, so a\nwider window returns what is still retained instead of failing. There is no\nway to read messages older than the window.\n","tags":["whatsapp-messages"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/CreatedAfter"},{"$ref":"#/components/parameters/CreatedBefore"},{"name":"status","in":"query","required":false,"description":"Filter by status. Repeat the parameter to match any of several statuses.","schema":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppMessageStatus"}}},{"name":"direction","in":"query","required":false,"description":"Filter by whether the business sent the message (`outbound`) or received it from the contact (`inbound`).\n","schema":{"$ref":"#/components/schemas/MessageDirection"}},{"name":"to","in":"query","required":false,"description":"Filter by recipient, exact match. The recipient is the contact on an outbound message and your business number on an inbound one, matching the `to` each message returns. Accepts an E.164 phone number, or a business-scoped user ID to name the contact. Only a contact is ever identified by a business-scoped user ID, so `to=<business-scoped user ID>` matches outbound messages only.\n","schema":{"type":"string","minLength":1,"example":"+15551234567"}},{"name":"from","in":"query","required":false,"description":"Filter by sender, exact match. The sender is your business number on an outbound message and the contact on an inbound one, matching the `from` each message returns. Accepts an E.164 phone number, or a business-scoped user ID to name the contact. Only a contact is ever identified by a business-scoped user ID, so `from=<business-scoped user ID>` matches inbound messages only.\n","schema":{"type":"string","minLength":1,"example":"+13124495648"}},{"name":"phone_number","in":"query","required":false,"deprecated":true,"description":"Deprecated: use `to` or `from` instead, which also match a business-scoped user ID. Filters by contact phone number (E.164 exact match), in either direction.\n","schema":{"type":"string","example":"+15551234567"}},{"name":"bsuid","in":"query","required":false,"description":"Filter by business-scoped user ID (Meta identifier), matching the contact in either direction. `to` and `from` also accept one, but each matches a single end of the message.\n","schema":{"type":"string","example":"US.13491208655302741918"}},{"name":"category","in":"query","required":false,"description":"Filter by category.","schema":{"$ref":"#/components/schemas/WhatsAppTemplateCategory"}},{"name":"group_id","in":"query","required":false,"description":"Filter by the WhatsApp group the message belongs to, in either direction: the group an outbound message was addressed to, or the group an inbound message arrived through. Matches the `group_id` on each message's `to`. It names one group, so there is no way to ask for the messages that belong to no group: omit it to list group and one-to-one messages together.\n","schema":{"$ref":"#/components/schemas/WhatsAppGroupID"}},{"$ref":"#/components/parameters/TagFilter"},{"$ref":"#/components/parameters/MessageReferenceFilter"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of WhatsApp messages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppMessageList"},"example":{"data":[{"id":"wam_01kya1b3xdq7fe8m2v5t9rncgs","direction":"inbound","from":{"phone_number":"+15550002222","bsuid":"US.AbC1","display_name":"Dana Reyes"},"to":{"phone_number":"+15550001111","group_id":"wag_01krdgeqcxet5s7t44vh8rt9mg"},"text":{"body":"Got it, thanks."},"status":"received","created_at":"2026-09-15T14:05:41Z"},{"id":"wam_01kya19eknftrs2s6p82asmvnh","direction":"outbound","from":{"phone_number":"+15550001111"},"to":{"group_id":"wag_01krdgeqcxet5s7t44vh8rt9mg"},"text":{"body":"The route sheet for Tuesday is up."},"status":"delivered","recipient_count":2,"delivered_count":2,"read_count":1,"created_at":"2026-09-15T14:03:10Z"}],"next_cursor":null,"prev_cursor":null,"refresh_cursor":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["attio","cli","mcp","n8n","sdk"]},"post":{"operationId":"createWhatsAppMessage","x-snippet-key":"whatsapp.send","summary":"Send a WhatsApp message","description":"Sends one WhatsApp message to one recipient. The request carries exactly one\nkind of content: a message template, or free-form `text`, `image`, `video`,\n`audio`, `sticker`, `document`, `location`, `contact_cards` or\n`interactive`. A request carrying none is rejected with a `422`, and one\ncarrying more than one is too.\n\nA **template** is the only content WhatsApp delivers outside an open\ncustomer service window, so it is what starts a conversation. Name the\ntemplate, optionally pick its language variant, and fill its placeholders in\n`components`, or by name in `parameters`. A template whose language has\nparameter bindings, or named variables in a carousel card or a button URL,\ntakes only `parameters`. One whose bindings read contact data returns `422`\n`WhatsAppTemplateContactUnavailable`, because a single send has no contact\nrecord. A Bird-managed template selects its sender number from its\ncategory, so the request carries no `from`; a template your workspace\nauthored requires one. Browse your workspace's templates in the Bird\ndashboard.\n\n**Free-form content** is deliverable only inside an open 24-hour customer\nservice window, which the contact opens by messaging or calling you and\nresets each time they do it again. Bird tracks that window, so a send into a\nclosed one is refused with a `422` `WhatsAppServiceWindowClosed` before\nanything is created or charged;\nsend a template instead, which reopens the window once the contact replies.\nA window that closes between accept and dispatch still fails\nasynchronously, carrying `service_window_expired` on the message's\n`last_error`. Every free-form send requires `from`.\n\n**Interactive content** gives the recipient something to tap. `interactive`\nnames its kind in `type` and carries that kind's own field: reply `buttons`,\na `list` menu, a `cta_url` link button, or `cards` for a carousel;\n`location_request_message` and `request_contact_info` are each a single\nbutton asking the recipient for something, so `body_text` is the whole\nmessage. A tap on a reply button or a list row comes back as an inbound\nmessage carrying `interactive_reply`. The other kinds answer in their own\nshape: a `cta_url` link opens in the recipient's browser and sends nothing\nback, and the two request kinds come back as the thing they asked for, an\ninbound `location` or `contact_cards` message.\nInteractive content is free-form, so the customer service window and the\n`from` requirement above both apply.\n\n**Contact cards** share up to five contacts in one message. Each card's\n`name` needs `formatted_name` plus at least one other part, and a\n`phone_number` in E.164 earns that card a button opening a chat with it.\nContact cards are free-form too, so the same window and `from` rules apply.\n\n**A group send** addresses a WhatsApp group ID in `to` and carries no\n`from`: the group sends on its own number, and the response reports the\nfan-out.\n`recipient_count` is the group's membership when the send was accepted,\n`delivered_count` and `read_count` count against it, and `status` turns\n`delivered` only once every participant has it. WhatsApp delivers neither\ninteractive content nor an authentication template to a group, and a\nBird-managed template sends from a number no group is scoped to.\n\nSet `in_reply_to_message_id` to quote a message the contact sees above this\none, the way replying in the WhatsApp client does. Any content quotes, and\nthe quoted message must be one from this same conversation.\n\nThe `202` response is the accepted message, echoing the resolved content; it\nis not a delivery confirmation. Follow delivery with\n[Get a WhatsApp message](/docs/api/reference/get-whatsapp-message), the\nper-message timeline from\n[List events for a WhatsApp message](/docs/api/reference/list-whatsapp-message-events),\nor `whatsapp.*` webhook events.\n\nEach of these returns a `422`:\n\n- A template slug or language the catalogue does not stock.\n- Parameter values that do not match the template's declared placeholders.\n- A `from` this workspace cannot send from.\n- A recipient that is neither a valid phone number nor a business-scoped user ID.\n- Free-form content sent into a closed customer service window\n  (`WhatsAppServiceWindowClosed`).\n- Interactive content or an authentication template addressed to a group\n  (`WhatsAppGroupContentNotSupported`).\n\nA group `to` naming no group this workspace holds fails with a `404`\n`WhatsAppGroupNotFound`, and one whose group is not active with a `409`\n`WhatsAppGroupNotActive`. A send from a workspace with no wallet balance\nfails with a `402`.\n","tags":["whatsapp-messages"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppMessageSendRequest"},"examples":{"onboarding-whatsapp":{"summary":"The first send from the dashboard's onboarding step","value":{"to":"+15551234567","template":{"slug":"bird_delivery_update","parameters":{"ref":"A1B2C3D4","date":"10 Jul 2026"}}}},"audio":{"summary":"A voice note or audio clip by URL","value":{"to":"+16505551234","from":"+13124495648","audio":{"url":"https://cdn.example.com/vm/9f2.ogg"}}},"documents":{"summary":"A PDF or other document by URL","value":{"to":"+16505551234","from":"+13124495648","document":{"url":"https://cdn.example.com/invoices/a1b2c3.pdf"}}},"images":{"summary":"An image by URL","value":{"to":"+16505551234","from":"+13124495648","image":{"url":"https://cdn.example.com/receipt.png"}}},"stickers":{"summary":"A WebP sticker by URL","value":{"to":"+16505551234","from":"+13124495648","sticker":{"url":"https://cdn.example.com/stickers/thumbs-up.webp"}}},"video":{"summary":"A video by URL","value":{"to":"+16505551234","from":"+13124495648","video":{"url":"https://cdn.example.com/unboxing.mp4"}}},"location":{"summary":"A pin the recipient can open in their maps app","value":{"to":"+16505551234","from":"+13124495648","location":{"latitude":37.7793,"longitude":-122.4193}}},"groups":{"summary":"A text message to every participant of a group","value":{"to":"wag_01krdgeqcxet5s7t44vh8rt9mg","text":{"body":"The route sheet for Tuesday is up."}}},"interactive-overview":{"summary":"Quick-reply buttons offering two replies","value":{"to":"+15551234567","from":"+13124495648","interactive":{"type":"button","body_text":"Your gardening workshop is scheduled for 9am tomorrow.","buttons":[{"type":"quick_reply","quick_reply":{"slug":"change-booking","text":"Change"}},{"type":"quick_reply","quick_reply":{"slug":"cancel-booking","text":"Cancel"}}]}}},"reply-buttons":{"summary":"A single quick-reply button","value":{"to":"+16505551234","from":"+13124495648","interactive":{"type":"button","body_text":"Your gardening workshop is scheduled for 9am tomorrow.","buttons":[{"type":"quick_reply","quick_reply":{"slug":"change-booking","text":"Change"}}]}}},"carousels":{"summary":"A carousel of product cards, each with its own button","value":{"to":"+16505551234","from":"+13124495648","interactive":{"type":"carousel","body_text":"Here are two of our latest arrivals, each under $25:","cards":[{"header":{"type":"image","url":"https://cdn.example.com/plants/blue-echeveria.jpeg"},"buttons":[{"type":"cta_url","cta_url":{"text":"Buy now","url":"https://shop.example.com/blue-echeveria"}}]},{"header":{"type":"image","url":"https://cdn.example.com/plants/zebra-haworthia.jpeg"},"buttons":[{"type":"cta_url","cta_url":{"text":"Buy now","url":"https://shop.example.com/zebra-haworthia"}}]}]}}},"contact-info-requests":{"summary":"A prompt asking the recipient to share their phone number","value":{"to":"+16505551234","from":"+13124495648","interactive":{"type":"request_contact_info","body_text":"To confirm your booking we need a number to reach you on. Tap below to share yours."}}},"cta-url-buttons":{"summary":"A button that opens a URL, with click tracking in the link","value":{"to":"+16505551234","from":"+13124495648","interactive":{"type":"cta_url","body_text":"Tap the button below to see the available dates.","cta_url":{"text":"See dates","url":"https://example.com/workshops?click_id=a1b2c3"}}}},"list-menus":{"summary":"A list menu the recipient picks one row from","value":{"to":"+16505551234","from":"+13124495648","interactive":{"type":"list","body_text":"Which shipping option do you prefer?","list":{"button_text":"Shipping options","sections":[{"title":"As soon as possible","rows":[{"slug":"priority_express","text":"Priority Mail Express"}]}]}}}},"location-requests":{"summary":"A prompt asking the recipient to share their location","value":{"to":"+16505551234","from":"+13124495648","interactive":{"type":"location_request_message","body_text":"Let's start with your pickup. Share your current location, or type an address instead."}}},"template-authentication":{"summary":"An authentication template carrying a one-time passcode","value":{"to":"+14155550100","template":{"slug":"bird_otp","language":"en","parameters":{"code":"481920"}}}},"template-marketing":{"summary":"A marketing template with an image header and a coupon button","value":{"to":"+16505551234","from":"+13125550101","template":{"slug":"summer_sale","language":"en","parameters":{"header_url":"https://cdn.example.com/banners/summer.png","first_name":"Pablo","code":"SUMMER25"}}}},"template-utility":{"summary":"A utility template confirming an order","value":{"to":"+16505551234","template":{"slug":"bird_order_confirmation","language":"en","parameters":{"ref":"A1B2C3D4","amount":"USD 49.99"}}}},"plain-text":{"summary":"A plain text message, the smallest free-form send","value":{"to":"+16505551234","from":"+13124495648","text":{"body":"Your driver is 2 minutes away."}}},"free-form-text":{"summary":"A free-form reply inside an open customer service window","value":{"to":"+14155550100","from":"+13124495648","text":{"body":"Your order shipped: https://example.com/track/A1B2C3","preview_url":true}}},"interactive-buttons":{"summary":"Reply buttons quoting the message that asked for them","value":{"to":"+14155550100","from":"+13124495648","in_reply_to_message_id":"wam_01kya19eknftrs2s6p82asmvnh","interactive":{"type":"button","body_text":"Your driver is 2 minutes away. Still at the same address?","buttons":[{"type":"quick_reply","quick_reply":{"slug":"same_address","text":"Yes, same address"}},{"type":"quick_reply","quick_reply":{"slug":"change_address","text":"Change address"}}]}}}}}}},"responses":{"202":{"description":"Message accepted for asynchronous delivery.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppMessage"},"example":{"id":"wam_01kya19eknftrs2s6p82asmvnh","direction":"outbound","from":{"phone_number":"+15550001111"},"to":{"group_id":"wag_01krdgeqcxet5s7t44vh8rt9mg"},"text":{"body":"The route sheet for Tuesday is up."},"status":"accepted","recipient_count":2,"delivered_count":0,"read_count":0,"created_at":"2026-09-15T14:03:10Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["attio","cli","make","mcp","medusa","n8n","sdk"]}},"/v1/whatsapp/messages/{message_id}":{"get":{"operationId":"getWhatsAppMessage","x-snippet-key":"whatsapp.get","summary":"Get a WhatsApp message","description":"Returns a single WhatsApp message: its current delivery status, per-stage timestamps (`sent_at`, `delivered_at`, `read_at`), and failure detail when it failed. It carries the one content object it was built from: `template`, or free-form `text`, `image`, `video`, `audio`, `sticker`, `document`, `location`, `interactive` or `contact_cards`. An inbound message carries `interactive_reply` when the contact tapped a reply button or a list row. An inbound message whose content WhatsApp models and we do not carries `unsupported` instead, naming the type rather than reading back empty. The `status` advances asynchronously as delivery progresses, so poll this endpoint (or subscribe to `whatsapp.*` webhook events) after a send to confirm delivery. For the per-event timeline, use [List events for a WhatsApp message](/docs/api/reference/list-whatsapp-message-events) instead.\n","tags":["whatsapp-messages"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"description":"ID of the message, as returned in the send response's `id` field.","schema":{"$ref":"#/components/schemas/WhatsAppMessageID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"WhatsApp message object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppMessage"},"example":{"id":"wam_01kya19eknftrs2s6p82asmvnh","direction":"outbound","from":{"phone_number":"+15550001111"},"to":{"group_id":"wag_01krdgeqcxet5s7t44vh8rt9mg"},"text":{"body":"Tuesday's route sheet is up."},"status":"delivered","recipient_count":2,"delivered_count":2,"read_count":2,"created_at":"2026-09-15T14:03:10Z","sent_at":"2026-09-15T14:03:11Z","delivered_at":"2026-09-15T14:03:12Z","read_at":"2026-09-15T14:04:02Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["attio","cli","mcp","n8n","sdk"]}},"/v1/whatsapp/messages/{message_id}/read":{"post":{"operationId":"sendWhatsAppReadReceipt","summary":"Mark a WhatsApp message as read","description":"Marks an inbound WhatsApp message as read, showing the contact the blue\nticks. WhatsApp also marks every earlier message in that conversation read.\nThis does not change the workspace inbox unread count. Use the conversation\nupdate endpoint with `read` to acknowledge messages in the inbox.\n\nPass `typing_indicator: true` to show a typing indicator as well. WhatsApp\nclears it when you send your next message, or after 25 seconds, whichever\ncomes first, and there is no call to clear it early, so ask for one only\nwhen you are about to reply. WhatsApp cannot show a typing indicator without\na read receipt, so both arrive together.\n\nThe acknowledgement is sent asynchronously: a `202` means Bird accepted the\nrequest, not that WhatsApp has shown it. Nothing reports back, because\nWhatsApp publishes no delivery, status or failure callback for an\nacknowledgement, so there is nothing to poll and no webhook event.\nRepeating the call is safe, and each call restarts the 25-second typing\nwindow. To refresh the indicator, send a fresh `Idempotency-Key` or none at\nall: a replayed key answers from the stored response without acknowledging\nanything again.\n\nOnly an inbound message can be marked read. WhatsApp allows this for 30\ndays after receipt, but Bird keeps the provider id a receipt needs for 15\ndays, so a message older than that answers `404`. A message Bird sent, or\none that never reached WhatsApp, answers `422`.\n","tags":["whatsapp-messages"],"x-audiences":["public","dashboard","command"],"x-snippet-key":"whatsapp.markRead","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"description":"ID of the inbound message to acknowledge.","schema":{"$ref":"#/components/schemas/WhatsAppMessageID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppReadReceiptRequest"}}}},"responses":{"202":{"description":"Acknowledgement accepted for asynchronous delivery.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppReadReceipt"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/messages/{message_id}/events":{"get":{"operationId":"listWhatsAppMessageEvents","x-snippet-key":"whatsapp.listEvents","summary":"List events for a WhatsApp message","description":"Returns a WhatsApp message's lifecycle events in chronological order, one entry per delivery transition (`whatsapp.accepted`, `whatsapp.sent`, `whatsapp.delivered`, `whatsapp.read`, `whatsapp.failed`). The timeline is bounded and returned in full, so this list is not paginated; an unknown message ID returns `404`. For the message's current state in a single field, use [Get a WhatsApp message](/docs/api/reference/get-whatsapp-message) instead.\n","tags":["whatsapp-messages"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"description":"ID of the message, as returned in the send response's `id` field.","schema":{"$ref":"#/components/schemas/WhatsAppMessageID"}},{"name":"type","in":"query","required":false,"description":"Keep only events of this exact type (for example `whatsapp.delivered` or `whatsapp.failed`). Omit for the full timeline.\n","schema":{"$ref":"#/components/schemas/WhatsAppEventType"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Event timeline for this WhatsApp message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppEventList"},"example":{"data":[{"id":"ev_01kya19f8p2hs5w1y7k4cmqrtv","type":"whatsapp.sent","occurred_at":"2026-09-15T14:03:11Z"},{"id":"ev_01kya19f2m8xqe4v0t6r3bnpcd","type":"whatsapp.delivered","occurred_at":"2026-09-15T14:03:12Z","recipient":{"phone_number":"+15550002222","bsuid":"US.AbC1"}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/whatsapp/messages/{message_id}/media/{media_id}":{"parameters":[{"name":"message_id","in":"path","required":true,"description":"WhatsApp message ID.","schema":{"$ref":"#/components/schemas/WhatsAppMessageID"}},{"name":"media_id","in":"path","required":true,"description":"Media ID, as returned in `id` on the message's content object.","schema":{"$ref":"#/components/schemas/WhatsAppFileID"}}],"get":{"operationId":"getWhatsAppMessageMedia","summary":"Get a WhatsApp message's media","description":"Redirects to a short-lived URL for the media on a received WhatsApp message,\nor on one from the WhatsApp Business app on a number shared with it: sent\nfrom the app (`origin: business_app_echo`) or imported from its chat\nhistory (`origin: history_sync`). That media is stored because WhatsApp's own\nURL is not fetchable without our credentials; this endpoint is what the `url` on the message's\n`image`, `video`, `audio`, `sticker` or `document` points at. The bytes\nlive in object storage and are served straight from there, so they never\ntransit the API.\n\nThe response is a `302` whose `Location` is that pre-authorized storage URL,\nvalid for 15 minutes; your client must follow redirects. The `Authorization`\nheader must be absent from the request that fetches that URL: a client that\nattaches credentials centrally, at its transport, interceptor or middleware\nlayer rather than per request, re-adds the header on every hop including the\nredirect, so the storage URL must be fetched with a client that carries\nnone.\n\nMedia is kept for 30 days after the message is received, the same as the\nmessage itself, so once both expire this operation returns `404`. A `410`\nmeans the stored file is gone while the message is still readable: the\nmessage still lists the media's `mime_type` and `caption`, but the bytes\ncannot be served. Other outbound messages have no media to serve.\n","tags":["whatsapp-messages"],"x-audiences":["public","command"],"x-snippet-key":"whatsapp.messages.media","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"responses":{"302":{"description":"Redirect to a storage URL valid for 15 minutes.","headers":{"Location":{"description":"The storage URL to fetch the media from.","schema":{"type":"string","format":"uri"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/messages/{message_id}/reaction":{"put":{"operationId":"upsertWhatsAppMessageReaction","summary":"React to a WhatsApp message","description":"Places an emoji reaction on a message this workspace received, the same way\ntapping and holding a message in WhatsApp does.\n\nYou hold at most one reaction per message, so this replaces your existing\none rather than adding another. To take a reaction back entirely, delete it.\n\nThe `202` means the reaction was accepted, not that WhatsApp applied it.\nReactions carry no delivery or read receipt, so the furthest one gets is\nsent. Read the message's `reactions` for what currently stands, or\n[List reaction events for a WhatsApp message](/docs/api/reference/list-whatsapp-message-reaction-events)\nfor what became of each change, including one WhatsApp refused.\n\nEach of these returns a `422`:\n\n- A message this workspace sent. This endpoint places reactions on messages\n  the contact sent; reacting to your own outbound message is not supported.\n- More than one emoji, since WhatsApp takes exactly one.\n\nA message Bird can no longer resolve returns a `404` instead. WhatsApp\naccepts a reaction on a message up to 30 days old, but Bird keeps the\nprovider id a reaction needs for **15 days**, so that is the practical age\nlimit. The message and its reaction log stay readable for 30; only the id\na placement needs is gone.\n\nReacting to a message received in a group addresses the group, so the\ngroup's own state applies: a group this workspace no longer holds returns\na `404` `WhatsAppGroupNotFound`, and one that is not active a `409`\n`WhatsAppGroupNotActive`.\n\nReactions are not charged for.\n","tags":["whatsapp-messages"],"x-audiences":["public","dashboard","command"],"x-snippet-key":"whatsapp.reaction.set","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"description":"ID of the message to react to, as returned in the `id` field of the message. Must be a message this workspace received.\n","schema":{"$ref":"#/components/schemas/WhatsAppMessageID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppReactionUpsert"},"examples":{"thumbs-up":{"summary":"Acknowledge a message with a thumbs up","value":{"emoji":"👍"}}}}}},"responses":{"202":{"description":"Reaction accepted; WhatsApp applies it asynchronously.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppReactionAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteWhatsAppMessageReaction","summary":"Remove your reaction from a WhatsApp message","description":"Takes back the reaction this workspace placed on a message, the same way\ntapping your own reaction in WhatsApp does. Only your own reaction can be\nremoved; one the contact placed is theirs to take back.\n\nRemoving a reaction from a message you have not reacted to changes nothing\nand still answers `202`, so a repeated call is safe.\n\nA removal travels the same path as placing a reaction, so it is refused on\nthe same grounds. A message this workspace sent returns a `422`: it could\nnever have carried a reaction of ours to remove, since placing one there is\nnot supported either.\n\nA message Bird can no longer resolve returns a `404` instead, on the same\n15-day retention a placement is bounded by. A reaction on a message\nreceived in a group addresses the group, so a group this workspace no\nlonger holds returns a `404` `WhatsAppGroupNotFound` and one that is not\nactive a `409` `WhatsAppGroupNotActive`, the same as placing one does.\n\nThe `202` is the removal accepted rather than applied. The reaction stays in\nthe message's `reactions` until WhatsApp confirms the removal and then drops\nout, so one on its way off reads as still standing rather than disappearing\nbefore it is gone.\n","tags":["whatsapp-messages"],"x-audiences":["public","dashboard","command"],"x-snippet-key":"whatsapp.reaction.remove","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"description":"ID of the message to take your reaction off, as returned in the `id` field of the message.\n","schema":{"$ref":"#/components/schemas/WhatsAppMessageID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"202":{"description":"Removal accepted. No body: the reaction is still standing at this point, and on a message this workspace never reacted to there is nothing to return. Read the message's `reactions` to see it go.\n","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/messages/{message_id}/reaction-events":{"get":{"operationId":"listWhatsAppMessageReactionEvents","summary":"List reaction events for a WhatsApp message","description":"Returns the changes made to this message's reactions as a cursor-paginated\nlist, newest first: each emoji placed, each one replaced by a different\nemoji, and each one taken back. Entries are never edited, so a contact who\nreacts, changes their mind and then removes it leaves three of them.\n\nOne case is missing rather than recorded. A reaction is matched to the\nmessage it was placed on through a provider id we keep for 15 days, while\nWhatsApp accepts a reaction on a message up to 30 days old, so one placed on\na message older than that cannot be matched and is recorded nowhere: not\nhere, and not in the message's `reactions`.\n\nUse this to show who reacted and when, or to find out what became of a\nreaction that never appeared: a `failed` or `rejected` entry carries the\nreason on `error`. For what currently stands on the message, read its\n`reactions`, which folds this log down to one entry per sender.\n\nPass the response's `next_cursor` back as `starting_after` to fetch the next\npage.\n\nReaction events are kept for **30 days**, counted from when the message they\nbelong to was accepted rather than from the reaction itself. They therefore\ngo at about the same time as the message, not 30 days after the last\nreaction on it.\n","tags":["whatsapp-messages"],"x-audiences":["public","dashboard","command"],"x-snippet-key":"whatsapp.reaction.listEvents","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"description":"ID of the message whose reactions to read, as returned in the `id` field of the message.\n","schema":{"$ref":"#/components/schemas/WhatsAppMessageID"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of reaction changes for this WhatsApp message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppReactionEventList"},"example":{"data":[{"id":"war_01krdgeqcxet5s7t44vh8rt9mh","emoji":"🎉","status":"rejected","from":{"phone_number":"+13124495569"},"error":{"code":"internal_error","description":"the receiving number is no longer connected","occurred_at":"2026-08-28T19:04:22Z"},"occurred_at":"2026-08-28T19:04:22Z"},{"id":"war_01krdgeqcxet5s7t44vh8rt9mg","emoji":"👍","status":"received","from":{"phone_number":"+14155550100","bsuid":"US.13491208655302741918"},"occurred_at":"2026-08-28T19:01:10Z"}],"next_cursor":null,"prev_cursor":null,"refresh_cursor":"eyJ2IjoxLCJzIjoiMjAyNi0wOC0yOFQxOTowNDoyMloiLCJpIjoiMDE5ZTFiMDctNWQ5ZC03NjhiLTkzZTgtODRkYzUxOGQyNjkxIn0"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/conversations":{"get":{"operationId":"listWhatsAppConversations","x-snippet-key":"whatsapp.conversations.list","summary":"List WhatsApp conversations","description":"Returns the workspace's WhatsApp conversations as a cursor-paginated list, most recently active first. A conversation is one thread between a number you have connected and a single contact, or a group that number belongs to. It appears once the number has conversations enabled and a first message has been recorded.\n\nEach conversation says who answers it right now, when its customer-service window closes, whether anything in it is unread, and what its most recent message was. Read the messages themselves through [the conversation's message list](/docs/api/reference/list-whatsapp-conversation-messages).\n\nFilter by inbox status, connected number, by who holds the conversation, by who it is assigned to, by whether its service window is open, or by label. Search with `q` to find a contact by any part of their phone number, BSUID, username or display name, or a conversation by part of a label. Callers with `whatsapp_management` read access also find a group by part of its name.\n\nResolving a conversation in the inbox preserves its ID and labels. A new inbound message reopens the same conversation. Inbox status is independent of the customer-service window. Messages are retained for **30 days**. When a conversation's last message expires, the conversation is deleted and leaves this list. The contact's next message starts a new conversation with a new ID.\n","tags":["whatsapp-conversations"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/ConversationInboxStatusFilter"},{"name":"business_phone_number","in":"query","required":false,"description":"Return only conversations on this WhatsApp business phone number, in E.164 format. Omit to cover every number in the workspace.","schema":{"type":"string","minLength":1,"maxLength":16,"example":"+15550001234"}},{"name":"control","in":"query","required":false,"description":"Return only conversations the agent holds (`meta_business_agent`) or that your workspace holds (`bird`).","schema":{"$ref":"#/components/schemas/WhatsAppConversationControl"}},{"$ref":"#/components/parameters/ConversationAssigneeFilter"},{"name":"service_window_status","in":"query","required":false,"description":"Return only conversations whose customer-service window is `open` or `closed`.","schema":{"$ref":"#/components/schemas/WhatsAppConversationServiceWindowStatus"},"example":"open"},{"$ref":"#/components/parameters/ConversationLabelFilter"},{"name":"q","in":"query","required":false,"description":"Return only conversations whose contact phone number, BSUID, username, display name, group name or one of its labels contains this text, ignoring case. A phone number matches with or without its `+`, spaces, dashes, dots or parentheses. A group matches the name it had when its conversation started, and only for callers with `whatsapp_management` read access. The text cannot contain control characters such as tabs or line breaks.","schema":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^\\x00-\\x1F\\x7F]*[^\\x00-\\x20\\x7F][^\\x00-\\x1F\\x7F]*$","example":"jamie"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of conversations, most recently active first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppConversationList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/conversations/{conversation_id}":{"parameters":[{"name":"conversation_id","in":"path","required":true,"description":"Conversation identifier. Starts with `wacv_`.","schema":{"$ref":"#/components/schemas/WhatsAppConversationID"}}],"get":{"operationId":"getWhatsAppConversation","x-snippet-key":"whatsapp.conversations.get","summary":"Get a WhatsApp conversation","description":"Returns one conversation's current state: who answers it right now, when its customer-service window closes, how many messages are unread, its labels, and its most recent message.\n\nResolving inbox work preserves the conversation. New inbound messages reopen it with the same ID. Messages are retained for 30 days. When the last one expires, the conversation and its events are deleted, and this returns `404`.\n","tags":["whatsapp-conversations"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"responses":{"200":{"description":"The conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppConversation"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateWhatsAppConversation","x-snippet-key":"whatsapp.conversations.update","summary":"Update a WhatsApp conversation","description":"Updates assignment, inbox status, labels, or shared workspace read state. Every field is optional and an omitted one is left unchanged.\n\n`assigned_to` takes a user ID, `me` for the user making the request, or null to unassign. The user must be a member of this workspace. `me` needs a request made as a user: an API key has no user, so passing `me` with one returns a `422`.\n\n`labels` replaces the conversation's labels with the set you send, so include every label you want to keep. Pass an empty array to clear them.\n\nPass `read` with a date-time cutoff for message `created_at` to acknowledge received inbound messages at or before it in the workspace inbox. Messages sharing the timestamp are included together; later arrivals remain unread. This does not send the customer a WhatsApp read receipt.\n\nLabels are yours alone: Bird sets none of its own, and changing them does not mark the conversation read or unread.\n\nSet `inbox_status` to `resolved` to finish the inbox work, or `open` to reopen it. New inbound messages reopen resolved conversations. Inbox status does not change read state or the customer-service window.\n\nControl is not changed here. Moving a conversation between the agent and your application needs WhatsApp's agreement and can be refused, so you take and release control in the dashboard inbox.\n","tags":["whatsapp-conversations"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppConversationUpdateRequest"},"example":{"labels":["billing"]}}}},"responses":{"200":{"description":"The updated conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppConversation"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/conversations/{conversation_id}/messages":{"parameters":[{"name":"conversation_id","in":"path","required":true,"description":"Conversation identifier. Starts with `wacv_`.","schema":{"$ref":"#/components/schemas/WhatsAppConversationID"}}],"get":{"operationId":"listWhatsAppConversationMessages","x-snippet-key":"whatsapp.conversations.list_messages","summary":"List messages in a WhatsApp conversation","description":"Returns the messages in one conversation, newest first, as a cursor-paginated list. They are the same messages [the WhatsApp message list](/docs/api/reference/list-whatsapp-messages) returns, already narrowed to this conversation's number and contact, so each one carries the content object it was built from and its current delivery status.\n\nFilter by `direction` to read only what the contact sent or only what was sent to them. Pass the response's `next_cursor` back as `starting_after` for the next page.\n\nMessages are retained for **30 days**. When a conversation's last message expires, the conversation and its events are deleted too, and the conversation returns `404`. The contact's next message starts a new conversation with a new ID. There is no way to read messages older than the window.\n","tags":["whatsapp-conversations"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"direction","in":"query","required":false,"description":"Return only messages the contact sent (`inbound`) or only messages sent to them (`outbound`). Omit for both.\n","schema":{"$ref":"#/components/schemas/MessageDirection"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of messages, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppMessageList"},"example":{"data":[{"id":"wam_01krdgeqcxet5s7t44vh8rt9mh","direction":"outbound","from":{"phone_number":"+15550001234"},"to":{"phone_number":"+15550001111","bsuid":"US.13491208655302741918"},"text":{"body":"Yes. Reply with the new address and we will update it."},"status":"delivered","created_at":"2026-09-23T10:37:12Z","sent_at":"2026-09-23T10:37:13Z","delivered_at":"2026-09-23T10:37:14Z"},{"id":"wam_01krdgeqcxet5s7t44vh8rt9mg","direction":"inbound","from":{"phone_number":"+15550001111","bsuid":"US.13491208655302741918","display_name":"Jamie Rivera"},"to":{"phone_number":"+15550001234"},"text":{"body":"Can I change the delivery address on my order?"},"status":"received","created_at":"2026-09-23T10:35:00Z"}],"next_cursor":null,"prev_cursor":null,"refresh_cursor":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/conversations/{conversation_id}/messages/{message_id}":{"parameters":[{"name":"conversation_id","in":"path","required":true,"description":"Conversation identifier. Starts with `wacv_`.","schema":{"$ref":"#/components/schemas/WhatsAppConversationID"}},{"name":"message_id","in":"path","required":true,"description":"Message identifier. Starts with `wam_`.","schema":{"$ref":"#/components/schemas/WhatsAppMessageID"}}],"get":{"operationId":"getWhatsAppConversationMessage","x-snippet-key":"whatsapp.conversations.get_message","summary":"Get a message in a WhatsApp conversation","description":"Returns one message in a conversation. It is the same object [get a WhatsApp message](/docs/api/reference/get-whatsapp-message) returns, but read from the conversation's own store, so a message is readable here as soon as the conversation records it.\n\nReturns `404` when the message does not belong to this conversation, or when it is past the 30-day message retention.\n","tags":["whatsapp-conversations"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppMessage"},"example":{"id":"wam_01krdgeqcxet5s7t44vh8rt9mg","direction":"inbound","from":{"phone_number":"+15550001111","bsuid":"US.13491208655302741918","display_name":"Jamie Rivera"},"to":{"phone_number":"+15550001234"},"text":{"body":"Can I change the delivery address on my order?"},"status":"received","created_at":"2026-09-23T10:35:00Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/conversations/{conversation_id}/events":{"parameters":[{"name":"conversation_id","in":"path","required":true,"description":"Conversation identifier. Starts with `wacv_`.","schema":{"$ref":"#/components/schemas/WhatsAppConversationID"}}],"get":{"operationId":"listWhatsAppConversationEvents","x-snippet-key":"whatsapp.conversations.list_events","summary":"List WhatsApp conversation events","description":"Returns the conversation's activity history, newest first:\n- A move of control between the Meta Business Agent and your application.\n- An assignment, reassignment or unassignment.\n- A notification sent to the agent about this contact.\n\nMessages are listed separately, by [listing the conversation's messages](/docs/api/reference/list-whatsapp-conversation-messages).\nPass `type` to keep only events of one type.\n\nEvents are retained for **30 days** from when they were recorded, so a long-running conversation lists only its recent history. When the conversation's last message passes its own 30-day retention, the conversation is deleted with its remaining events, and this returns `404`.\n","tags":["whatsapp-conversations"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"type","in":"query","required":false,"description":"Keep only events of this exact type (for example `whatsapp_conversation.control_changed`). Omit for every type.\n","schema":{"$ref":"#/components/schemas/WhatsAppConversationEventType"},"example":"whatsapp_conversation.control_changed"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of conversation events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppConversationEventList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/groups":{"get":{"operationId":"listWhatsAppGroups","x-snippet-key":"whatsapp.groups.list","summary":"List WhatsApp groups","description":"Returns the WhatsApp groups your workspace created as a cursor-paginated\nlist, newest first. Each group carries the number that administers it, its\nsubject, its status, its invite link once WhatsApp has issued one, its\nparticipant count, and its participant list.\n\nFilter by the business number that administers the groups (`number`), by\nthe WhatsApp Business Account that number sends under (`waba`),\nor by `status`. `q` searches the subject and the description for a\nsubstring, case-insensitively.\n\nA group stays in the list after it is deleted, with `status` `deleted`, so\nfilter it out to see only the groups you can still message.\n","tags":["whatsapp-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"sort","in":"query","required":false,"description":"Field to sort by.","schema":{"$ref":"#/components/schemas/WhatsAppGroupSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"name":"number","in":"query","required":false,"description":"Filter by the business number that administers the group, as either the number in E.164 format or the number's `id` (`wan_` prefix). A value that parses as a valid ID resolves by ID; any other value must be an E.164 number, and anything else is a `422`. The E.164 form is matched against the group's stored record of the number it was created on.\n","schema":{"type":"string","minLength":1,"maxLength":64},"example":"+13124495648"},{"name":"waba","in":"query","required":false,"description":"Filter by the WABA identifier returned on the group. Groups with `waba: null` do not match this filter.\n","schema":{"type":"string","minLength":1,"maxLength":64},"example":"102290129340398"},{"name":"q","in":"query","required":false,"description":"Case-insensitive substring match against the group's subject or description.","schema":{"type":"string","minLength":1},"example":"support"},{"name":"status","in":"query","required":false,"description":"Filter by status. Repeat the parameter to match any of several statuses.","schema":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppGroupStatus"}}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/CreatedAfter"},{"$ref":"#/components/parameters/CreatedBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of the WhatsApp groups your workspace created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppGroupList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createWhatsAppGroup","x-snippet-key":"whatsapp.groups.create","summary":"Create a WhatsApp group","description":"Creates a WhatsApp group administered by one of your business numbers. The\nnumber must hold Official Business Account status, which WhatsApp grants a\nnumber whose business is verified and whose display name is approved;\nwithout it the request returns a `412` `WhatsAppGroupsNotEligible`.\n`GET /v1/whatsapp/numbers` reports it per number as\n`is_official_business_account`, so read it there rather than discovering it\nfrom the refusal. A group\nholds 8 people besides your business, and a number can own 10,000 groups;\na number already at that limit returns a `409` `WhatsAppGroupLimitReached`.\n\nThe `202` response is the accepted group, with `status` `pending`. WhatsApp\nconfirms the group moments later, and that is when it issues the invite link\nand the group becomes messageable, so the response carries no\n`invite_link`. Read the group back until its `status` is `active`. If WhatsApp refuses, the\ngroup ends at `failed` with `last_operation.last_error` set, and creating\nanother group is the way forward.\n\nNobody is added at create time, and there is no way to add someone later:\npeople join by opening the group's invite link. Send the link with the group\ninvite template, and choose at create time whether opening it joins the\ngroup outright or raises a join request you approve.\n","tags":["whatsapp-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppGroupCreate"}}}},"responses":{"202":{"description":"Group accepted for creation at WhatsApp.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppGroup"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/groups/{group_id}":{"get":{"operationId":"getWhatsAppGroup","x-snippet-key":"whatsapp.groups.get","summary":"Get a WhatsApp group","description":"Returns one group as it currently stands, including who is in it. The business\nnumber that administers the group is not counted among the participants.\n\nRead the group back after creating it to watch `status` move from `pending`\nto `active`, which is when WhatsApp has issued the `invite_link`. A\n`suspended` group is one WhatsApp has stopped activity in; a `deleted` one is\nkept here so a reference to it still resolves.\n","tags":["whatsapp-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"group_id","in":"path","required":true,"description":"ID of the group, as returned when it was created.","schema":{"$ref":"#/components/schemas/WhatsAppGroupID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppGroup"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateWhatsAppGroup","x-snippet-key":"whatsapp.groups.update","summary":"Update a WhatsApp group","description":"Changes what participants see at the top of the group: its subject, its\ndescription, and its picture. Fields you omit are left as they are; send\n`null` to clear the description. A `null` picture clears the one Bird\nstores, but WhatsApp offers no way to take a group's photo down, so\nparticipants keep seeing the current one until a new picture replaces it.\n\nWhatsApp applies each field separately, so a change can be part-applied:\none field refused while the others take effect. The `202` response is the\nchange accepted, not applied: it echoes the group as Bird holds it, with\n`last_operation` at `pending`. WhatsApp reports the outcome on the\n`group_settings_update` webhook, which settles `last_operation` to `success`\nor `failed` and fills its `results` with one entry per field, so a part-apply\nsays which field was refused and why. Re-read the group to see what took\neffect.\n\nTwo `409`s guard this, and `status` is checked first: a group that is not\n`active` returns `WhatsAppGroupNotActive`, whatever its `last_operation` says.\nThat matters for a group still being created, which is `pending` on both counts\nat once, and the group-level answer is the more useful one, since no change can\nland until it exists. Once the group is `active`, a change already outstanding\nreturns `WhatsAppGroupUpdateInProgress` while `last_operation.status` is\n`pending`.\n\nThe picture names a file in your workspace's media library, and WhatsApp\ntakes only a square JPEG. `join_approval_mode` and the administering number\nare fixed when the group is created and cannot be changed here.\n","tags":["whatsapp-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"group_id","in":"path","required":true,"description":"ID of the group to change.","schema":{"$ref":"#/components/schemas/WhatsAppGroupID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppGroupUpdate"}}}},"responses":{"202":{"description":"Change accepted; the group as Bird holds it. Re-read for what WhatsApp applied.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppGroup"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteWhatsAppGroup","x-snippet-key":"whatsapp.groups.delete","summary":"Delete a WhatsApp group","description":"Deletes the group at WhatsApp. Every participant loses access, your business\nincluded, and the invite link stops working. This cannot be undone. To run\nthe conversation again, create a new group and send its link.\n\nThe `202` response is the accepted deletion. The group is readable\nafterwards with `status` `deleted`, so a stored reference to it still\nresolves rather than turning into a `404`.\n\nA `failed` group can be deleted too, and that one does not reach WhatsApp:\nthe create never produced a group there, so the row is Bird's own\nbookkeeping and clearing it reaches no external system. It answers `202`\nlike any other delete, and the row stays readable at `deleted` rather than\nleaving the list. Every other\nstatus refuses with a `409` `WhatsAppGroupNotActive`: a `deleted` group is\nalready gone, a `suspended` one is WhatsApp's to release, and a `pending`\none has an outcome still coming, which is why a create that never confirms\nis given up on and moved to `failed` rather than left pending.\n","tags":["whatsapp-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"group_id","in":"path","required":true,"description":"ID of the group to delete.","schema":{"$ref":"#/components/schemas/WhatsAppGroupID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"202":{"description":"Deletion accepted; the group as Bird holds it. Re-read to confirm it went through.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppGroup"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/groups/{group_id}/invite-link/rotate":{"post":{"operationId":"rotateWhatsAppGroupInviteLink","x-snippet-key":"whatsapp.groups.invite_link.rotate","summary":"Rotate a WhatsApp group's invite link","description":"Issues a new invite link for the group. Every link issued before stops\nworking, so anyone still holding one cannot join. Rotate the link when a\nlink has spread further than you intended, or after removing someone you do\nnot want back.\n\nRotating is not how you read the current link: the group carries its\n`invite_link`, so\n`GET /v1/whatsapp/groups/{group_id}` is the read.\nOnly an `active` group has a link to rotate; any other status returns a `409`\n`WhatsAppGroupNotActive`.\n\nLike pinning and unpinning, this answers `200` rather than `202`.\nWhatsApp issues the new link in its own reply and sends no webhook for a\nrotation, so the link in the response is the rotation itself having\nhappened, not an acknowledgement that it will.\n","tags":["whatsapp-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"group_id","in":"path","required":true,"description":"ID of the group whose invite link is being replaced.","schema":{"$ref":"#/components/schemas/WhatsAppGroupID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The group's new invite link.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppGroupInviteLink"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/groups/{group_id}/participants/{participant_ref}":{"delete":{"operationId":"deleteWhatsAppGroupParticipant","x-snippet-key":"whatsapp.groups.participants.remove","summary":"Remove a participant from a WhatsApp group","description":"Removes one person from the group. Name them by either identifier the\ngroup's `participants` list them under: `bsuid`, which everyone has, or\n`phone_number`, which is there only when WhatsApp shares it.\n\n**Removal cannot be undone.** WhatsApp blocks a removed person from joining\nthe group by invite link, and the block follows the person rather than the\nlink they were removed under: rotating the invite link does not let them\nback in. There is no add operation to pair with this one either, because\nWhatsApp lets nobody be added directly and people join only by opening the\nlink. So nothing returns someone to this group once they are out, and\nreaching them again means creating another group and inviting them to it.\n\nThe `202` response is the removal accepted, not applied: WhatsApp can still\nrefuse it, which arrives on the `group_participants_update` webhook. The\noutcome lands on that participant's own `last_operation`, `pending` until the\nwebhook settles it, so removing several people at once gives each their own\nstate and their own failure rather than one shared verdict. Re-read the group\nto see who is left.\n\nA second removal of the same participant while theirs is `pending` returns a\n`409` `WhatsAppGroupUpdateInProgress`; removing a different participant does\nnot. Only an `active` group can be changed; any other status returns a `409`\n`WhatsAppGroupNotActive`.\n","tags":["whatsapp-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"group_id","in":"path","required":true,"description":"ID of the group to remove someone from.","schema":{"$ref":"#/components/schemas/WhatsAppGroupID"}},{"name":"participant_ref","in":"path","required":true,"description":"The person to remove, named by either identifier the group lists them under: their `bsuid`, or their `phone_number` in E.164 format (`+16505551234`) when WhatsApp gives you one. Pass the value as it reads: percent-encode the leading `+` as `%2B` only when your client does not do that for you. A value naming someone who is not in the group returns a `422` `WhatsAppGroupParticipantNotFound`.\n","schema":{"type":"string","minLength":1,"example":"+16505551234"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"202":{"description":"Removal accepted; the group as Bird holds it. Re-read for who is left.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppGroup"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/groups/{group_id}/pinned-messages":{"post":{"operationId":"createWhatsAppGroupPinnedMessage","x-snippet-key":"whatsapp.groups.pins.create","summary":"Pin a message in a WhatsApp group","description":"Pins one of the group's messages at the top of its chat, where it stays for\nthe number of days you give, from 1 to 30. Pin the message a conversation\nkeeps coming back to, so a participant joining later does not have to\nscroll for it.\n\nThe message has to be one this group carries: a message in another group, or\na one-to-one message, returns a `422` `WhatsAppMessageNotInGroup`. A\n`message_id` naming no message the workspace still holds returns a `404`\ninstead, which is also what an id older than the 30 days messages stay\nreadable for gets. Only an\n`active` group can be changed; any other status returns a `409`\n`WhatsAppGroupNotActive`.\n\nA group holds 3 pinned messages at once, and pinning a fourth unpins the\noldest rather than failing. Pinning an already-pinned message replaces its\nexpiry. What the group currently pins is on the group itself, as\n`pinned_messages`.\n\nWhatsApp confirms a pin in its reply rather than on a webhook, so the\nresponse is the applied pin and the entry appears in the group's\n`pinned_messages` straight away. Nothing about a pin is left in flight, so a\npin never blocks the next pin or unpin.\n","tags":["whatsapp-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"group_id","in":"path","required":true,"description":"ID of the group to pin a message in.","schema":{"$ref":"#/components/schemas/WhatsAppGroupID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppGroupPinnedMessageCreate"}}}},"responses":{"200":{"description":"The applied pin: the message and when its pin expires.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppGroupPinnedMessage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/groups/{group_id}/pinned-messages/{message_id}":{"delete":{"operationId":"deleteWhatsAppGroupPinnedMessage","x-snippet-key":"whatsapp.groups.pins.delete","summary":"Unpin a message in a WhatsApp group","description":"Takes the message off the top of the group's chat before its pin would have\nexpired. WhatsApp unpins a message on its own once the days you gave have\npassed, so unpin only to take one down early.\n\nThe message has to be one this group carries: a message in another group, or\na one-to-one message, returns a `422` `WhatsAppMessageNotInGroup`. Past the\n30 days messages stay readable for, that check can no longer run, so a\nmessage holding no pin answers `200` whichever group it belonged to. Only an\n`active` group can be changed; any other status returns a `409`\n`WhatsAppGroupNotActive`.\n\nUnpinning a message this group carries that is not currently pinned changes\nnothing and still answers `200`, so a repeated call is safe. WhatsApp\nconfirms a successful unpin in its reply rather than on a webhook, so the\nentry is gone from `pinned_messages` by the time the response returns.\n","tags":["whatsapp-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"group_id","in":"path","required":true,"description":"ID of the group to unpin a message in.","schema":{"$ref":"#/components/schemas/WhatsAppGroupID"}},{"name":"message_id","in":"path","required":true,"description":"ID of the message to unpin, as returned in the send response's `id`.","schema":{"$ref":"#/components/schemas/WhatsAppMessageID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The unpin applied; the group as Bird holds it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppGroup"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/groups/{group_id}/join-requests":{"get":{"operationId":"listWhatsAppGroupJoinRequests","x-snippet-key":"whatsapp.groups.join_requests.list","summary":"List a WhatsApp group's join requests","description":"Returns the join requests still waiting for a decision, oldest first. Each\ncarries the person who asked and when they asked.\n\nOnly a group created with `join_approval_mode` `approval_required` collects\njoin requests; on any other group the list is empty. A request leaves the\nlist once you decide it, and also when the person cancels it themselves.\n\nDecide requests with\n`POST /v1/whatsapp/groups/{group_id}/join-requests/batch-approve`\nor\n`POST /v1/whatsapp/groups/{group_id}/join-requests/batch-reject`.\n","tags":["whatsapp-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"group_id","in":"path","required":true,"description":"ID of the group whose join requests are being listed.","schema":{"$ref":"#/components/schemas/WhatsAppGroupID"}},{"name":"sort","in":"query","required":false,"description":"Field to sort by.","schema":{"$ref":"#/components/schemas/WhatsAppGroupJoinRequestSortField"}},{"$ref":"#/components/parameters/OrderAsc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of the group's pending join requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppGroupJoinRequestList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/groups/{group_id}/join-requests/batch-approve":{"post":{"operationId":"approveWhatsAppGroupJoinRequests","x-snippet-key":"whatsapp.groups.join_requests.approve","summary":"Approve WhatsApp group join requests","description":"Approves the named join requests, up to 50 in one call.\n\nWhatsApp decides each request on its own, so the batch can be part-applied:\nthe response lists the ones it accepted in `decided` and the rest in\n`failed` with the reason each was refused. A refusal is usually a person\nwho has not accepted WhatsApp's current terms, which no retry fixes.\n\nEach person approved can enter the group through its invite link. Re-read the\ngroup to see who has arrived.\n\nA group holds 8 participants besides your business. Approving more than the\ngroup has room for does not refuse the call: the requests that fit are\ndecided and the rest come back in `failed`, each saying the approval would\ntake the group past its participant limit. A group that is not `active`\ndoes refuse the whole call, with a `409` `WhatsAppGroupNotActive`.\n","tags":["whatsapp-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"group_id","in":"path","required":true,"description":"ID of the group whose join requests are being decided.","schema":{"$ref":"#/components/schemas/WhatsAppGroupID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppGroupJoinRequestDecision"}}}},"responses":{"202":{"description":"What happened to each join request in the batch.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppGroupJoinRequestDecisionResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/groups/{group_id}/join-requests/batch-reject":{"post":{"operationId":"rejectWhatsAppGroupJoinRequests","x-snippet-key":"whatsapp.groups.join_requests.reject","summary":"Reject WhatsApp group join requests","description":"Rejects the named join requests, up to 50 in one call.\n\nWhatsApp decides each request on its own, so the batch can be part-applied:\nthe response lists the ones it accepted in `decided` and the rest in\n`failed` with the reason each was refused. A refusal is usually a person\nwho has not accepted WhatsApp's current terms, which no retry fixes.\n\nA group that is not `active` refuses the whole call, with a `409`\n`WhatsAppGroupNotActive`, rather than returning per-request failures.\n\nEach person rejected sees the option to ask again the next time they open the invite link, so a rejection is not a ban. Remove someone through the participants operation if they should not be able to come back.\n","tags":["whatsapp-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"group_id","in":"path","required":true,"description":"ID of the group whose join requests are being decided.","schema":{"$ref":"#/components/schemas/WhatsAppGroupID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppGroupJoinRequestDecision"}}}},"responses":{"202":{"description":"What happened to each join request in the batch.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppGroupJoinRequestDecisionResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/templates":{"get":{"operationId":"listWhatsAppTemplates","x-snippet-key":"whatsapp.templates.list","summary":"List available message templates","description":"Returns the WhatsApp message templates available to your workspace: both the workspace's own templates (`scope: workspace`) and our built-in, Meta-approved templates (`scope: system`); filter to one tier with `scope`. Each entry carries the template's `slug` (the handle you reference when sending), its aggregated `status`, and the languages a send can currently resolve. It also summarizes where every language stands at Meta, so a list page can show an accurate row without another request. Content is not here: it lives under [a version](/docs/api/reference/get-whatsapp-template-version). The list is cursor-paginated. With no `scope`, the workspace's own templates come first, newest first, followed by our built-in templates.\n","tags":["whatsapp-templates"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"waba","in":"query","required":false,"description":"Filter to a single WhatsApp Business Account by its Meta WABA ID: the same value each template reports in its own `waba` field. Our built-in templates belong to no account and are never returned when this is set, and an account your workspace does not hold returns an empty page.","schema":{"type":"string","minLength":1,"example":"102290129340398"}},{"name":"status","in":"query","required":false,"description":"Filter by lifecycle status. Repeat the parameter to match any of several. Our built-in templates are always `active`.","schema":{"type":"array","items":{"$ref":"#/components/schemas/TemplateStatus"}}},{"name":"scope","in":"query","required":false,"description":"Filter by ownership tier: `system` for the built-in, Meta-approved template catalog, or `workspace` for the workspace's own templates. Omit to return both.","schema":{"$ref":"#/components/schemas/TemplateScope"}},{"name":"category","in":"query","required":false,"description":"Filter by template category.","schema":{"$ref":"#/components/schemas/WhatsAppTemplateCategory"}},{"name":"q","in":"query","required":false,"description":"A case-insensitive substring search across the template's slug, name, and description.","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The message templates available to your workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["attio","cli","mcp","sdk"]},"post":{"operationId":"createWhatsAppTemplate","x-snippet-key":"whatsapp.templates.create","summary":"Create a message template","description":"Creates a WhatsApp message template. Supply `languages` to seed its first draft in the same call, or omit it to create the template alone and add content through the version and language paths. Nothing here reaches Meta: content is submitted for review as a separate, explicit step, so a template this call returns is `draft` and not yet sendable.\n","tags":["whatsapp-templates"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateCreate"}}}},"responses":{"201":{"description":"The created template.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/templates/{template_ref}":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"Template ID (`wat_` prefix) or slug. A value that parses as a valid ID resolves by ID; any other value resolves as a slug.\n","schema":{"type":"string","minLength":1,"maxLength":63},"example":"bird_otp"}],"get":{"operationId":"getWhatsAppTemplate","x-snippet-key":"whatsapp.templates.get","summary":"Get a message template","description":"Returns one template by its ID or slug: its lifecycle, the languages a send can currently resolve, a summary of where every language stands at Meta, and a pointer to the version that is live. Content is not here: read [a version](/docs/api/reference/get-whatsapp-template-version) for that.\n","tags":["whatsapp-templates"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"responses":{"200":{"description":"The requested template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateWhatsAppTemplate","x-snippet-key":"whatsapp.templates.update","summary":"Update a message template","description":"Updates a template's metadata. The slug can change only before the first submission. Changing it after the first submission returns `409` (`E15070`), even if Meta rejects the template. Display names remain editable. Built-in templates cannot be edited.\n","tags":["whatsapp-templates"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateUpdate"}}}},"responses":{"200":{"description":"The updated template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteWhatsAppTemplate","x-snippet-key":"whatsapp.templates.delete","summary":"Delete a message template","description":"Deletes a template and every language it holds. Built-in templates cannot be deleted. A template your workspace authored is removed immediately, and its copy at WhatsApp is removed afterwards. WhatsApp refuses to delete a template while any of its languages is disabled, so the request fails until WhatsApp changes that language's status. While other resources still use the template, the request fails with `409`; the error says what uses it and how to clear it.\n","tags":["whatsapp-templates"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The template was deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/templates/{template_ref}/versions":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"Template ID (`wat_` prefix) or slug. A value that parses as a valid ID resolves by ID; any other value resolves as a slug.\n","schema":{"type":"string","minLength":1,"maxLength":63},"example":"bird_otp"}],"get":{"operationId":"listWhatsAppTemplateVersions","x-snippet-key":"whatsapp.templates.versions.list","summary":"List a template's versions","description":"Returns the template's versions, newest first. Each names the languages it holds and what became of them; content is not here, since a page of versions would carry a copy of every language in every one of them. Read a single version for its content.\n","tags":["whatsapp-templates"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The template's versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateVersionList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createWhatsAppTemplateDraft","x-snippet-key":"whatsapp.templates.versions.create","summary":"Create a template draft","description":"Opens the template's draft, seeded from the newest submitted version, or an empty draft if the template has none. A template has at most one open draft. The API returns `200` with an existing draft and `201` when this call opens one; both responses use the same body shape. Read the template's `draft_version_id` first if you do not want to open a draft.\n\nA WhatsApp template has no draft until this call opens one. The email channel has no equivalent operation, because an email template's draft always exists.\n","tags":["whatsapp-templates"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The draft that was already open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateVersion"}}}},"201":{"description":"The draft this call opened.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateVersion"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/templates/{template_ref}/events":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"Template ID (`wat_` prefix) or slug. A value that parses as a valid ID resolves by ID; any other value resolves as a slug.\n","schema":{"type":"string","minLength":1,"maxLength":63},"example":"order_update"}],"get":{"operationId":"listWhatsAppTemplateEvents","summary":"List WhatsApp template events","description":"Returns the template's history since Bird began recording it, newest\nfirst:\n\n- A status WhatsApp gave one of its languages, such as an approval, a\n  rejection, a pause, a reinstatement, or a deletion.\n- A change in a language's quality rating.\n\nUse it to see when a language was paused or its quality dropped, rather\nthan polling\n[Get a WhatsApp template](/docs/api/reference/get-whatsapp-template).\nChanges Bird makes, such as submitting a language for review or deleting\nit at your request, are not listed. A Bird-managed template has no\nhistory and returns an empty page. A template that does not belong to the\nworkspace, or no longer exists, returns `404`.\n","tags":["whatsapp-templates"],"x-audiences":["public","dashboard","command"],"x-snippet-key":"whatsapp.templates.list_events","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"language","in":"query","required":false,"description":"Return only this language's events. A BCP-47 tag; case and separator differences are accepted and normalized.","schema":{"$ref":"#/components/schemas/LanguageTag"},"example":"en-US"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of template events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateEventList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/templates/{template_ref}/duplicate":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"Template ID (`wat_` prefix) or slug. A value that parses as a valid ID resolves by ID; any other value resolves as a slug.\n","schema":{"type":"string","minLength":1,"maxLength":63},"example":"bird_otp"}],"post":{"operationId":"duplicateWhatsAppTemplate","x-snippet-key":"whatsapp.templates.duplicate","summary":"Duplicate a message template","description":"Copies a template into a new one holding the source's current content as an open draft. It is how a built-in template is forked into something a workspace can edit, and how an approved template becomes the basis of a variant. The copy calls Meta zero times: it is a draft you submit when ready.\n","tags":["whatsapp-templates"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateDuplicate"}}}},"responses":{"201":{"description":"The copy.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/templates/{template_ref}/versions/{version_id}":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"Template ID (`wat_` prefix) or slug. A value that parses as a valid ID resolves by ID; any other value resolves as a slug.\n","schema":{"type":"string","minLength":1,"maxLength":63},"example":"bird_otp"},{"name":"version_id","in":"path","required":true,"description":"ID of the template version (`wav_` prefix), as returned by the version list.","schema":{"$ref":"#/components/schemas/WhatsAppTemplateVersionID"}}],"get":{"operationId":"getWhatsAppTemplateVersion","x-snippet-key":"whatsapp.templates.versions.get","summary":"Get a template version","description":"Returns one version: the content of every language it holds and what its submission did with each.\n","tags":["whatsapp-templates"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"responses":{"200":{"description":"The requested version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateVersion"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["attio","cli","mcp","sdk"]},"delete":{"operationId":"deleteWhatsAppTemplateVersion","x-snippet-key":"whatsapp.templates.versions.delete","summary":"Delete a template's open draft","description":"Deletes the draft and leaves the template without an open draft. Use [Create a template draft](/docs/api/reference/create-whatsapp-template-draft) to create another. Deleting a draft does not change the version used for sends, and submitted versions are immutable.\n\nThe email channel has an operation of the same name and shape that behaves differently: there, the draft's content resets to what is published and the draft itself remains. On WhatsApp the draft is gone until a new one is opened.\n","tags":["whatsapp-templates"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The draft was discarded."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/templates/{template_ref}/versions/{version_id}/submit":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"Template ID (`wat_` prefix) or slug. A value that parses as a valid ID resolves by ID; any other value resolves as a slug.\n","schema":{"type":"string","minLength":1,"maxLength":63},"example":"bird_otp"},{"name":"version_id","in":"path","required":true,"description":"ID of the template version (`wav_` prefix), as returned by the version list.","schema":{"$ref":"#/components/schemas/WhatsAppTemplateVersionID"}}],"post":{"operationId":"submitWhatsAppTemplateVersion","x-snippet-key":"whatsapp.templates.versions.submit","summary":"Submit a template version for review","description":"Validates the template draft before freezing it. If validation fails, the\nAPI returns `200 OK` with every problem across all languages and creates no\nversion. If validation passes, the API freezes an immutable version and\nreturns `202 Accepted`. Only the languages whose content differs from their\napproved copy are sent to Meta and marked `pending`; the rest carry their\nexisting verdict forward untouched, so a version whose languages are all\nunchanged comes back already settled. A language an earlier version carried\nbut the draft dropped is deleted at Meta in the background. It is absent\nfrom the new version, so it has no `pending` state. The version becomes live when any\nlanguage is approved, and no replacement draft opens automatically.\n\nSet `validate_only: true` to run the same checks without freezing or\nsubmitting a version. Local validation cannot predict Meta's decision. A\n`202 Accepted` response confirms the version was frozen and accepted. Poll the\nversion or the template's `pending_version_id` for the verdicts on whichever\nlanguages it marked `pending`.\n","tags":["whatsapp-templates"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateSubmit"}}}},"responses":{"200":{"description":"The check's outcome, or a submit that found problems and froze nothing.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateSubmitResult"}}}},"202":{"description":"The frozen version. Languages whose content changed are `pending`; the rest keep their verdict.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateSubmitResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/templates/{template_ref}/versions/{version_id}/languages":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"Template ID (`wat_` prefix) or slug. A value that parses as a valid ID resolves by ID; any other value resolves as a slug.\n","schema":{"type":"string","minLength":1,"maxLength":63},"example":"bird_otp"},{"name":"version_id","in":"path","required":true,"description":"ID of the template version (`wav_` prefix), as returned by the version list.","schema":{"$ref":"#/components/schemas/WhatsAppTemplateVersionID"}}],"get":{"operationId":"listWhatsAppTemplateVersionLanguages","x-snippet-key":"whatsapp.templates.versions.languages.list","summary":"List a version's languages","description":"Returns every language a version holds, without content: each language's tag, what this version's submission did with it, its write counter, and a hash over its content. Compare the hashes to tell which languages actually differ before fetching any content. Fetch [a single language](/docs/api/reference/get-whatsapp-template-version-language) for its content blocks.\n","tags":["whatsapp-templates"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"responses":{"200":{"description":"The version's languages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateLanguageList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/templates/{template_ref}/versions/{version_id}/languages/{language}":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"Template ID (`wat_` prefix) or slug. A value that parses as a valid ID resolves by ID; any other value resolves as a slug.\n","schema":{"type":"string","minLength":1,"maxLength":63},"example":"bird_otp"},{"name":"version_id","in":"path","required":true,"description":"ID of the template version (`wav_` prefix), as returned by the version list.","schema":{"$ref":"#/components/schemas/WhatsAppTemplateVersionID"}},{"name":"language","in":"path","required":true,"description":"The language, as a BCP-47 tag. Case and separator variance is accepted and normalised, and the canonical form is returned.\n","schema":{"$ref":"#/components/schemas/LanguageTag"},"example":"nl-BE"}],"get":{"operationId":"getWhatsAppTemplateVersionLanguage","x-snippet-key":"whatsapp.templates.versions.languages.get","summary":"Get a version's language","description":"Returns one language of one version: its content blocks, what this version's submission did with it, and everything Meta holds about it: review outcome and category.\n","tags":["whatsapp-templates"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"responses":{"200":{"description":"The requested language.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateLanguage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"put":{"operationId":"upsertWhatsAppTemplateLanguage","x-snippet-key":"whatsapp.templates.versions.languages.set","summary":"Upsert a language's content","description":"Writes one language of the template's draft, creating it when absent (`201`) and replacing it when present (`200`). A full replacement, so send the language's complete content every time. `optimization_spec` and `message_send_ttl_seconds` are the exceptions: omitting either keeps its current value, and a language created without them uses Meta's standard rate and Meta's default time-to-live. Only the draft is writable: submitted versions are immutable, and a language under active review at Meta refuses the write until that review finishes. Pass `revision` to make the write a compare-and-set against the copy you read. Tags are canonicalised, and the response echoes the canonical form: use it in later calls for this language.\n","tags":["whatsapp-templates"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateLanguageUpsert"},"example":{"optimization_spec":{"bid_amount":5000,"bid_strategy":"lowest_cost_with_bid_cap"},"message_send_ttl_seconds":86400,"revision":4,"components":[{"type":"body","text":"Hello"}]}}}},"responses":{"200":{"description":"The language was replaced.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateLanguageSaved"}}}},"201":{"description":"The language was created.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateLanguageSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteWhatsAppTemplateLanguage","x-snippet-key":"whatsapp.templates.versions.languages.delete","summary":"Delete a language from the draft","description":"Removes one language from the template's draft. The template's default language cannot be removed, and a language under active review at Meta refuses removal until that review finishes. Meta is not told until the draft is submitted, and the version a send resolves is unaffected until then.\n","tags":["whatsapp-templates"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The language was removed from the draft."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/templates/{template_ref}/versions/{version_id}/languages/{language}/discard":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template: its id (`wat_…`) or its slug. A value that parses as a `wat_` id is treated as one; anything else is a slug. Slugs on this channel can spell a typed id, so the two are told apart by parsing the value rather than by its character set.\n","schema":{"type":"string","minLength":1,"maxLength":63},"example":"bird_otp"},{"name":"version_id","in":"path","required":true,"description":"Version ID.","schema":{"$ref":"#/components/schemas/WhatsAppTemplateVersionID"}},{"name":"language","in":"path","required":true,"description":"The language, as a BCP-47 tag. Case and separator variance is accepted and normalised, and the canonical form is returned.\n","schema":{"$ref":"#/components/schemas/LanguageTag"},"example":"nl-BE"}],"post":{"operationId":"discardWhatsAppTemplateLanguageEdits","x-snippet-key":"whatsapp.templates.versions.languages.discard","summary":"Discard a language's draft edits back to its submitted copy","description":"Restores one language of the template's draft to the copy the draft was branched from, discarding the edits made to it since. Only that language moves: every other language in the draft is left alone, which is what discarding the whole draft does not give you. A language the draft added, and a template that has never been submitted, have nothing to restore and are refused. Pass `revision` to make the discard a compare-and-set against the copy you read; omit it and the discard is last-write-wins, the same rule this language's `PUT` follows. Nothing reaches WhatsApp until the draft is submitted.\n","tags":["whatsapp-templates"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateLanguageDiscard"}}}},"responses":{"200":{"description":"The language was restored to the copy the draft was branched from.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateLanguageSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/stats/summary":{"get":{"operationId":"getWhatsAppStatsSummary","x-snippet-key":"whatsapp.stats.summary","summary":"Get aggregate outbound WhatsApp statistics","description":"Returns one aggregate row for the requested period. It includes WhatsApp lifecycle counts, delivery and failure rates, and processing, delivery, and total latency percentiles (`p50`, `p95`, and `p99`). Rows use send-time attribution, so recent periods can under-report `delivered` while delivery reports arrive.\n\nRate fields are `null` when their denominator is zero. `from` and `to` must both be calendar days or RFC 3339 instants. Day windows cover up to 365 whole days. Instant bounds round down to the hour, remain inclusive, and may span up to 720 hours. Mixing the forms returns `422`. Set `timezone` for local boundaries.\n\nSet one dimension filter at most; more than one returns `422`. Use `compare=previous_period` to include the preceding equal-length window and each metric's change.\n","tags":["whatsapp-stats"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window: a calendar day (YYYY-MM-DD) or an RFC 3339 instant rounded down to the hour. The `timezone` parameter makes a calendar day local and rounds an instant down to the local hour. Omit `timezone` to use UTC. When `timezone` is set, a numeric UTC offset such as `+05:45` is rejected; use a calendar day or a `Z` (UTC) instant. This value must use the same form as `to`. When omitted, it defaults to 30 days before `to` for day windows or 168 hours (7 days) before `to` for hour windows.\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window: a calendar day (YYYY-MM-DD) or an RFC 3339 instant rounded down to the hour. The `timezone` parameter makes a calendar day local and rounds an instant down to the local hour. Omit `timezone` to use UTC. When `timezone` is set, a numeric UTC offset is rejected; use a calendar day or a `Z` (UTC) instant. This value must use the same form as `from`. When omitted, it defaults to today for day windows or the current hour for hour windows in that timezone. Day windows may not exceed 365 days; hour windows may not exceed 720 hours (30 days).\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"$ref":"#/components/parameters/WhatsAppStatsTemplateFilter"},{"name":"category","in":"query","required":false,"description":"Restrict the statistics to a single message category; `service` selects free-form messages. Mutually exclusive with the other dimension filters (`template`, `phone_number`, `tag`); only one may be set per request. Matches the `category` key on a row of the per-category breakdown.\n","schema":{"$ref":"#/components/schemas/WhatsAppStatsMessageCategory"}},{"name":"phone_number","in":"query","required":false,"description":"Restrict the statistics to a single business sender phone number, in E.164 form. Mutually exclusive with the other dimension filters (`template`, `category`, `tag`); only one may be set per request. Matches the `phone_number` key on a row of the per-phone-number breakdown.\n","schema":{"type":"string","minLength":1,"pattern":"^\\+[1-9]\\d{1,14}$","example":"+13124495569"}},{"name":"tag","in":"query","required":false,"description":"Restrict the statistics to a single tag. Use `name` to match any value of a tag, or `name:value` for a specific pair (for example `campaign:spring_launch`). Mutually exclusive with the other dimension filters (`template`, `category`, `phone_number`); only one may be set per request. A row of the per-tag breakdown carries the same pair in its single `tag` key.\n","schema":{"type":"string","minLength":1,"example":"campaign:spring_launch"}},{"name":"compare","in":"query","required":false,"description":"Set to `previous_period` to also include the same statistics for the immediately preceding window of equal length, plus the change between the two, so you can show \"+X% vs last period\" without a second request. The comparison window carries any dimension filter set on the request, so a filtered comparison compares like with like.\n","schema":{"$ref":"#/components/schemas/StatsComparePeriod"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Aggregate summary for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppStatsSummary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/stats/daily":{"get":{"operationId":"getWhatsAppStatsDaily","x-snippet-key":"whatsapp.stats.daily","summary":"Get daily outbound WhatsApp statistics","description":"Returns one row of aggregate WhatsApp statistics per calendar day for the workspace. Rows use send-time attribution, so a delivery confirmation received on Wednesday for a message accepted the prior Monday is counted in Monday's row. Recent rows can under-report `delivered` while delivery reports arrive. Days with no activity are included with zero counts.\n\nEach row carries lifecycle counts (accepted, sent, delivered, read, failed) and its own latency percentiles; delivery, failure, and read rates are whole-window aggregates available from the summary endpoint instead. `from` and `to` are optional calendar days (YYYY-MM-DD), defaulting to the trailing 30 days. The maximum window is 365 days; a longer range returns `422`. Set `timezone` to report rows by your local calendar day.\n\nSet at most one dimension filter (`template`, `category`, `phone_number`, `tag`) to restrict the statistics to that dimension's value; setting more than one returns 422.\n","tags":["whatsapp-stats"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). The window may not exceed 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). The window may not exceed 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"$ref":"#/components/parameters/WhatsAppStatsTemplateFilter"},{"name":"category","in":"query","required":false,"description":"Restrict the statistics to a single message category; `service` selects free-form messages. Mutually exclusive with the other dimension filters (`template`, `phone_number`, `tag`); only one may be set per request. Matches the `category` key on a row of the per-category breakdown.\n","schema":{"$ref":"#/components/schemas/WhatsAppStatsMessageCategory"}},{"name":"phone_number","in":"query","required":false,"description":"Restrict the statistics to a single business sender phone number, in E.164 form. Mutually exclusive with the other dimension filters (`template`, `category`, `tag`); only one may be set per request. Matches the `phone_number` key on a row of the per-phone-number breakdown.\n","schema":{"type":"string","minLength":1,"pattern":"^\\+[1-9]\\d{1,14}$","example":"+13124495569"}},{"name":"tag","in":"query","required":false,"description":"Restrict the statistics to a single tag. Use `name` to match any value of a tag, or `name:value` for a specific pair (for example `campaign:spring_launch`). Mutually exclusive with the other dimension filters (`template`, `category`, `phone_number`); only one may be set per request. A row of the per-tag breakdown carries the same pair in its single `tag` key.\n","schema":{"type":"string","minLength":1,"example":"campaign:spring_launch"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Daily aggregate stats for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppStatsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/stats/hourly":{"get":{"operationId":"getWhatsAppStatsHourly","x-snippet-key":"whatsapp.stats.hourly","summary":"Get hourly outbound WhatsApp statistics","description":"Returns one row of WhatsApp lifecycle counts per hour. Rows use send-time attribution, so a delivery confirmation is counted in the hour when its message was accepted. Recent rows can under-report `delivered` while delivery reports arrive. Set `timezone` for local hours instead of UTC, including zones with sub-hour offsets.\n\nEach row includes its own latency percentiles; delivery, failure, and read rates are whole-window aggregates available from the summary endpoint instead. `from` and `to` are optional RFC 3339 instants, defaulting to the trailing 168 hours; each bound rounds down to the hour and remains inclusive. A request may span up to 30 days (720 rows). An excessive or reversed window returns `422`.\n\nSet one dimension filter at most; more than one returns `422`.\n","tags":["whatsapp-stats"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start of the window (RFC 3339 instant), rounded down to the start of its hour and included. The boundary uses the local hour when `timezone` is set and the UTC hour otherwise. The window may not exceed 30 days (720 hours). Defaults to 168 hours (7 days) before `to` when omitted.","schema":{"type":"string","format":"date-time","minLength":1,"example":"2026-05-25T00:00:00Z"}},{"name":"to","in":"query","required":false,"description":"End of the window (RFC 3339 instant), rounded down to the start of its hour and included. The boundary uses the local hour when `timezone` is set and the UTC hour otherwise, so both bounds are inclusive. The window may not exceed 30 days (720 hours). Defaults to the current hour when omitted.","schema":{"type":"string","format":"date-time","minLength":1,"example":"2026-05-25T23:59:59Z"}},{"$ref":"#/components/parameters/StatsTimezone"},{"$ref":"#/components/parameters/WhatsAppStatsTemplateFilter"},{"name":"category","in":"query","required":false,"description":"Restrict the statistics to a single message category; `service` selects free-form messages. Mutually exclusive with the other dimension filters (`template`, `phone_number`, `tag`); only one may be set per request. Matches the `category` key on a row of the per-category breakdown.\n","schema":{"$ref":"#/components/schemas/WhatsAppStatsMessageCategory"}},{"name":"phone_number","in":"query","required":false,"description":"Restrict the statistics to a single business sender phone number, in E.164 form. Mutually exclusive with the other dimension filters (`template`, `category`, `tag`); only one may be set per request. Matches the `phone_number` key on a row of the per-phone-number breakdown.\n","schema":{"type":"string","minLength":1,"pattern":"^\\+[1-9]\\d{1,14}$","example":"+13124495569"}},{"name":"tag","in":"query","required":false,"description":"Restrict the statistics to a single tag. Use `name` to match any value of a tag, or `name:value` for a specific pair (for example `campaign:spring_launch`). Mutually exclusive with the other dimension filters (`template`, `category`, `phone_number`); only one may be set per request. A row of the per-tag breakdown carries the same pair in its single `tag` key.\n","schema":{"type":"string","minLength":1,"example":"campaign:spring_launch"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Hourly aggregate stats for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppStatsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/stats/error-codes":{"get":{"operationId":"getWhatsAppStatsByErrorCode","x-snippet-key":"whatsapp.stats.by_error_code","summary":"Get outbound WhatsApp statistics by error code","description":"Returns the count of failed WhatsApp messages grouped by normalized failure reason for the requested period. Rows are ranked by failure count descending and capped at the requested `limit` (default 50, max 200). Rows use send-time attribution, so a failure reported during the period for a message accepted earlier counts against the earlier period. A recent period therefore under-reports failures while reports are still arriving, and its counts grow as they land. The maximum window is 365 days; a longer range returns 422. A breakdown is already a single-dimension view and takes no dimension filter; to restrict statistics to a single template, category, phone number or tag, use the summary, daily or hourly statistics instead.\n","tags":["whatsapp-stats"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Must not be after `to`. Max window 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-06-14"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Max window 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-07-13"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum number of error-code rows to return, ranked by failure count descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-error-code failure breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppStatsByErrorCodeResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/stats/templates":{"get":{"operationId":"getWhatsAppStatsByTemplate","x-snippet-key":"whatsapp.stats.by_template","summary":"Get outbound WhatsApp statistics by template","description":"Returns lifecycle counts and delivery rates for WhatsApp messages grouped by the template they were sent from, for the requested period. Rows are keyed by `template_id`, matching the email template breakdown, so a renamed template stays one row. Rows are ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200). Rows use send-time attribution. A delivery confirmed during the period for a message accepted earlier counts against the earlier period. A recent period therefore under-reports `delivered` while delivery reports are still arriving, and its counts grow as reports arrive. The maximum window is 365 days; a longer range returns 422. A breakdown is already a single-dimension view and takes no dimension filter; to restrict statistics to a single template, category, phone number or tag, use the summary, daily or hourly statistics instead. For the coarser split across Meta's marketing, utility, and authentication categories, use the template-categories breakdown instead. Each row also carries the same three latency families as the summary: `processing`, `delivery` and `total`. `delivery` is measured from a best-effort handoff timestamp that a fast delivery callback can beat, so it can be absent for a row whose other two families are present.\n","tags":["whatsapp-stats"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Must not be after `to`. Max window 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-06-14"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Max window 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-07-13"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum number of template rows to return, ranked by accepted volume descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-template breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppStatsByTemplateResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/stats/template-categories":{"get":{"operationId":"getWhatsAppStatsByTemplateCategory","x-snippet-key":"whatsapp.stats.by_template_category","summary":"Get outbound WhatsApp statistics by message category","description":"Returns lifecycle counts and delivery rates for WhatsApp messages grouped by message category for the requested period. A template send takes its template's category; a free-form send counts as `service`. Rows are ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200). Rows use send-time attribution. A delivery confirmed during the period for a message accepted earlier counts against the earlier period. A recent period therefore under-reports `delivered` while delivery reports are still arriving, and its counts grow as reports arrive. The maximum window is 365 days; a longer range returns 422. A breakdown is already a single-dimension view and takes no dimension filter; to restrict statistics to a single template, category, phone number or tag, use the summary, daily or hourly statistics instead. Each row also carries the same three latency families as the summary: `processing`, `delivery` and `total`. `delivery` is measured from a best-effort handoff timestamp that a fast delivery callback can beat, so it can be absent for a row whose other two families are present.\n","tags":["whatsapp-stats"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Must not be after `to`. Max window 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-06-14"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Max window 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-07-13"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum number of message-category rows to return, ranked by accepted volume descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-message-category breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppStatsByTemplateCategoryResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/stats/tags":{"get":{"operationId":"getWhatsAppStatsByTag","x-snippet-key":"whatsapp.stats.by_tag","summary":"Get outbound WhatsApp statistics by tag","description":"Returns lifecycle counts and delivery rates for WhatsApp messages grouped by tag (`name:value`) for the requested period. Rows are ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200). Rows use send-time attribution. A delivery confirmed during the period for a message accepted earlier counts against the earlier period. A recent period therefore under-reports `delivered` while delivery reports are still arriving, and its counts grow as reports arrive. The maximum window is 365 days; a longer range returns 422. A breakdown is already a single-dimension view and takes no dimension filter; to restrict statistics to a single template, category, phone number or tag, use the summary, daily or hourly statistics instead. Each row also carries the same three latency families as the summary: `processing`, `delivery` and `total`. `delivery` is measured from a best-effort handoff timestamp that a fast delivery callback can beat, so it can be absent for a row whose other two families are present.\n","tags":["whatsapp-stats"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Must not be after `to`. Max window 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-06-14"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Max window 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-07-13"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum number of tag rows to return, ranked by accepted volume descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-tag breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppStatsByTagResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/stats/phone-numbers":{"get":{"operationId":"getWhatsAppStatsByPhoneNumber","x-snippet-key":"whatsapp.stats.by_phone_number","summary":"Get outbound WhatsApp statistics by phone number","description":"Returns delivery counts grouped by business phone number, including whether each is platform-managed or customer-owned. Rows use send-time attribution, rank by accepted volume, and are capped by `limit` (default 50, maximum 200). A recent period under-reports `delivered` while delivery reports are still arriving. The maximum window is 365 days; a longer range returns `422`. A breakdown is already a single-dimension view and takes no dimension filter; to restrict statistics to a single template, category, phone number or tag, use the summary, daily or hourly statistics instead. Each row also carries the same three latency families as the summary: `processing`, `delivery` and `total`. `delivery` is measured from a best-effort handoff timestamp that a fast delivery callback can beat, so it can be absent for a row whose other two families are present.\n","tags":["whatsapp-stats"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Must not be after `to`. Max window 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-06-14"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Max window 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-07-13"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum number of phone-number rows to return, ranked by accepted volume descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-phone-number breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppStatsByPhoneNumberResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/stats/countries":{"get":{"operationId":"getWhatsAppStatsByCountry","x-snippet-key":"whatsapp.stats.by_country","summary":"Get outbound WhatsApp statistics by country","description":"Returns delivery counts, read engagement and latency grouped by the recipient's destination\ncountry. Rows use send-time attribution, rank by accepted volume, and are capped by `limit`\n(default 50, maximum 200). A recent period under-reports `delivered` while delivery reports\nare still arriving. The maximum window is 365 days; a longer range returns `422`.\n\nA country row covers messages addressed to a single recipient. A recipient whose country\ncannot be resolved (a number shaped like a phone number that belongs to no country, or a\nnon-geographic range such as freephone) is counted under `ZZ` rather than dropped,\nmatching the SMS country breakdown. Group sends are omitted entirely: one spans\nup to eight recipients in as many countries, so no single destination country describes\nit. These rows therefore sum to the summary less that group volume. A window reaching before this\nbreakdown shipped falls short by more than that: history was seeded only where the\nrecipient's country could be recovered from stored data, so a phone-addressed send\naccepted before the cutover has no `accepted` leg here. Two cases follow, and they read\ndifferently. Acceptance days more than 14 days before the cutover are a plain shortfall\nand never change. In the 14 days immediately before it, a `delivered`, `read` or `failed`\ncallback arriving after the cutover does carry a country and is attributed to its original\nacceptance day, so a row there can report deliveries with `accepted` at zero. Its\n`delivery_rate` and `failure_rate` are then null for want of a denominator while\n`read_rate` still computes and looks healthy. The 14 days are the status recording window,\nafter which a callback is dropped. All of this is confined to pre-cutover acceptance days\nand gone once the requested window starts after the cutover date.\n\nLatency reports the same three families as the summary: `processing`, `delivery` and\n`total`. The delivery family depends on a best-effort handoff timestamp that a fast\ndelivery callback can beat, so it can be absent for a country whose other two families\nare present.\n\nA breakdown is already a single-dimension view and takes no dimension filter; to restrict\nstatistics to a single template, category, phone number or tag, use the summary, daily or\nhourly statistics instead.\n","tags":["whatsapp-stats"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Must not be after `to`. Max window 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-08-09"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Max window 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-09-08"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum number of country rows to return, ranked by accepted volume descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-country breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppStatsByCountryResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/stats/inbound/summary":{"get":{"operationId":"getWhatsAppInboundStatsSummary","x-snippet-key":"whatsapp.stats.inbound.summary","summary":"Get aggregate inbound WhatsApp statistics","description":"Returns the total number of WhatsApp messages your business numbers received over the period, using the time each message reached your number.\n\nThe response contains only a count because a received message has one state. Use the send statistics endpoints for delivery rates and latency data about messages you send.\n\nThe maximum window is 365 days for a day-grain range, or 720 hours for an hour-grain range; a longer range returns 422. Set `timezone` to resolve the period against your local calendar instead of UTC.\n","tags":["whatsapp-stats"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, either a calendar day (YYYY-MM-DD) or an RFC 3339 instant rounded down to the hour. The form you use selects the grain the total is resolved at. Interpreted in `timezone`, or in UTC when `timezone` is omitted. Must use the same form as `to`. A numeric UTC offset (for example `+05:45`) is rejected when `timezone` is set; pass a calendar day or a `Z` instant instead. Defaults to 30 days before `to` for day windows, or 168 hours before `to` for hour windows.\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, in the same form as `from`. Defaults to today, or the current hour for an hour window. A day window may not exceed 365 days and an hour window 720 hours.\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"compare","in":"query","required":false,"description":"Set to `previous_period` to include the received-message count for the immediately preceding window of equal length. The response also includes the change between the two, so you can show \"+X% vs last period\" without a second request.\n","schema":{"$ref":"#/components/schemas/StatsComparePeriod"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Total received messages for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppInboundStatsSummaryResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/stats/inbound/daily":{"get":{"operationId":"getWhatsAppInboundStatsDaily","x-snippet-key":"whatsapp.stats.inbound.daily","summary":"Get daily inbound WhatsApp statistics","description":"Returns the number of WhatsApp messages your business numbers received, one row per calendar day. Rows use the time each message reached your number, and days with no messages contain a zero count.\n\nEach row contains only a count because a received message has one state. Use the send statistics endpoints for lifecycle and delivery-latency data about messages you send.\n\n`from` and `to` are optional calendar days (YYYY-MM-DD), defaulting to the trailing 30 days. The maximum window is 365 days; requesting a longer range returns 422. Set `timezone` to bucket rows by your local calendar day instead of UTC.\n","tags":["whatsapp-stats"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). The window may not exceed 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). The window may not exceed 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Daily received-message counts for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppInboundStatsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/stats/inbound/hourly":{"get":{"operationId":"getWhatsAppInboundStatsHourly","x-snippet-key":"whatsapp.stats.inbound.hourly","summary":"Get hourly inbound WhatsApp statistics","description":"Returns the number of WhatsApp messages your business numbers received, one row per hour. Rows use the time each message reached your number, in UTC by default or local time when you set `timezone`. Hours with no messages contain a zero count.\n\nEach row contains only a count because a received message has one state. Use the send statistics endpoints for lifecycle and delivery-latency data about messages you send.\n\n`from` and `to` are optional RFC 3339 instants defaulting to the trailing 168 hours, rounded down to the enclosing hour and echoed back in `period`, both bounds inclusive. A single request may span at most 30 days (720 hourly rows); for longer ranges use the daily endpoint. Requesting an hourly window longer than 30 days, or a `from` after `to`, returns 422.\n","tags":["whatsapp-stats"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start of the window (RFC 3339 instant). Rounded down to the start of its hour (the local hour when `timezone` is set, otherwise the UTC hour), and that hour is included. The window may not exceed 30 days (720 hours). Defaults to 168 hours (7 days) before `to` when omitted.","schema":{"type":"string","format":"date-time","minLength":1,"example":"2026-05-25T00:00:00Z"}},{"name":"to","in":"query","required":false,"description":"End of the window (RFC 3339 instant). Rounded down to the start of its hour (the local hour when `timezone` is set, otherwise the UTC hour), and that hour is included (both bounds inclusive). The window may not exceed 30 days (720 hours). Defaults to the current hour when omitted.","schema":{"type":"string","format":"date-time","minLength":1,"example":"2026-05-25T23:59:59Z"}},{"$ref":"#/components/parameters/StatsTimezone"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Hourly received-message counts for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppInboundStatsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/stats/inbound/phone-numbers":{"get":{"operationId":"getWhatsAppInboundStatsByPhoneNumber","x-snippet-key":"whatsapp.stats.inbound.by_phone_number","summary":"Get inbound WhatsApp statistics by phone number","description":"Returns how many WhatsApp messages each of your business phone numbers received. Rows are ranked by volume descending and capped at the requested `limit` (default 50, max 200), counted by the time each message reached the number.\n\nEach row contains only a count because a received message has one state. Lifecycle and delivery-latency data do not apply to received messages.\n\nThe maximum window is 365 days; a longer range returns 422. Set `timezone` to resolve the period against your local calendar instead of UTC.\n","tags":["whatsapp-stats"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Must not be after `to`. Max window 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-06-14"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Max window 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-07-13"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum number of phone-number rows to return, ranked by received-message volume descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-phone-number breakdown of received messages for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppInboundStatsByPhoneNumberResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/agents/notifications":{"get":{"operationId":"listWhatsAppAgentNotifications","x-snippet-key":"whatsapp.agents.notifications.list","summary":"List the notifications sent to your agents","description":"Returns the notifications you have sent your agents, newest first, each with what came of it. Filter by `from` for the agent on one business number, by `status` to find the ones the agent skipped or WhatsApp refused, or by `to` to follow one contact. A notification still in flight to WhatsApp is not listed yet.\n\nPage through the full set with the response cursors.\n","tags":["whatsapp-agent-notifications"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"status","in":"query","required":false,"description":"Return only notifications in this state.","schema":{"$ref":"#/components/schemas/WhatsAppAgentNotificationStatus"}},{"name":"from","in":"query","required":false,"description":"Return only notifications sent to the agent on this business number, in E.164 format. A phone number is normalized before matching, so spacing does not matter.","schema":{"type":"string","minLength":1,"example":"+13124495648"}},{"name":"to","in":"query","required":false,"description":"Return only notifications about this contact, a phone number in E.164 format or a business-scoped user ID. A phone number is normalized before matching, so spacing does not matter.","schema":{"type":"string","minLength":1,"example":"+14155551234"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of the notifications sent to your agents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppAgentNotificationList"},"example":{"data":[{"id":"waan_01krdgeqcxet5s7t44vh8rt9m7","from":"+13124495648","to":"+14155551234","name":"order_shipped","description":"Order 88213 left the warehouse and arrives on Thursday.","payload":"{\"order_id\":\"88213\",\"carrier\":\"ACME Courier\",\"eta\":\"2026-10-02\"}","status":"skipped","skipped_reason":"The contact's conversation is currently held by the business.","created_at":"2026-10-01T08:00:00Z"},{"id":"waan_01krdgeqcxet5s7t44vh8rt9m6","from":"+13124495648","to":"+14155559876","name":"payment_received","description":"Payment of $42.00 for order 88190 was received.","payload":"{\"order_id\":\"88190\",\"amount\":\"42.00\",\"currency\":\"USD\"}","status":"success","created_at":"2026-10-01T07:30:00Z"}],"next_cursor":null,"prev_cursor":null,"refresh_cursor":"eyJ2IjoxLCJzIjoiXCIyMDI2LTEwLTAxVDA4OjAwOjAwWlwiIiwiaSI6IndhYW5fMDFrcmRnZXFjeGV0NXM3dDQ0dmg4cnQ5bTcifQ"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createWhatsAppAgentNotification","x-snippet-key":"whatsapp.agents.notifications.create","summary":"Send an agent a notification","description":"Tells the agent on the `from` business number that something happened in your systems for one contact, such as a payment landing, an order shipping or an identity check passing. The agent decides whether and how to tell the contact, drawing on `description` and `payload`, and may write to them without waiting for their next message.\n\nBird takes the notification, hands it to WhatsApp in the background and keeps asking WhatsApp what became of it, so this answers `202` with the notification as you sent it at `status: accepted`. A read in the first moments after the `202` can answer `404` while the hand-off is still in flight. Read it back, or list the notifications, to see it settle: `success` when the agent acted on it, `skipped` with WhatsApp's reason when the agent chose to say nothing, or `failed` with what went wrong. The notification records whether the agent acted on it, not what the agent said to the contact. A `from` number this workspace has not connected returns `422`, one without an agent returns `404`, and one whose agent WhatsApp is still preparing returns `409`.\n","tags":["whatsapp-agent-notifications"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppAgentNotificationCreate"},"example":{"from":"+13124495648","to":"+14155551234","name":"order_shipped","description":"Order 88213 left the warehouse and arrives on Thursday.","payload":"{\"order_id\":\"88213\",\"carrier\":\"ACME Courier\",\"eta\":\"2026-10-02\"}"}}}},"responses":{"202":{"description":"Bird accepted the notification and will hand it to WhatsApp. The notification reads `accepted` until WhatsApp has worked on it.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppAgentNotification"},"example":{"id":"waan_01krdgeqcxet5s7t44vh8rt9m7","from":"+13124495648","to":"+14155551234","name":"order_shipped","description":"Order 88213 left the warehouse and arrives on Thursday.","payload":"{\"order_id\":\"88213\",\"carrier\":\"ACME Courier\",\"eta\":\"2026-10-02\"}","status":"accepted","created_at":"2026-10-01T08:00:00Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/agents/notifications/{notification_id}":{"parameters":[{"name":"notification_id","in":"path","required":true,"description":"ID of the notification (`waan_` prefix), as returned when it was sent.","schema":{"$ref":"#/components/schemas/WhatsAppAgentNotificationID"}}],"get":{"operationId":"getWhatsAppAgentNotification","x-snippet-key":"whatsapp.agents.notifications.get","summary":"Get a notification sent to an agent","description":"Returns one notification you sent the agent, with what came of it: `accepted` while WhatsApp is still working on it, then `success`, `skipped` with WhatsApp's reason, or `failed` with what went wrong. A notification still in flight to WhatsApp is not readable yet, and an id this workspace does not hold returns `404`. A notification stays readable after its agent is deleted.\n","tags":["whatsapp-agent-notifications"],"x-audiences":["public","dashboard","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"responses":{"200":{"description":"The notification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppAgentNotification"},"example":{"id":"waan_01krdgeqcxet5s7t44vh8rt9m7","from":"+13124495648","to":"+14155551234","name":"order_shipped","description":"Order 88213 left the warehouse and arrives on Thursday.","payload":"{\"order_id\":\"88213\",\"carrier\":\"ACME Courier\",\"eta\":\"2026-10-02\"}","status":"skipped","skipped_reason":"The contact's conversation is currently held by the business.","created_at":"2026-10-01T08:00:00Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/numbers":{"get":{"operationId":"listWhatsAppNumbers","x-snippet-key":"whatsapp.numbers.list","summary":"List WhatsApp numbers","description":"Returns a paginated list of the WhatsApp numbers your workspace can send\nfrom. The list includes both platform-managed numbers and numbers on a\nWhatsApp Business Account you connected. Each item reports its WhatsApp\nstatus, quality rating, business portfolio messaging limit, allowed\nsend rate, and Official Business Account status.\n\nPage through the full set with the response cursors. A cursor marks a\nposition in the list, not a filter set. Start again without\n`starting_after` or `ending_before` whenever you change `phone_number`,\n`waba`, `status`, or `scope`, or the new page skips matches before that\nposition.\n","tags":["whatsapp-numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"waba","in":"query","required":false,"description":"Filter to a single WhatsApp Business Account by its Meta-assigned ID. Use the `waba` of a connected WhatsApp Business Account, or the `waba` on a number this list returns. A platform-managed number belongs to no WhatsApp Business Account and is never returned when this is set, so pairing it with `scope=system` always returns an empty page. An account this workspace does not hold returns an empty page.","schema":{"type":"string","minLength":1,"example":"102290129340398"}},{"name":"phone_number","in":"query","required":false,"description":"Filter to a single number. The value is read as an international number and normalized before matching, so `+31612340001`, `+31 6 1234 0001`, `0031612340001` and `31612340001` are the same filter. A value that cannot be normalized is matched exactly as given. A number this workspace cannot send from returns an empty page, rather than being rejected.","schema":{"type":"string","minLength":1,"example":"+31612340001"}},{"name":"status","in":"query","required":false,"description":"Filter by the number's WhatsApp state: the `status` a number in this list carries. Every value matches that status exactly, so repeat the parameter for each state you want. `pending` covers both a number WhatsApp reports as not registered and one it has reported no state for at all, while the two states before that keep their own values: a number we are still verifying carries `preparing`, and one waiting for someone to finish signup carries `awaiting_signup`. Asking for all three reaches every connection that has not finished, plus any finished one WhatsApp has not reported on yet. `failed` matches a connection refused permanently. A value this vocabulary does not recognize matches nothing, rather than being rejected. Omit to return numbers in every state.","style":"form","explode":true,"schema":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/components/schemas/WhatsAppNumberStatus"}}},{"name":"scope","in":"query","required":false,"description":"Filter by ownership tier: `system` for platform-managed numbers and `workspace` for numbers your workspace connected. Omit to return both. A `system` number belongs to no WhatsApp Business Account, so pairing this with `waba` always returns an empty page.","schema":{"$ref":"#/components/schemas/WhatsAppNumberScope"}},{"name":"sort","in":"query","required":false,"description":"Field to sort by.","schema":{"$ref":"#/components/schemas/WhatsAppNumberSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of the WhatsApp numbers your workspace can send from.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppNumberList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["attio","cli","mcp","sdk"]}},"/v1/whatsapp/numbers/{number_id}":{"get":{"operationId":"getWhatsAppNumber","x-snippet-key":"whatsapp.numbers.get","summary":"Get a WhatsApp number","description":"Returns a WhatsApp number connected to the workspace and its state as of `meta_synced_at`. Poll this after completing embedded signup to follow the connection. The reported status can lag send availability by up to one hour.\n\n`pending` is WhatsApp's own token for a number it does not hold as registered, and is also what a number with no stored WhatsApp status reads, including after setup completes. Other WhatsApp states include `connected`, `disconnected`, and `flagged`. A `failed` status means connection setup ended permanently, and `error` says why; a failure still being retried leaves the number `pending` and sets no `error`.\n","tags":["whatsapp-numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"number_id","in":"path","required":true,"description":"ID of the WhatsApp number (`wan_` prefix), as returned by the number list.","schema":{"$ref":"#/components/schemas/WhatsAppNumberID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The WhatsApp number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppNumber"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/numbers/{number_id}/events":{"get":{"operationId":"listWhatsAppNumberEvents","summary":"List WhatsApp number events","description":"Returns the number's activity history, newest first by default:\n\n- The number being added, and every change of its status.\n- A messaging-limit change reported by WhatsApp.\n- A display-name review decision.\n- A quality-rating change, observed when Bird next reads the number.\n\nUse it to see when and why a number's status, limit, name, or quality changed,\nrather than polling [Get a WhatsApp number](/docs/api/reference/get-whatsapp-number).\nA number ID that does not belong to the workspace, or no longer exists,\nreturns `404`.\n","tags":["whatsapp-numbers"],"x-audiences":["public","dashboard","command"],"x-snippet-key":"whatsapp.numbers.list_events","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"number_id","in":"path","required":true,"description":"ID of the WhatsApp number whose events to list.","schema":{"$ref":"#/components/schemas/WhatsAppNumberID"}},{"name":"sort","in":"query","required":false,"description":"Field to sort by. Defaults to `created_at`.","schema":{"$ref":"#/components/schemas/WhatsAppNumberEventSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of number events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppNumberEventList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/numbers/{number_id}/profile":{"get":{"operationId":"getWhatsAppNumberProfile","x-snippet-key":"whatsapp.numbers.profile.get","summary":"Get a WhatsApp number's business profile","description":"Returns the business profile WhatsApp shows to people this number messages, read from WhatsApp on each request rather than from a stored copy. Readable for a number your workspace connected itself and for one Bird operates on your behalf alike, since the profile is what everyone the number messages already sees; only the first can be changed. The response includes the display name WhatsApp shows for this number and the state of its review.\n","tags":["whatsapp-numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"number_id","in":"path","required":true,"description":"ID of the WhatsApp number (`wan_` prefix), as returned by the number list.","schema":{"$ref":"#/components/schemas/WhatsAppNumberID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The number's business profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppNumberProfile"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/business-accounts/{business_account_id}/reconnect":{"post":{"operationId":"restoreAMBBusinessAccount","x-snippet-key":"amb.business_accounts.reconnect","summary":"Reconnect an Apple business account","description":"Restores the local connection. The retained approval and suspension state still determines whether the account can send. Repeated reconnects return the current account.","tags":["amb-business-accounts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"name":"business_account_id","in":"path","required":true,"description":"ID of the Apple Messages for Business record to reconnect, as returned by the business list.","schema":{"$ref":"#/components/schemas/AMBBusinessID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The reconnected business account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBBusinessAccount"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/business-accounts/{business_account_id}/events":{"get":{"operationId":"listAMBBusinessAccountEvents","x-snippet-key":"amb.business_accounts.events.list","summary":"List Apple business account events","description":"Returns account activity with event time, summary and source metadata, newest first by default.","tags":["amb-business-accounts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"name":"business_account_id","in":"path","required":true,"description":"ID of the Apple Messages for Business record, as returned by the business list.","schema":{"$ref":"#/components/schemas/AMBBusinessID"}},{"name":"sort","in":"query","description":"Field to sort by. Possible values: `created_at`. Defaults to `created_at`.","schema":{"$ref":"#/components/schemas/AMBBusinessAccountEventSort"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of business account activity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBBusinessAccountEventList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/business-accounts":{"get":{"operationId":"listAMBBusinessAccounts","x-snippet-key":"amb.business_accounts.list","summary":"List Apple Messages for Business records","description":"Returns a paginated list of your workspace's Apple Messages for Business\nrecords. A workspace can register multiple businesses.\n","tags":["amb-business-accounts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"name":"sort","in":"query","required":false,"description":"Field to sort by. Possible values: `created_at`. Defaults to `created_at`.","schema":{"$ref":"#/components/schemas/AMBBusinessAccountSort"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of your workspace's Apple Messages for Business records.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBBusinessAccountList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createAMBBusinessAccount","x-snippet-key":"amb.business_accounts.create","summary":"Create an Apple Messages for Business record","description":"Creates an Apple Messages for Business record in your workspace. Each\nApple Business ID can belong to only one retained business record in this region.\nDisconnecting an account does not release its identifier.\n\nThe account starts with `status: pending` and no `account_review_status`,\nincluding when you supply `apple_business_id`. Upload the required evidence\nand create a submission to begin review. The account remains pending until\napproved; its submission records review progress.\n","tags":["amb-business-accounts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBBusinessAccountCreate"},"example":{"name":"Acme Retail"}}}},"responses":{"201":{"description":"The created Apple Messages for Business record.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBBusinessAccount"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/business-accounts/{business_account_id}":{"get":{"operationId":"getAMBBusinessAccount","x-snippet-key":"amb.business_accounts.get","summary":"Get an Apple Messages for Business record","description":"Returns your workspace's Apple Messages for Business record, including its current status with Apple.\n","tags":["amb-business-accounts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"name":"business_account_id","in":"path","required":true,"description":"Bird business account ID (abz_) or Apple business UUID. Both resolve within the current workspace.","schema":{"type":"string","minLength":1,"maxLength":64}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The Apple Messages for Business record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBBusinessAccount"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateAMBBusinessAccount","x-snippet-key":"amb.business_accounts.update","summary":"Update an Apple Messages for Business record","description":"Changes your workspace's Apple Messages for Business record. Fields you\nomit are left as they are.\n\nSending `apple_business_id` identifies the draft but does not submit it.\nCreate a submission with all three evidence attachments when the record\nis ready for review.\n","tags":["amb-business-accounts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"name":"business_account_id","in":"path","required":true,"description":"ID of the Apple Messages for Business record, as returned by the business list.","schema":{"$ref":"#/components/schemas/AMBBusinessID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBBusinessAccountUpdate"},"example":{"apple_business_id":"b52d6267-2b62-4f8a-8842-0533d0f1dc07"}}}},"responses":{"200":{"description":"The updated Apple Messages for Business record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBBusinessAccount"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteAMBBusinessAccount","x-snippet-key":"amb.business_accounts.delete","summary":"Disconnect an Apple business account","description":"Stops new and queued sends while retaining the account, Apple UUID, approval, credentials and history. Repeated disconnects succeed without changing history. An already-started send attempt may finish; provider requests cannot be recalled. This is a local Bird connection change, not Apple deregistration.","tags":["amb-business-accounts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"name":"business_account_id","in":"path","required":true,"description":"ID of the Apple Messages for Business record to disconnect, as returned by the business list.","schema":{"$ref":"#/components/schemas/AMBBusinessID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The business account is disconnected."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/business-accounts/{business_account_id}/submissions":{"get":{"operationId":"listAMBBusinessAccountSubmissions","x-snippet-key":"amb.business_accounts.submissions.list","summary":"List Apple Messages for Business submissions","description":"Returns review attempts with frozen evidence for this business, newest first, with fresh private evidence URLs.","tags":["amb-business-accounts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"name":"business_account_id","in":"path","required":true,"description":"ID of the Apple Messages for Business record, as returned by the business list.","schema":{"$ref":"#/components/schemas/AMBBusinessID"}},{"name":"sort","in":"query","description":"Field to sort by. Possible values: `created_at`. Defaults to `created_at`.","schema":{"$ref":"#/components/schemas/AMBBusinessAccountSubmissionSort"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of submission attempts, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBBusinessAccountSubmissionList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createAMBBusinessAccountSubmission","x-snippet-key":"amb.business_accounts.submissions.create","summary":"Submit an Apple Messages for Business business for review","description":"Submits an account for review and queues an automated review of its three evidence attachments. The review can reject the attempt with the changes needed. Otherwise Bird staff review it and relay it to Apple when it is ready. Each submission spends one of the organization's daily automated reviews (`amb_reviews_daily_max`) and one of the account's 10 daily reviews. This does not approve the account.","tags":["amb-business-accounts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"name":"business_account_id","in":"path","required":true,"description":"ID of the Apple Messages for Business record, as returned by the business list.","schema":{"$ref":"#/components/schemas/AMBBusinessID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBBusinessAccountSubmissionCreate"}}}},"responses":{"201":{"description":"The submission with its frozen evidence manifest.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBBusinessAccountSubmission"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/business-account-attachments":{"post":{"operationId":"createAMBBusinessAccountAttachment","summary":"Upload Apple Messages for Business review evidence","description":"Uploads a private PDF or MP4 for a later business submission and returns expiring download and preview links.","tags":["amb-business-accounts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AMBBusinessAccountAttachmentUpload"}}}},"responses":{"200":{"description":"An existing same-content attachment in this workspace, which may already be committed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attachment"}}}},"201":{"description":"The uploaded evidence attachment.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attachment"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-snippet-key":"none","x-surfaces":["cli","mcp"]}},"/v1/amb/business-accounts/{business_account_id}/channel-settings":{"get":{"operationId":"getAMBChannelSettings","x-snippet-key":"amb.business_accounts.settings.get","summary":"Get Apple Messages for Business channel settings","description":"Returns the channel settings for your workspace's Apple Messages for Business record: its entry points, default locale, and the brand name and logo shown on the landing page customers use to connect it.\n","tags":["amb-business-accounts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"name":"business_account_id","in":"path","required":true,"description":"ID of the Apple Messages for Business record, as returned by the business list.","schema":{"$ref":"#/components/schemas/AMBBusinessID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The business's channel settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBChannelSettings"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateAMBChannelSettings","x-snippet-key":"amb.business_accounts.settings.update","summary":"Update Apple Messages for Business channel settings","description":"Changes the channel settings for your workspace's Apple Messages for\nBusiness record. Fields you omit are left as they are, except\n`entry_points`: sending it replaces the entire set, since there is no\nway to add or remove a single entry point without resending the rest.\n","tags":["amb-business-accounts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"name":"business_account_id","in":"path","required":true,"description":"ID of the Apple Messages for Business record, as returned by the business list.","schema":{"$ref":"#/components/schemas/AMBBusinessID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBChannelSettingsUpdate"},"example":{"brand_name":"Acme Retail","default_locale":"en-US","entry_points":[{"id":"website-footer","group":"support","intent":"general-inquiry","body":"Hi, I have a question about my order."}]}}}},"responses":{"200":{"description":"The updated channel settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBChannelSettings"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/routing-rules":{"get":{"operationId":"listAMBRoutingRules","x-snippet-key":"amb.routing_rules.list","summary":"List Apple Messages for Business routing rules","description":"Returns the workspace's Apple Messages for Business routing rules, highest precedence first. Rules run when a conversation is created, when a closed conversation reopens, and when a customer writes to a resolved conversation, matching its group and intent to a queue. A message without a group or intent routes on the conversation's stored values. Later messages while the conversation is open in the inbox retain its queue.\n","tags":["amb-routing-rules"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"name":"business_account_id","in":"query","required":false,"description":"Keep only routing rules belonging to this business. Omit to return rules across all businesses in the workspace.\n","schema":{"$ref":"#/components/schemas/AMBBusinessID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The workspace's routing rules, optionally filtered by business.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBRoutingRuleList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createAMBRoutingRule","x-snippet-key":"amb.routing_rules.create","summary":"Create an Apple Messages for Business routing rule","description":"Creates a routing rule for one of your Apple Messages for Business brands. Set `is_default` to make it the rule that catches a conversation matching nothing else. A business can have only one default rule, and creating a second while one exists returns a `409`.\n","tags":["amb-routing-rules"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBRoutingRuleCreate"},"example":{"business_account_id":"abz_01krdgeqcxet5s7t44vh8rt9mg","match_kind":"intent","match_intent_id":"order_status","queue":"billing","precedence":10,"is_default":false}}}},"responses":{"201":{"description":"Routing rule created.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBRoutingRule"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/routing-rules/{routing_rule_id}":{"parameters":[{"name":"routing_rule_id","in":"path","required":true,"description":"ID of the routing rule to read, update, or delete.","schema":{"$ref":"#/components/schemas/AMBRoutingRuleID"},"example":"arr_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"getAMBRoutingRule","x-snippet-key":"amb.routing_rules.get","summary":"Get an Apple Messages for Business routing rule","description":"Returns a single routing rule by ID, including its `business_account_id`, match condition (`match_kind`, `match_intent_id`, `match_group_id`), target `queue`, `precedence`, and `is_default` status. Returns a `404` if the rule does not exist in the workspace.\n","tags":["amb-routing-rules"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"responses":{"200":{"description":"The requested routing rule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBRoutingRule"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateAMBRoutingRule","x-snippet-key":"amb.routing_rules.update","summary":"Update an Apple Messages for Business routing rule","description":"Changes a routing rule's business, match, queue, precedence, or default status. The match changes as a unit: send `match_kind` with the intent and group ids it requires, as on create. Returns a `409` when the update would leave this rule as the default of a business that already has a different default rule. The change applies to conversations that start or reopen afterwards.\n","tags":["amb-routing-rules"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBRoutingRuleUpdate"},"example":{"precedence":20}}}},"responses":{"200":{"description":"Routing rule updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBRoutingRule"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteAMBRoutingRule","x-snippet-key":"amb.routing_rules.delete","summary":"Delete an Apple Messages for Business routing rule","description":"Deletes a routing rule. A conversation already routed by it keeps its queue; only newly created or reopened conversations stop matching it. Deleting a business's default rule leaves it with none, so unmatched conversations route to an empty queue until you create another.\n","tags":["amb-routing-rules"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Routing rule deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/attachments":{"post":{"operationId":"createAMBAttachment","summary":"Upload an attachment","description":"Uploads a file to Apple for the business account identified by `from`\nand returns an attachment you can send by `attachment_id`. Send the file\nas `multipart/form-data` with `from` and `file`, at most 25,000,000 bytes;\nor supply `from` and an HTTPS `source_url`, which Bird downloads, at most\n99,999,999 bytes, as JSON or as multipart form fields. Bird encrypts and\nuploads the file to Apple before it responds.\n\nThe name is `name`, else the uploaded filename, else the last segment of\nthe `source_url` path. The media type is `mime_type`, else the declared\ntype of the uploaded file part, else the type Bird detects from the\ncontents.\n\nEach request uploads a new attachment, even for a file you uploaded\nbefore; retry with the same `Idempotency-Key` to receive the first\nresult. `expires_at` is Bird's estimate of when Apple stops holding the\nattachment, 30 days after the upload or the last message that used it.\nAn unknown `from` returns `404`; a disconnected business account\nreturns `422`.\n","tags":["amb-messages"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/RequiredIdempotencyKey"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBAttachmentUploadFromURL"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AMBAttachmentUpload"}}}},"responses":{"201":{"description":"The uploaded attachment.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBAttachment"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp"]}},"/v1/amb/attachments/{attachment_id}":{"get":{"operationId":"getAMBAttachment","summary":"Get an attachment","description":"Returns the metadata of an attachment by its `aat_` ID. `origin` says\nwhether a customer sent it, you sent it, or you uploaded it; a message\nattachment carries its `message_id`. `expires_at` is Bird's estimate of\nwhen Apple stops holding the attachment. A send within 24 hours of\n`expires_at` is refused. An unknown ID returns `404`.\n","tags":["amb-messages"],"x-audiences":["dashboard","public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"name":"attachment_id","in":"path","required":true,"description":"Attachment identifier. Starts with `aat_`.","schema":{"$ref":"#/components/schemas/AMBAttachmentID"}},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The attachment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBAttachment"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp"]}},"/v1/amb/attachments/{attachment_id}/content":{"get":{"operationId":"getAMBAttachmentContent","summary":"Download an attachment","description":"Downloads an attachment by its `aat_` ID and returns its decrypted\nbytes with the media type the attachment declares. Bird checks the\nbytes only for a declared PNG, JPEG, GIF or WebP type: a declared\nraster type the bytes do not match returns\n`application/octet-stream`. Any other declared type is returned as\ndeclared, without a check that the bytes match it. A missing or\nmalformed type returns `application/octet-stream`. The\n`Content-Disposition` header carries the file's name reduced to its\nbase name, and no name when that is empty or longer than 200\ncharacters, so choose your own filename when the header has none.\nThe disposition is `inline` when the returned media type is\n`image/jpeg`, `image/png`, `image/gif`, `image/webp`, `video/mp4`,\n`video/3gpp`, `audio/aac`, `audio/amr`, `audio/mpeg`, `audio/mp4` or\n`audio/ogg`, and `attachment` for every other type.\n\nBird serves a received attachment from the copy it makes when the\nmessage arrives, for 30 days from that moment, and never downloads\nit from Apple. While that copy is still arriving the request returns\n`425` with a `Retry-After` header; retry after that time. Once Bird\nhas no copy, because it could not be made or the 30 days have passed,\nthe request returns `410`. Sending a received attachment again by\nits ID renews `expires_at` for sending only: the ID is still a\nreceived attachment, and its download window does not move.\n\nAn attachment you sent from a `source_url` or uploaded is downloaded\nfrom Apple. Past\n`expires_at`, one that Apple confirms it no longer holds returns\n`410`; any other failure to download from Apple returns `503`, and\nthe request can be retried. An unknown ID returns `404`.\n","tags":["amb-messages"],"x-audiences":["dashboard","public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"name":"attachment_id","in":"path","required":true,"description":"Attachment identifier. Starts with `aat_`.","schema":{"$ref":"#/components/schemas/AMBAttachmentID"}},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The raw attachment bytes.","headers":{"Content-Disposition":{"description":"`inline` when the returned media type is `image/jpeg`, `image/png`, `image/gif`, `image/webp`, `video/mp4`, `video/3gpp`, `audio/aac`, `audio/amr`, `audio/mpeg`, `audio/mp4` or `audio/ogg`; `attachment` for any other type. Carries the file's base name when it has a usable one.\n","schema":{"type":"string"}}},"content":{"*/*":{"schema":{"type":"string","format":"binary"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"425":{"$ref":"#/components/responses/TooEarly"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp"]}},"/v1/amb/messages/{message_id}/attachments/{index}":{"get":{"operationId":"getAMBMessageAttachment","summary":"Get a message attachment","description":"Downloads the attachment at the zero-based `index` in a message's\n`text.attachments` array and returns its decrypted bytes with the\nmedia type the attachment declares. A declared PNG, JPEG, GIF or WebP\ntype is kept only when the bytes match it; a missing, malformed or\nmismatched type returns `application/octet-stream`. The\n`Content-Disposition` header carries the file's name reduced to its\nbase name, and no name when that is empty or longer than 200\ncharacters, so choose your own filename when the header has none.\nThe disposition is `inline` when the returned media type is\n`image/jpeg`, `image/png`, `image/gif`, `image/webp`, `video/mp4`,\n`video/3gpp`, `audio/aac`, `audio/amr`, `audio/mpeg`, `audio/mp4` or\n`audio/ogg`, and `attachment` for every other type.\nWorks for attachments a customer sent and for attachments\nyou sent. For a received attachment, `message_id` is the `message.id`\nof the `amb.received` webhook event, and `index` is the attachment's\nposition in that message's `text.attachments` array.\n\nBird serves a received attachment from the copy it makes when the\nmessage arrives, for 30 days from that moment. While the copy is\nstill arriving the request returns `425` with a `Retry-After` header;\nretry after that time. Once Bird has no copy, because it could not be\nmade or 30 days have passed, the request returns `410`.\n\nAn attachment you sent is downloaded from Apple, which retains it for\nabout 30 days; one Apple no longer holds returns `503`. An unknown\nmessage or index returns `404`.\n","tags":["amb-messages"],"x-audiences":["dashboard","public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"description":"Message identifier. Starts with `amb_`. For a received attachment, use the `message.id` from the `amb.received` webhook event.","schema":{"$ref":"#/components/schemas/AMBMessageID"}},{"name":"index","in":"path","required":true,"description":"Zero-based position in the message's `text.attachments` array.","schema":{"type":"integer","minimum":0}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The raw attachment bytes.","headers":{"Content-Disposition":{"description":"`inline` when the returned media type is `image/jpeg`, `image/png`, `image/gif`, `image/webp`, `video/mp4`, `video/3gpp`, `audio/aac`, `audio/amr`, `audio/mpeg`, `audio/mp4` or `audio/ogg`; `attachment` for any other type. Carries the file's base name when it has a usable one.\n","schema":{"type":"string"}}},"content":{"*/*":{"schema":{"type":"string","format":"binary"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"425":{"$ref":"#/components/responses/TooEarly"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp"]}},"/v1/amb/messages":{"get":{"operationId":"listAMBMessages","x-snippet-key":"amb.list","summary":"List messages","description":"Returns your business's Apple Messages for Business messages across\nconversations, newest first, both received and sent. To page through\nolder messages, use `starting_after`. Messages do not expire based on age.\n\nTo list messages within a single conversation, use\n`listAMBConversationMessages`.\n","tags":["amb-messages"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"name":"conversation_id","in":"query","required":false,"description":"Filter to messages belonging to this conversation.","schema":{"$ref":"#/components/schemas/AMBConversationID"}},{"name":"business_account_id","in":"query","required":false,"description":"Filter to messages belonging to this business.","schema":{"$ref":"#/components/schemas/AMBBusinessID"}},{"name":"direction","in":"query","required":false,"description":"Filter to received (`inbound`) or sent (`outbound`) messages.","schema":{"$ref":"#/components/schemas/AMBMessageDirection"}},{"name":"status","in":"query","required":false,"description":"Filter to messages with this status.","schema":{"$ref":"#/components/schemas/AMBMessageStatus"}},{"name":"kind","in":"query","required":false,"description":"Filter to messages whose content is this shape.","schema":{"$ref":"#/components/schemas/AMBContentKind"}},{"name":"category","in":"query","required":false,"description":"Filter to outbound messages sent with this category, exact match.","schema":{"type":"string","maxLength":64},"example":"order_update"},{"$ref":"#/components/parameters/TagFilter"},{"$ref":"#/components/parameters/MessageReferenceFilter"},{"$ref":"#/components/parameters/CreatedAfter"},{"$ref":"#/components/parameters/CreatedBefore"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of messages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBMessageList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createAMBMessage","x-snippet-key":"amb.send","summary":"Send a message","description":"Send a message in an existing Apple Messages for Business conversation. `from` is the Apple business identifier and `to` is the customer’s opaque identifier for that business. An unknown conversation returns 404; a closed conversation returns 422. Only the customer can reopen a conversation.\n\nChoose text, rich_link, or interactive content. Interactive content contains a quick reply, list picker, event, form, or custom iMessage app. Device support varies; an unsupported interaction returns 422.\n\nYou cannot send an identity verification or Apple Pay request with this operation. `interactive.authenticate` and `interactive.payment` are read-only. They appear on existing messages, in message reads and webhooks. To send an identity verification request, open the conversation in the dashboard and select Request, then Verification request. Apple Pay requests are in preview.\n\nSupply attachments by source URL. Bird downloads the files and uploads them to Apple before sending. Interactive images must be PNG files up to 200 kB each, totaling at most 5 MB. Each attachment must be smaller than 100 MB. A media or provider failure after acceptance changes the message status to send_failed.\n\nThe 202 response confirms acceptance, not delivery. Read the message to obtain its final status.","tags":["amb-messages"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBMessageSendRequest"},"examples":{"text":{"summary":"A plain text message","value":{"text":{"body":"Your order shipped and will arrive tomorrow."},"from":"b52d6267-2b62-4f8a-8842-0533d0f1dc07","to":"the-opaque-user-id-from-the-conversation"}},"quick-reply":{"summary":"Two quick-reply buttons","value":{"interactive":{"quick_reply":{"summary_text":"Would you like to reschedule?","items":[{"identifier":"reschedule","title":"Reschedule"},{"identifier":"keep","title":"Keep as is"}]}},"from":"b52d6267-2b62-4f8a-8842-0533d0f1dc07","to":"the-opaque-user-id-from-the-conversation"}},"rich-link":{"summary":"A link with an image preview","value":{"rich_link":{"rich_link_data":{"url":"https://example.com/orders/123","title":"Your order","assets":{"image":{"source_url":"https://media.example.com/order.png"}}}},"from":"b52d6267-2b62-4f8a-8842-0533d0f1dc07","to":"the-opaque-user-id-from-the-conversation"}},"attachment":{"summary":"A PDF attachment","value":{"text":{"body":"Your receipt\n￼","attachments":[{"source_url":"https://media.example.com/receipt.pdf","name":"receipt.pdf","mime_type":"application/pdf"}]},"from":"b52d6267-2b62-4f8a-8842-0533d0f1dc07","to":"the-opaque-user-id-from-the-conversation"}},"list-picker":{"summary":"A menu with multiple selections","value":{"interactive":{"received_message":{"title":"Browse topics","style":"large"},"reply_message":{"title":"Selected topics","style":"small"},"list_picker":{"sections":[{"title":"Topics","multiple_selection":true,"items":[{"identifier":"products","title":"Products"},{"identifier":"support","title":"Support"}]}]}},"from":"b52d6267-2b62-4f8a-8842-0533d0f1dc07","to":"the-opaque-user-id-from-the-conversation"}},"time-picker":{"summary":"Two appointment times","value":{"interactive":{"event":{"timeslots":[{"identifier":"morning","start_at":"2026-09-10T09:00:00Z","duration_seconds":1800},{"identifier":"afternoon","start_at":"2026-09-10T14:00:00Z","duration_seconds":1800}],"title":"Choose an appointment","location":{"title":"Online consultation"}}},"from":"b52d6267-2b62-4f8a-8842-0533d0f1dc07","to":"the-opaque-user-id-from-the-conversation"}},"form":{"summary":"A short satisfaction survey","value":{"interactive":{"received_message":{"title":"Tell us how we did"},"reply_message":{"title":"Feedback submitted"},"dynamic":{"data":{"start_page_identifier":"feedback","show_summary":true,"pages":[{"type":"select","page_identifier":"feedback","subtitle":"Was your question answered?","submit_form":true,"items":[{"identifier":"yes","title":"Yes","value":"yes"},{"identifier":"no","title":"No","value":"no"}]}]}}},"from":"b52d6267-2b62-4f8a-8842-0533d0f1dc07","to":"the-opaque-user-id-from-the-conversation"}},"imessage-app":{"summary":"Open a business's iMessage app","value":{"interactive":{"received_message":{"title":"View your order"},"reply_message":{"title":"Order selected"},"imessage_app":{"app_id":"123456789","app_name":"Acme Service","bid":"com.apple.messages.MSMessageExtensionBalloonPlugin:ABCDE12345:com.example.acme.messages","url":"?order=123","use_live_layout":true,"app_icon_source_url":"https://media.example.com/app-icon.png"}},"from":"b52d6267-2b62-4f8a-8842-0533d0f1dc07","to":"the-opaque-user-id-from-the-conversation"}}}}}},"responses":{"202":{"description":"Message accepted for asynchronous delivery.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBMessage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/messages/{message_id}":{"parameters":[{"name":"message_id","in":"path","required":true,"description":"Message identifier. Starts with `amb_`.","schema":{"$ref":"#/components/schemas/AMBMessageID"}}],"get":{"operationId":"getAMBMessage","x-snippet-key":"amb.get","summary":"Get a message","description":"Returns a single Apple Messages for Business message: its current status, the content it carries, and failure detail when it failed. There is no delivery or read receipt on this channel, so an outbound message's `status` advances only as far as `sent`. For the per-event timeline, use `listAMBMessageEvents` instead. Messages do not expire based on age.\n","tags":["amb-messages"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBMessage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/messages/{message_id}/events":{"parameters":[{"name":"message_id","in":"path","required":true,"description":"Message identifier. Starts with `amb_`.","schema":{"$ref":"#/components/schemas/AMBMessageID"}}],"get":{"operationId":"listAMBMessageEvents","x-snippet-key":"amb.list_events","summary":"List events for a message","description":"Returns a message's lifecycle events in chronological order, one entry per status transition (`amb.accepted`, `amb.sent`, `amb.send_failed`, `amb.received`). The timeline is bounded and returned in full, so this list is not paginated. Event history does not expire based on age.\n","tags":["amb-messages"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"name":"type","in":"query","required":false,"description":"Keep only events of this exact type (for example `amb.sent` or `amb.send_failed`). Omit for the full timeline.\n","schema":{"$ref":"#/components/schemas/AMBMessageEventType"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Event timeline for this message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBMessageEventList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/conversations":{"get":{"operationId":"listAMBConversations","x-snippet-key":"amb.conversations.list","summary":"List conversations","description":"Returns the conversations your business has with customers on Apple\nMessages for Business, newest first by last message. To page through\nolder conversations, use `starting_after`. A closed conversation stays in\nthis list; filter on `status` for the Apple channel state, or `inbox_status` for open and resolved inbox work.\n\nUse `assigned_to=me` for your own conversations or `unassigned` for conversations without an assignee. Repeat `label` to require every supplied label.\n","tags":["amb-conversations"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"$ref":"#/components/parameters/ConversationInboxStatusFilter"},{"name":"business_account_id","in":"query","required":false,"description":"Filter to conversations belonging to this business.","schema":{"$ref":"#/components/schemas/AMBBusinessID"}},{"name":"status","in":"query","required":false,"description":"Filter to conversations with this status. Omit to return both open and closed conversations.","schema":{"$ref":"#/components/schemas/AMBConversationStatus"}},{"name":"intent_id","in":"query","required":false,"description":"Filter to conversations with this entry point intent, as sent in Apple's intentID. Conversations whose entry point carried no intent match only when this filter is omitted.","schema":{"type":"string","minLength":1},"example":"order_status"},{"name":"group_id","in":"query","required":false,"description":"Filter to conversations with this entry point group, as sent in Apple's groupID. Conversations whose entry point carried no group match only when this filter is omitted.","schema":{"type":"string","minLength":1},"example":"support"},{"name":"queue","in":"query","required":false,"description":"Filter to conversations in this queue. Pass an empty string to match unrouted conversations, the ones no routing rule has claimed.\n","schema":{"type":"string","minLength":0,"maxLength":64},"example":"support"},{"$ref":"#/components/parameters/ConversationAssigneeFilter"},{"$ref":"#/components/parameters/ConversationLabelFilter"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of conversations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBConversationList"},"example":{"data":[{"id":"acv_01krdgeqcxet5s7t44vh8rt9mg","business_account_id":"abz_01krdgeqcxet5s7t44vh8rt9mg","status":"open","inbox_status":"open","recipient":{"opaque_user_id":"customer-48213","phone_number":null,"display_name":"Avery Stone"},"routing":{"group_id":null,"intent_id":null,"entry_point":null,"queue":"support"},"routing_change":null,"last_message":{"id":"amb_01krdgeqcxet5s7t44vh8rt9mg","direction":"inbound","created_at":"2026-11-11T09:10:00Z"},"origin":"entry_point","device_capabilities":["AUTH2"],"supported_content_kinds":["text","attachment","rich_link"],"locale":"en_US","unread_count":1,"assigned_to":null,"labels":["billing","vip"],"closed_at":null,"closed_reason":null,"created_at":"2026-11-11T09:00:00Z","updated_at":"2026-11-11T09:10:00Z"}],"next_cursor":null,"prev_cursor":null,"refresh_cursor":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/conversations/{conversation_id}":{"parameters":[{"name":"conversation_id","in":"path","required":true,"description":"Conversation identifier. Starts with `acv_`.","schema":{"$ref":"#/components/schemas/AMBConversationID"}}],"get":{"operationId":"getAMBConversation","x-snippet-key":"amb.conversations.get","summary":"Get a conversation","description":"Returns one conversation, including closed conversations. Conversation records have no age limit.\n","tags":["amb-conversations"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"responses":{"200":{"description":"The conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBConversation"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateAMBConversation","x-snippet-key":"amb.conversations.update","summary":"Update a conversation","description":"Updates assignment, labels, inbox status, queue, or shared workspace read state, or settles a pending `routing_change`. A routing decision names the change's `message_id` and fails with `409` when a newer change replaced it. Moving the queue does not run routing rules. Resolving inbox work preserves the conversation and its Apple channel state. A new inbound message reopens the inbox work. To acknowledge messages, pass `read` with a date-time cutoff for their `created_at`. Only inbound messages already received at or before that cutoff are marked read. Messages sharing the timestamp are included together; later arrivals remain unread. Use `assigned_to: me` to assign yourself, a workspace member ID to assign a teammate, or null to unassign. An API key cannot use `me`.\n","tags":["amb-conversations"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBConversationUpdate"}}}},"responses":{"200":{"description":"The updated conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBConversation"},"example":{"id":"acv_01krdgeqcxet5s7t44vh8rt9mg","business_account_id":"abz_01krdgeqcxet5s7t44vh8rt9mg","status":"open","inbox_status":"open","recipient":{"opaque_user_id":"customer-48213","phone_number":null},"routing":{"group_id":null,"intent_id":null,"entry_point":null,"queue":"support"},"routing_change":null,"last_message":{"id":"amb_01krdgeqcxet5s7t44vh8rt9mg","direction":"inbound","created_at":"2026-11-11T09:10:00Z"},"origin":"entry_point","device_capabilities":["AUTH2"],"supported_content_kinds":["text","attachment","rich_link"],"locale":"en_US","unread_count":1,"assigned_to":null,"labels":["billing","vip"],"closed_at":null,"closed_reason":null,"created_at":"2026-11-11T09:00:00Z","updated_at":"2026-11-11T09:10:00Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/conversations/{conversation_id}/authentications":{"parameters":[{"name":"conversation_id","in":"path","required":true,"description":"Conversation identifier. Starts with `acv_`.","schema":{"$ref":"#/components/schemas/AMBConversationID"}}],"post":{"operationId":"createAMBAuthentication","x-snippet-key":"amb.conversations.request_authentication","summary":"Request conversation authentication","description":"Sends a native sign-in request to an open conversation whose device advertises `AUTH2`. The business needs an enabled authentication provider. The request expires after ten minutes. Bird validates the provider's response and waits for confirmation from the originating Messages device before storing the verified identity with the conversation. The customer's tokens are never stored or returned. A new request supersedes an unfinished one in the same conversation, including when the new request then fails to send. Reusing an idempotency key returns the original request. The outcome arrives as a webhook event. Read the request to recover a missing event. The request sends the business's sign-in message, or Bird's built-in message when the business has none. Name a `template` to send another sign-in message template. Bird renders the message when it accepts the request, so a later template change does not alter it.\n","tags":["amb-conversations"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public"],"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBAuthenticationCreate"}}}},"responses":{"202":{"description":"The authentication request was accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBAuthentication"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["sdk"]}},"/v1/amb/conversations/{conversation_id}/authentications/{authentication_id}":{"parameters":[{"name":"conversation_id","in":"path","required":true,"description":"Conversation identifier. Starts with `acv_`.","schema":{"$ref":"#/components/schemas/AMBConversationID"}},{"name":"authentication_id","in":"path","required":true,"description":"Authentication request identifier. Starts with `amauth_`.","schema":{"$ref":"#/components/schemas/AMBAuthenticationID"}}],"get":{"operationId":"getAMBAuthentication","x-snippet-key":"none","summary":"Get an authentication request","description":"Returns one authentication request with its current status. A request that succeeded includes the verified identity. Read it to recover the outcome when the webhook event for the request was not received.\n","tags":["amb-conversations"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public"],"responses":{"200":{"description":"The authentication request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBAuthentication"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["sdk"]}},"/v1/amb/conversations/{conversation_id}/messages":{"parameters":[{"name":"conversation_id","in":"path","required":true,"description":"Conversation identifier. Starts with `acv_`.","schema":{"$ref":"#/components/schemas/AMBConversationID"}}],"get":{"operationId":"listAMBConversationMessages","x-snippet-key":"amb.conversations.list_messages","summary":"List messages in a conversation","description":"Returns the messages in a conversation, newest first, both received and\nsent. To page through older messages, use `starting_after`. The sort\norder is fixed, so to render the messages in conversation order, reverse\nthe page yourself. Messages do not expire based on age.\n","tags":["amb-conversations"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"name":"direction","in":"query","required":false,"description":"Filter to received (`inbound`) or sent (`outbound`) messages.","schema":{"$ref":"#/components/schemas/AMBMessageDirection"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of messages in the conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBMessageList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/conversations/{conversation_id}/typing":{"parameters":[{"name":"conversation_id","in":"path","required":true,"description":"Conversation identifier. Starts with `acv_`.","schema":{"$ref":"#/components/schemas/AMBConversationID"}}],"post":{"operationId":"createAMBConversationTyping","x-snippet-key":"amb.conversations.typing","summary":"Send a typing indicator","description":"Sends a typing indicator to the customer's device on this conversation. Send `typing_start` before the reply it precedes; sending it again before that reply is not meaningful and may be dropped. Bird also shows a typing indicator before each reply it sends, so set `skip_typing` on that reply to avoid a second one. Apple's own behavior for `typing_end` sent with no reply following is unproven, so treat it as best-effort. This conversation must be open: the same checks that gate a message on this conversation gate a typing indicator, other than the content checks, since a typing indicator has no content. Apple can still refuse the indicator for this customer: `AMBRecipientUnreachable` means none of their devices can receive it, and `AMBConversationClosed` can also mean Apple reports that the customer left the conversation, which then closes when the next message is sent.\n","tags":["amb-conversations"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["dashboard","public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBConversationTypingRequest"}}}},"responses":{"204":{"description":"The typing indicator was sent."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/suppressions":{"get":{"operationId":"listAMBSuppressions","x-snippet-key":"amb.suppressions.list","summary":"List Apple Messages for Business suppressions","description":"Returns the suppressions currently stopping your messages, most recent first by `effective_at`. Pass `address` to look up one customer before messaging them, and `business_account_id` to narrow to one account.\n\nA suppression covers one address for one business account, or for every account in the workspace when `business_account_id` is null. Filtering by `business_account_id` returns that account's suppressions together with the workspace-wide ones that stop it too.\n\nEnded suppressions are excluded. A customer who returned to a conversation they had closed is reachable again and does not appear in this list.\n","tags":["amb-suppressions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"business_account_id","in":"query","required":false,"description":"Return only suppressions covering this business account, including the workspace-wide ones that stop it too. Omit for every account in the workspace.\n","schema":{"$ref":"#/components/schemas/AMBBusinessID"}},{"name":"address","in":"query","required":false,"description":"Return only suppressions for this exact address: a complete phone number, which is normalized to E.164 first, or an opaque identifier exactly as Apple supplied it. Prefix matching is unsupported, so a partial value returns an empty page.\n","schema":{"type":"string","minLength":1},"example":"+15551234567"},{"name":"address_type","in":"query","required":false,"description":"Return only suppressions whose address is of this kind.","schema":{"$ref":"#/components/schemas/AMBSuppressionAddressType"}},{"name":"reason","in":"query","required":false,"description":"Return only suppressions with this reason:\n\n- `manual`: Added through the API or dashboard.\n- `opted_out`: The customer or Apple signaled they should not be contacted.\n","schema":{"$ref":"#/components/schemas/AMBSuppressionReasonFilter"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of Apple Messages for Business suppressions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBSuppressionList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createAMBSuppression","x-snippet-key":"amb.suppressions.add","summary":"Create an Apple Messages for Business suppression","description":"Stops messages to an address, with reason `manual`, blocking every outbound path to it: operator and automated replies, API sends, typing indicators and invitations. Set `business_account_id` to stop the address for one account, or omit it to stop the address for every account in the workspace. The account must belong to the workspace; another workspace's account returns `404`.\n\nAdding is idempotent. A `201` means a new suppression was recorded, and a `200` means a `manual` one for that address and scope was already in place and is returned with `last_asserted_at` moved to this call, nothing else changed. An address already stopped for another reason, such as the customer having closed the conversation, still gets its own `manual` record, and messages stay stopped until every one of them has ended.\n","tags":["amb-suppressions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBSuppressionCreate"},"example":{"address":"+15551234567","address_type":"phone_number"}}}},"responses":{"200":{"description":"A manual suppression for this address and scope was already in place. It is returned with `last_asserted_at` moved to this call; nothing else changes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBSuppression"}}}},"201":{"description":"Suppression recorded.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBSuppression"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/suppressions/{suppression_id}":{"parameters":[{"name":"suppression_id","in":"path","required":true,"description":"ID of the suppression, as returned when it was created or listed.\n","schema":{"$ref":"#/components/schemas/AMBSuppressionID"},"example":"asp_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"getAMBSuppression","x-snippet-key":"amb.suppressions.get","summary":"Get an Apple Messages for Business suppression","description":"Returns one suppression: the address and business account it covers, why messages are stopped, how the record came to exist, what it stops, and whether it is still in force.\n\nThis operation also returns a suppression that has already ended. The `blocking` field is `false`, and the `ended_*` fields say when and why. An ID you kept from a create or a list therefore stays readable. To find one when you only know the address, use `GET /v1/amb/suppressions` with the `address` parameter. An ID that does not exist in the workspace returns `404`.\n","tags":["amb-suppressions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"Apple Messages for Business suppression.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBSuppression"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteAMBSuppression","x-snippet-key":"amb.suppressions.remove","summary":"End an Apple Messages for Business suppression","description":"Ends a manual suppression. The record stays with the ending noted on it. This history helps answer later complaints or audits.\n\n**Only the `manual` reason can be ended here.** An `opted_out` suppression is the customer's own statement: one opened by a close ends when the customer returns to the conversation. Attempts to end it return `422` with `E28039`, whether or not it has already ended. Fresh consent to invite a phone number is recorded through preferences, not here.\n\nEnding a `manual` suppression does not resume messages while another suppression for the same address is still open, whether for that business account or workspace-wide, including an `opted_out` one; while the conversation is closed, since Apple refuses sends into a closed conversation; or while the phone number's invitation consent is revoked in preferences. Ending one resumes messaging to someone your own records say did not want it, so do it only when you know why the `manual` record exists. An ID that does not exist in the workspace returns `404`, and a `manual` one that has already ended returns `204`.\n","tags":["amb-suppressions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Suppression ended."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/summary":{"get":{"operationId":"getAMBStatsSummary","x-snippet-key":"amb.stats.summary","summary":"Get aggregate outbound Apple Messages for Business statistics","description":"Returns one aggregate row of outbound Apple Messages for Business counts and latency percentiles (`p50`, `p95`, and `p99`) for the requested period. Counts are attributed to the time each message was accepted, so a send failure recorded today counts against the day its message was accepted; `period.data_as_of` is the freshness boundary the rollups have reached.\n\nThere is no delivery receipt on this channel, so there is no `delivered` count, delivery rate, or delivery-latency figure anywhere in this response. `latency.processing` covers acceptance to Apple handoff, and `first_response` measures the oldest unanswered inbound message to acceptance of the first outbound reply that claims it. When no qualifying message contributes a measurement, processing percentiles are null and `first_response` is omitted.\n\n`from` and `to` must both be calendar days or RFC 3339 instants. Day windows cover up to 365 whole days. Instant bounds round down to the hour, remain inclusive, and may span up to 720 hours. Mixing the forms returns `422`. Set `timezone` for local boundaries. Historical dates are supported within the maximum window length; the requested dates are not shifted forward.\n\nSet one dimension filter at most (`business_account_id`, `message_kind`, `intent`, `group`, `category`, or `tag`); more than one returns `422`. Use `compare=previous_period` to include the preceding equal-length window and computed changes for the message counts and rates listed in `comparison.delta`. Monthly active contacts and latency values have no computed change.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window: a calendar day (YYYY-MM-DD) or an RFC 3339 instant rounded down to the hour. The `timezone` parameter makes a calendar day local and rounds an instant down to the local hour. Omit `timezone` to use UTC. When `timezone` is set, a numeric UTC offset such as `+05:45` is rejected; use a calendar day or a `Z` (UTC) instant. This value must use the same form as `to`. When omitted, it defaults to 30 days before `to` for day windows or 168 hours (7 days) before `to` for hour windows.\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window: a calendar day (YYYY-MM-DD) or an RFC 3339 instant rounded down to the hour. The `timezone` parameter makes a calendar day local and rounds an instant down to the local hour. Omit `timezone` to use UTC. When `timezone` is set, a numeric UTC offset is rejected; use a calendar day or a `Z` (UTC) instant. This value must use the same form as `from`. When omitted, it defaults to today for day windows or the current hour for hour windows in that timezone. Day windows may not exceed 365 days; hour windows may not exceed 720 hours (30 days).\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"business_account_id","in":"query","required":false,"description":"Restrict the statistics to a single business. Mutually exclusive with the other dimension filters (`message_kind`, `intent`, `group`, `category`, `tag`); only one may be set per request. Matches the `business_account_id` key on a row of the per-business breakdown.\n","schema":{"$ref":"#/components/schemas/AMBBusinessID"}},{"name":"message_kind","in":"query","required":false,"description":"Restrict the statistics to a single message content kind. Mutually exclusive with the other dimension filters (`business_account_id`, `intent`, `group`, `category`, `tag`); only one may be set per request. Matches the `message_kind` key on a row of the per-content-kind breakdown.\n","schema":{"$ref":"#/components/schemas/AMBContentKind"}},{"name":"intent","in":"query","required":false,"description":"Restrict the statistics to a single entry-point intent. Mutually exclusive with the other dimension filters (`business_account_id`, `message_kind`, `group`, `category`, `tag`); only one may be set per request. Matches the `intent` key on a row of the per-intent breakdown.\n","schema":{"type":"string","minLength":1,"example":"order_support"}},{"name":"group","in":"query","required":false,"description":"Restrict the statistics to a single entry-point group. Mutually exclusive with the other dimension filters (`business_account_id`, `message_kind`, `intent`, `category`, `tag`); only one may be set per request. Matches the `group` key on a row of the per-group breakdown.\n","schema":{"type":"string","minLength":1,"example":"sales"}},{"name":"category","in":"query","required":false,"description":"Restrict the statistics to a single message category. Mutually exclusive with the other dimension filters (`business_account_id`, `message_kind`, `intent`, `group`, `tag`); only one may be set per request. Matches the `category` key on a row of the per-category breakdown.\n","schema":{"type":"string","minLength":1,"example":"order_update"}},{"name":"tag","in":"query","required":false,"description":"Restrict the statistics to a single tag. Use `name` to match any value of a tag, or `name:value` for a specific pair (for example `campaign:spring_launch`). Mutually exclusive with the other dimension filters (`business_account_id`, `message_kind`, `intent`, `group`, `category`); only one may be set per request. A row of the per-tag breakdown carries the same pair in its single `tag` key.\n","schema":{"type":"string","minLength":1,"example":"campaign:spring_launch"}},{"name":"compare","in":"query","required":false,"description":"Set to `previous_period` to also include the same statistics for the immediately preceding window of equal length, plus the change between the two, so you can show \"+X% vs last period\" without a second request. The comparison window carries any dimension filter set on the request, so a filtered comparison compares like with like.\n","schema":{"$ref":"#/components/schemas/StatsComparePeriod"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Aggregate summary for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBStatsSummary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/daily":{"get":{"operationId":"getAMBStatsDaily","x-snippet-key":"amb.stats.daily","summary":"Get daily outbound Apple Messages for Business statistics","description":"Returns one row of outbound Apple Messages for Business counts and processing-latency percentiles per calendar day for the workspace, gap-filled so a silent day is a zero row rather than a missing one. Every count in a row is attributed to the day its message was accepted, regardless of when a later event, such as a send failure, arrived.\n\nThere is no delivery receipt on this channel, so there is no `delivered` count or delivery-latency figure in any row. Each row carries its own `latency.processing` percentiles. Read `first_response` from the summary or a breakdown endpoint.\n\n`from` and `to` are optional calendar days (YYYY-MM-DD), defaulting to the trailing 30 days. The maximum window is 365 days; a longer range returns `422`. Set `timezone` to report rows by your local calendar day. Historical dates are supported within the maximum window length; the requested dates are not shifted forward.\n\nSet at most one dimension filter (`business_account_id`, `message_kind`, `intent`, `group`, `category`, or `tag`) to restrict the statistics to that dimension's value; setting more than one returns `422`.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). The window may not exceed 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). The window may not exceed 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"business_account_id","in":"query","required":false,"description":"Restrict the statistics to a single business. Mutually exclusive with the other dimension filters (`message_kind`, `intent`, `group`, `category`, `tag`); only one may be set per request. Matches the `business_account_id` key on a row of the per-business breakdown.\n","schema":{"$ref":"#/components/schemas/AMBBusinessID"}},{"name":"message_kind","in":"query","required":false,"description":"Restrict the statistics to a single message content kind. Mutually exclusive with the other dimension filters (`business_account_id`, `intent`, `group`, `category`, `tag`); only one may be set per request. Matches the `message_kind` key on a row of the per-content-kind breakdown.\n","schema":{"$ref":"#/components/schemas/AMBContentKind"}},{"name":"intent","in":"query","required":false,"description":"Restrict the statistics to a single entry-point intent. Mutually exclusive with the other dimension filters (`business_account_id`, `message_kind`, `group`, `category`, `tag`); only one may be set per request. Matches the `intent` key on a row of the per-intent breakdown.\n","schema":{"type":"string","minLength":1,"example":"order_support"}},{"name":"group","in":"query","required":false,"description":"Restrict the statistics to a single entry-point group. Mutually exclusive with the other dimension filters (`business_account_id`, `message_kind`, `intent`, `category`, `tag`); only one may be set per request. Matches the `group` key on a row of the per-group breakdown.\n","schema":{"type":"string","minLength":1,"example":"sales"}},{"name":"category","in":"query","required":false,"description":"Restrict the statistics to a single message category. Mutually exclusive with the other dimension filters (`business_account_id`, `message_kind`, `intent`, `group`, `tag`); only one may be set per request. Matches the `category` key on a row of the per-category breakdown.\n","schema":{"type":"string","minLength":1,"example":"order_update"}},{"name":"tag","in":"query","required":false,"description":"Restrict the statistics to a single tag. Use `name` to match any value of a tag, or `name:value` for a specific pair (for example `campaign:spring_launch`). Mutually exclusive with the other dimension filters (`business_account_id`, `message_kind`, `intent`, `group`, `category`); only one may be set per request. A row of the per-tag breakdown carries the same pair in its single `tag` key.\n","schema":{"type":"string","minLength":1,"example":"campaign:spring_launch"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Daily aggregate stats for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBStatsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/hourly":{"get":{"operationId":"getAMBStatsHourly","x-snippet-key":"amb.stats.hourly","summary":"Get hourly outbound Apple Messages for Business statistics","description":"Returns one row of outbound Apple Messages for Business counts and processing-latency percentiles per hour, gap-filled so a silent hour is a zero row rather than a missing one. Every count in a row is attributed to the hour its message was accepted, regardless of when a later event, such as a send failure, arrived. Use it where the daily grain hides the shape; a window spans at most 720 hours (30 days), and for anything longer use the daily endpoint.\n\nThere is no delivery receipt on this channel, so there is no `delivered` count or delivery-latency figure in any row. Each row carries its own `latency.processing` percentiles. Read `first_response` from the summary or a breakdown endpoint.\n\n`from` and `to` are optional RFC 3339 instants, defaulting to the trailing 168 hours; each bound rounds down to the hour and remains inclusive. A request may span up to 30 days (720 rows). An excessive or reversed window returns `422`. Set `timezone` for local hours instead of UTC, including zones with sub-hour offsets; when the timezone's offset is not a whole number of hours, rows are read from finer-grained internal rollups and combined into hour boundaries automatically, with no parameter to select this. Historical dates are supported within the maximum window length; the requested dates are not shifted forward.\n\nSet one dimension filter at most (`business_account_id`, `message_kind`, `intent`, `group`, `category`, or `tag`); more than one returns `422`.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start of the window (RFC 3339 instant), rounded down to the start of its hour and included. The boundary uses the local hour when `timezone` is set and the UTC hour otherwise. The window may not exceed 30 days (720 hours). Defaults to 168 hours (7 days) before `to` when omitted.","schema":{"type":"string","format":"date-time","minLength":1,"example":"2026-05-25T00:00:00Z"}},{"name":"to","in":"query","required":false,"description":"End of the window (RFC 3339 instant), rounded down to the start of its hour and included. The boundary uses the local hour when `timezone` is set and the UTC hour otherwise, so both bounds are inclusive. The window may not exceed 30 days (720 hours). Defaults to the current hour when omitted.","schema":{"type":"string","format":"date-time","minLength":1,"example":"2026-05-25T23:59:59Z"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"business_account_id","in":"query","required":false,"description":"Restrict the statistics to a single business. Mutually exclusive with the other dimension filters (`message_kind`, `intent`, `group`, `category`, `tag`); only one may be set per request. Matches the `business_account_id` key on a row of the per-business breakdown.\n","schema":{"$ref":"#/components/schemas/AMBBusinessID"}},{"name":"message_kind","in":"query","required":false,"description":"Restrict the statistics to a single message content kind. Mutually exclusive with the other dimension filters (`business_account_id`, `intent`, `group`, `category`, `tag`); only one may be set per request. Matches the `message_kind` key on a row of the per-content-kind breakdown.\n","schema":{"$ref":"#/components/schemas/AMBContentKind"}},{"name":"intent","in":"query","required":false,"description":"Restrict the statistics to a single entry-point intent. Mutually exclusive with the other dimension filters (`business_account_id`, `message_kind`, `group`, `category`, `tag`); only one may be set per request. Matches the `intent` key on a row of the per-intent breakdown.\n","schema":{"type":"string","minLength":1,"example":"order_support"}},{"name":"group","in":"query","required":false,"description":"Restrict the statistics to a single entry-point group. Mutually exclusive with the other dimension filters (`business_account_id`, `message_kind`, `intent`, `category`, `tag`); only one may be set per request. Matches the `group` key on a row of the per-group breakdown.\n","schema":{"type":"string","minLength":1,"example":"sales"}},{"name":"category","in":"query","required":false,"description":"Restrict the statistics to a single message category. Mutually exclusive with the other dimension filters (`business_account_id`, `message_kind`, `intent`, `group`, `tag`); only one may be set per request. Matches the `category` key on a row of the per-category breakdown.\n","schema":{"type":"string","minLength":1,"example":"order_update"}},{"name":"tag","in":"query","required":false,"description":"Restrict the statistics to a single tag. Use `name` to match any value of a tag, or `name:value` for a specific pair (for example `campaign:spring_launch`). Mutually exclusive with the other dimension filters (`business_account_id`, `message_kind`, `intent`, `group`, `category`); only one may be set per request. A row of the per-tag breakdown carries the same pair in its single `tag` key.\n","schema":{"type":"string","minLength":1,"example":"campaign:spring_launch"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Hourly aggregate stats for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBStatsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/businesses":{"get":{"operationId":"getAMBStatsByBusiness","x-snippet-key":"amb.stats.by_business","summary":"Get outbound Apple Messages for Business statistics by business","description":"Returns outbound counts and latency percentiles grouped by business, for the requested period. Rows are ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200). Rows use accepted-time attribution: a send failure recorded during the period for a message accepted earlier counts against the earlier period. Each row also carries `first_response` latency percentiles, omitted when no qualifying message contributes a measurement. There is no delivery receipt on this channel, so there is no `delivered` count anywhere in the row.\n\nThe maximum window is 365 days; a longer range returns `422`. Historical dates are supported within the maximum window length; the requested dates are not shifted forward. A breakdown is already a single-dimension view and takes no dimension filter; to restrict statistics to a single business, use the summary, daily, or hourly statistics instead.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Must not be after `to`. Max window 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-06-14"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Max window 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-07-13"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum number of business rows to return, ranked by accepted volume descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-business breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBStatsByBusinessResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/message-kinds":{"get":{"operationId":"getAMBStatsByMessageKind","x-snippet-key":"amb.stats.by_message_kind","summary":"Get outbound Apple Messages for Business statistics by message kind","description":"Returns outbound counts and latency percentiles grouped by message content kind, for the requested period. Rows are ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200). Rows use accepted-time attribution: a send failure recorded during the period for a message accepted earlier counts against the earlier period. Each row also carries `first_response` latency percentiles, omitted when no qualifying message contributes a measurement. There is no delivery receipt on this channel, so there is no `delivered` count anywhere in the row.\n\nThe maximum window is 365 days; a longer range returns `422`. Historical dates are supported within the maximum window length; the requested dates are not shifted forward. A breakdown is already a single-dimension view and takes no dimension filter; to restrict statistics to a single content kind, use the summary, daily, or hourly statistics instead.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Must not be after `to`. Max window 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-06-14"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Max window 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-07-13"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum number of content-kind rows to return, ranked by accepted volume descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-content-kind breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBStatsByMessageKindResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/intents":{"get":{"operationId":"getAMBStatsByIntent","x-snippet-key":"amb.stats.by_intent","summary":"Get outbound Apple Messages for Business statistics by intent","description":"Returns outbound counts and latency percentiles grouped by entry-point intent, for the requested period. Rows are ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200). Intents are workspace-defined strings configured on the business's entry points and have no fixed vocabulary. Rows use accepted-time attribution: a send failure recorded during the period for a message accepted earlier counts against the earlier period. Each row also carries `first_response` latency percentiles, omitted when no qualifying message contributes a measurement. There is no delivery receipt on this channel, so there is no `delivered` count anywhere in the row.\n\nThe maximum window is 365 days; a longer range returns `422`. Historical dates are supported within the maximum window length; the requested dates are not shifted forward. A breakdown is already a single-dimension view and takes no dimension filter; to restrict statistics to a single intent, use the summary, daily, or hourly statistics instead.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Must not be after `to`. Max window 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-06-14"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Max window 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-07-13"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum number of intent rows to return, ranked by accepted volume descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-intent breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBStatsByIntentResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/groups":{"get":{"operationId":"getAMBStatsByGroup","x-snippet-key":"amb.stats.by_group","summary":"Get outbound Apple Messages for Business statistics by group","description":"Returns outbound counts and latency percentiles grouped by entry-point group, for the requested period. Rows are ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200). Groups are workspace-defined strings configured on the business's entry points and have no fixed vocabulary. Rows use accepted-time attribution: a send failure recorded during the period for a message accepted earlier counts against the earlier period. Each row also carries `first_response` latency percentiles, omitted when no qualifying message contributes a measurement. There is no delivery receipt on this channel, so there is no `delivered` count anywhere in the row.\n\nThe maximum window is 365 days; a longer range returns `422`. Historical dates are supported within the maximum window length; the requested dates are not shifted forward. A breakdown is already a single-dimension view and takes no dimension filter; to restrict statistics to a single group, use the summary, daily, or hourly statistics instead.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Must not be after `to`. Max window 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-06-14"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Max window 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-07-13"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum number of group rows to return, ranked by accepted volume descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-group breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBStatsByGroupResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/categories":{"get":{"operationId":"getAMBStatsByCategory","x-snippet-key":"amb.stats.by_category","summary":"Get outbound Apple Messages for Business statistics by category","description":"Returns outbound counts and latency percentiles grouped by message category, for the requested period. Rows are ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200). A send that names no category is grouped under an empty-string category. Rows use accepted-time attribution: a send failure recorded during the period for a message accepted earlier counts against the earlier period. Each row also carries `first_response` latency percentiles, omitted when no qualifying message contributes a measurement. There is no delivery receipt on this channel, so there is no `delivered` count anywhere in the row.\n\nThe maximum window is 365 days; a longer range returns `422`. Historical dates are supported within the maximum window length; the requested dates are not shifted forward. A breakdown is already a single-dimension view and takes no dimension filter; to restrict statistics to a single category, use the summary, daily, or hourly statistics instead.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Must not be after `to`. Max window 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-06-14"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Max window 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-07-13"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum number of category rows to return, ranked by accepted volume descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-category breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBStatsByCategoryResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/tags":{"get":{"operationId":"getAMBStatsByTag","x-snippet-key":"amb.stats.by_tag","summary":"Get outbound Apple Messages for Business statistics by tag","description":"Returns outbound counts and latency percentiles grouped by tag (`name` or `name:value`), for the requested period. Rows are ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200). Only tagged messages appear, and one carrying several tags counts once under each, so rows do not sum to the period total. Rows use accepted-time attribution: a send failure recorded during the period for a message accepted earlier counts against the earlier period. Each row also carries `first_response` latency percentiles, omitted when no qualifying message contributes a measurement. There is no delivery receipt on this channel, so there is no `delivered` count anywhere in the row.\n\nThe maximum window is 365 days; a longer range returns `422`. Historical dates are supported within the maximum window length; the requested dates are not shifted forward. A breakdown is already a single-dimension view and takes no dimension filter; to restrict statistics to a single tag, use the summary, daily, or hourly statistics instead.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Must not be after `to`. Max window 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-06-14"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Max window 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-07-13"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum number of tag rows to return, ranked by accepted volume descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-tag breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBStatsByTagResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/error-codes":{"get":{"operationId":"getAMBStatsByErrorCode","x-snippet-key":"amb.stats.by_error_code","summary":"Get outbound Apple Messages for Business statistics by error code","description":"Returns outbound counts and latency percentiles grouped by failure reason, for the requested period. Rows are ranked by `send_failed + rejected` descending and capped at the requested `limit` (default 50, max 200). Only messages carrying a failure reason appear: a `bird:` code is usually a rejection (never charged, never attempted), an `apple:` code a send failure; use the summary for the period's full accepted total. Rows use accepted-time attribution: a send failure recorded during the period for a message accepted earlier counts against the earlier period. Each row also carries `first_response` latency percentiles, when a failed reply claimed an unanswered inbound message. There is no delivery receipt on this channel, so there is no `delivered` count anywhere in the row.\n\nThis is a workspace-scoped, single-dimension breakdown; it does not cross error code with any other dimension such as business. The maximum window is 365 days; a longer range returns `422`. Historical dates are supported within the maximum window length; the requested dates are not shifted forward. A breakdown is already a single-dimension view and takes no dimension filter.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Must not be after `to`. Max window 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-06-14"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Max window 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-07-13"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum number of error-code rows to return, ranked by `send_failed + rejected` descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-error-code breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBStatsByErrorCodeResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/inbound/summary":{"get":{"operationId":"getAMBInboundStatsSummary","x-snippet-key":"amb.stats.inbound.summary","summary":"Get aggregate inbound Apple Messages for Business statistics","description":"Returns one aggregate row of inbound Apple Messages for Business counts for the requested period. Inbound statistics are attributed to when the event occurred, not to any earlier outbound message, so a reply received today counts against today regardless of when the conversation started. `period.data_as_of` is the freshness boundary the rollups have reached.\n\nThis channel has no delivery receipt and no derived rate; the response carries only the raw `received` count.\n\n`from` and `to` must both be calendar days or RFC 3339 instants. Day windows cover up to 365 whole days. Instant bounds round down to the hour, remain inclusive, and may span up to 720 hours. Mixing the forms returns `422`. Set `timezone` for local boundaries. Historical dates are supported within the maximum window length; the requested dates are not shifted forward.\n\nUse `compare=previous_period` to include the preceding equal-length window and the change between the two.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window: a calendar day (YYYY-MM-DD) or an RFC 3339 instant rounded down to the hour. The `timezone` parameter makes a calendar day local and rounds an instant down to the local hour. Omit `timezone` to use UTC. When `timezone` is set, a numeric UTC offset such as `+05:45` is rejected; use a calendar day or a `Z` (UTC) instant. This value must use the same form as `to`. When omitted, it defaults to 30 days before `to` for day windows or 168 hours (7 days) before `to` for hour windows.\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window: a calendar day (YYYY-MM-DD) or an RFC 3339 instant rounded down to the hour. The `timezone` parameter makes a calendar day local and rounds an instant down to the local hour. Omit `timezone` to use UTC. When `timezone` is set, a numeric UTC offset is rejected; use a calendar day or a `Z` (UTC) instant. This value must use the same form as `from`. When omitted, it defaults to today for day windows or the current hour for hour windows in that timezone. Day windows may not exceed 365 days; hour windows may not exceed 720 hours (30 days).\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"compare","in":"query","required":false,"description":"Set to `previous_period` to also include the same statistics for the immediately preceding window of equal length, plus the change between the two, so you can show \"+X% vs last period\" without a second request.\n","schema":{"$ref":"#/components/schemas/StatsComparePeriod"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Aggregate inbound summary for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBInboundStatsSummary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/inbound/daily":{"get":{"operationId":"getAMBInboundStatsDaily","x-snippet-key":"amb.stats.inbound.daily","summary":"Get daily inbound Apple Messages for Business statistics","description":"Returns one row of inbound Apple Messages for Business counts per calendar day for the workspace, gap-filled so a silent day is a zero row rather than a missing one. Every row is attributed to the day the inbound event occurred, not to any earlier outbound message.\n\nThis channel has no delivery receipt and no derived rate; each row carries only the raw `received` count.\n\n`from` and `to` are optional calendar days (YYYY-MM-DD), defaulting to the trailing 30 days. The maximum window is 365 days; a longer range returns `422`. Set `timezone` to report rows by your local calendar day. Historical dates are supported within the maximum window length; the requested dates are not shifted forward.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). The window may not exceed 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). The window may not exceed 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Daily inbound series for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBInboundStatsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/inbound/hourly":{"get":{"operationId":"getAMBInboundStatsHourly","x-snippet-key":"amb.stats.inbound.hourly","summary":"Get hourly inbound Apple Messages for Business statistics","description":"Returns one row of inbound Apple Messages for Business counts per hour, gap-filled so a silent hour is a zero row rather than a missing one. Every row is attributed to the hour the inbound event occurred, not to any earlier outbound message. Use it where the daily grain hides the shape; a window spans at most 720 hours (30 days), and for anything longer use the daily endpoint.\n\nThis channel has no delivery receipt and no derived rate; each row carries only the raw `received` count.\n\n`from` and `to` are optional RFC 3339 instants, defaulting to the trailing 168 hours; each bound rounds down to the hour and remains inclusive. A request may span up to 30 days (720 rows). An excessive or reversed window returns `422`. Set `timezone` for local hours instead of UTC, including zones with sub-hour offsets; when the timezone's offset is not a whole number of hours, rows are read from finer-grained internal rollups and combined into hour boundaries automatically, with no parameter to select this. Historical dates are supported within the maximum window length; the requested dates are not shifted forward.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start of the window (RFC 3339 instant), rounded down to the start of its hour and included. The boundary uses the local hour when `timezone` is set and the UTC hour otherwise. The window may not exceed 30 days (720 hours). Defaults to 168 hours (7 days) before `to` when omitted.","schema":{"type":"string","format":"date-time","minLength":1,"example":"2026-05-25T00:00:00Z"}},{"name":"to","in":"query","required":false,"description":"End of the window (RFC 3339 instant), rounded down to the start of its hour and included. The boundary uses the local hour when `timezone` is set and the UTC hour otherwise, so both bounds are inclusive. The window may not exceed 30 days (720 hours). Defaults to the current hour when omitted.","schema":{"type":"string","format":"date-time","minLength":1,"example":"2026-05-25T23:59:59Z"}},{"$ref":"#/components/parameters/StatsTimezone"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Hourly inbound series for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBInboundStatsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/inbound/businesses":{"get":{"operationId":"getAMBInboundStatsByBusiness","x-snippet-key":"amb.stats.inbound.by_business","summary":"Get inbound Apple Messages for Business statistics by business","description":"Returns inbound received counts grouped by business, for the requested period. Rows are ranked by received volume descending and capped at the requested `limit` (default 50, max 200). Rows are attributed to when the inbound event occurred, not to any earlier outbound message. This channel has no delivery receipt and no derived rate, so each row carries only the raw `received` count.\n\nThe maximum window is 365 days; a longer range returns `422`. Historical dates are supported within the maximum window length; the requested dates are not shifted forward. A breakdown is already a single-dimension view and takes no dimension filter; to restrict statistics to a single business, use the inbound summary, daily, or hourly statistics instead.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Must not be after `to`. Max window 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-06-14"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Max window 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-07-13"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum number of business rows to return, ranked by received volume descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-business inbound breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBInboundStatsByBusinessResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/inbound/intents":{"get":{"operationId":"getAMBInboundStatsByIntent","x-snippet-key":"amb.stats.inbound.by_intent","summary":"Get inbound Apple Messages for Business statistics by intent","description":"Returns inbound received counts grouped by entry-point intent, for the requested period. Rows are ranked by received volume descending and capped at the requested `limit` (default 50, max 200). Intents are workspace-defined strings configured on the business's entry points and have no fixed vocabulary. Rows are attributed to when the inbound event occurred, not to any earlier outbound message. This channel has no delivery receipt and no derived rate, so each row carries only the raw `received` count.\n\nThe maximum window is 365 days; a longer range returns `422`. Historical dates are supported within the maximum window length; the requested dates are not shifted forward. A breakdown is already a single-dimension view and takes no dimension filter; to restrict statistics to a single intent, use the inbound summary, daily, or hourly statistics instead.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Must not be after `to`. Max window 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-06-14"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window, a calendar day (YYYY-MM-DD). Interpreted in `timezone`, or UTC when omitted. Max window 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-07-13"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"limit","in":"query","required":false,"description":"Maximum number of intent rows to return, ranked by received volume descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-intent inbound breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBInboundStatsByIntentResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/conversations/summary":{"get":{"operationId":"getAMBConversationStatsSummary","x-snippet-key":"amb.stats.conversations.summary","summary":"Get aggregate Apple Messages for Business conversation statistics","description":"Returns one aggregate row of Apple Messages for Business conversation lifecycle counts (`started`, `reopened`, `closed`, `conversations`) for the requested period. Rows are attributed to when the lifecycle event occurred, not to any earlier outbound message. A conversation can be reopened and closed more than once, so `started`, `reopened`, and `closed` need not sum to `conversations`, and any one of them can exceed it. `period.data_as_of` is the freshness boundary the rollups have reached.\n\n`from` and `to` must both be calendar days or RFC 3339 instants. Day windows cover up to 365 whole days. Instant bounds round down to the hour, remain inclusive, and may span up to 720 hours. Mixing the forms returns `422`. Set `timezone` for local boundaries. Historical dates are supported within the maximum window length; the requested dates are not shifted forward.\n\nUse `compare=previous_period` to include the preceding equal-length window and the change between the two.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window: a calendar day (YYYY-MM-DD) or an RFC 3339 instant rounded down to the hour. The `timezone` parameter makes a calendar day local and rounds an instant down to the local hour. Omit `timezone` to use UTC. When `timezone` is set, a numeric UTC offset such as `+05:45` is rejected; use a calendar day or a `Z` (UTC) instant. This value must use the same form as `to`. When omitted, it defaults to 30 days before `to` for day windows or 168 hours (7 days) before `to` for hour windows.\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window: a calendar day (YYYY-MM-DD) or an RFC 3339 instant rounded down to the hour. The `timezone` parameter makes a calendar day local and rounds an instant down to the local hour. Omit `timezone` to use UTC. When `timezone` is set, a numeric UTC offset is rejected; use a calendar day or a `Z` (UTC) instant. This value must use the same form as `from`. When omitted, it defaults to today for day windows or the current hour for hour windows in that timezone. Day windows may not exceed 365 days; hour windows may not exceed 720 hours (30 days).\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"compare","in":"query","required":false,"description":"Set to `previous_period` to also include the same statistics for the immediately preceding window of equal length, plus the change between the two, so you can show \"+X% vs last period\" without a second request.\n","schema":{"$ref":"#/components/schemas/StatsComparePeriod"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Aggregate conversation summary for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBConversationStatsSummary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/conversations/daily":{"get":{"operationId":"getAMBConversationStatsDaily","x-snippet-key":"amb.stats.conversations.daily","summary":"Get daily Apple Messages for Business conversation statistics","description":"Returns one row of Apple Messages for Business conversation lifecycle counts (`started`, `reopened`, `closed`, `conversations`) per calendar day for the workspace, gap-filled so a silent day is a zero row rather than a missing one. Every row is attributed to the day the lifecycle event occurred, not to any earlier outbound message. A conversation can be reopened and closed more than once, so `started`, `reopened`, and `closed` need not sum to `conversations` within a row, and any one of them can exceed it.\n\n`from` and `to` are optional calendar days (YYYY-MM-DD), defaulting to the trailing 30 days. The maximum window is 365 days; a longer range returns `422`. Set `timezone` to report rows by your local calendar day. Historical dates are supported within the maximum window length; the requested dates are not shifted forward.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). The window may not exceed 365 days. Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). The window may not exceed 365 days. Defaults to today in that timezone when omitted.","schema":{"type":"string","format":"date","minLength":1,"example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Daily conversation series for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBConversationStatsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/stats/conversations/hourly":{"get":{"operationId":"getAMBConversationStatsHourly","x-snippet-key":"amb.stats.conversations.hourly","summary":"Get hourly Apple Messages for Business conversation statistics","description":"Returns one row of Apple Messages for Business conversation lifecycle counts (`started`, `reopened`, `closed`, `conversations`) per hour, gap-filled so a silent hour is a zero row rather than a missing one. Every row is attributed to the hour the lifecycle event occurred, not to any earlier outbound message. A conversation can be reopened and closed more than once, so `started`, `reopened`, and `closed` need not sum to `conversations` within a row, and any one of them can exceed it. Use it where the daily grain hides the shape; a window spans at most 720 hours (30 days), and for anything longer use the daily endpoint.\n\n`from` and `to` are optional RFC 3339 instants, defaulting to the trailing 168 hours; each bound rounds down to the hour and remains inclusive. A request may span up to 30 days (720 rows). An excessive or reversed window returns `422`. Set `timezone` for local hours instead of UTC, including zones with sub-hour offsets; when the timezone's offset is not a whole number of hours, rows are read from finer-grained internal rollups and combined into hour boundaries automatically, with no parameter to select this. Historical dates are supported within the maximum window length; the requested dates are not shifted forward.\n","tags":["amb-stats"],"x-audiences":["dashboard","public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start of the window (RFC 3339 instant), rounded down to the start of its hour and included. The boundary uses the local hour when `timezone` is set and the UTC hour otherwise. The window may not exceed 30 days (720 hours). Defaults to 168 hours (7 days) before `to` when omitted.","schema":{"type":"string","format":"date-time","minLength":1,"example":"2026-05-25T00:00:00Z"}},{"name":"to","in":"query","required":false,"description":"End of the window (RFC 3339 instant), rounded down to the start of its hour and included. The boundary uses the local hour when `timezone` is set and the UTC hour otherwise, so both bounds are inclusive. The window may not exceed 30 days (720 hours). Defaults to the current hour when omitted.","schema":{"type":"string","format":"date-time","minLength":1,"example":"2026-05-25T23:59:59Z"}},{"$ref":"#/components/parameters/StatsTimezone"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Hourly conversation series for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBConversationStatsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/templates":{"get":{"operationId":"listAMBTemplates","x-snippet-key":"amb.templates.list","summary":"List Apple Messages templates","description":"Returns Apple Messages templates as a cursor-paginated list. The workspace's templates\ncome first, newest first, followed by our built-in templates by default.\nSet `order=asc` to reverse this order.\n\nFilter by scope, category, status, content kind, or language. Use `q` for a\ncase-insensitive substring match against slug, name, and description. The\nresponse is shallow; read a version to retrieve its content and variables.\n","tags":["amb-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"scope","in":"query","required":false,"description":"Filter by who owns the template. Use `system` for built-in templates and `workspace` for templates your workspace created.","schema":{"$ref":"#/components/schemas/TemplateScope"}},{"name":"category","in":"query","required":false,"description":"Return templates in this category.","schema":{"$ref":"#/components/schemas/AMBTemplateCategory"}},{"name":"status","in":"query","required":false,"description":"Return templates with this lifecycle status.","schema":{"$ref":"#/components/schemas/TemplateStatus"}},{"name":"content_kind","in":"query","required":false,"description":"Return templates whose live or draft content is this kind.","schema":{"$ref":"#/components/schemas/AMBContentKind"}},{"name":"language","in":"query","required":false,"description":"Return templates whose published content contains this language, after the tag is canonicalized. Draft-only languages do not match.","schema":{"$ref":"#/components/schemas/LanguageTag"}},{"name":"q","in":"query","required":false,"description":"A case-insensitive substring search across slug, name, and description.","schema":{"type":"string","minLength":1}},{"name":"sort","in":"query","required":false,"description":"Field to sort by.","schema":{"$ref":"#/components/schemas/AMBTemplateSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of Apple Messages templates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBTemplateList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/templates/{template_ref}":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's ID (`amt_…`) or slug. Built-in templates use a `bird_` slug. Write operations accept workspace templates because built-in templates are read-only.\n","schema":{"type":"string","minLength":1,"maxLength":63},"example":"bird_otp_verification"}],"get":{"operationId":"getAMBTemplate","x-snippet-key":"amb.templates.get","summary":"Get an Apple Messages template","description":"Returns one Apple Messages template's metadata, policies, language states, draft revision, and draft and live version IDs. The response is shallow; read a version to retrieve content and variables. An unknown or deleted template returns `404`.\n","tags":["amb-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The requested Apple Messages template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBTemplate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/templates/{template_ref}/versions":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's ID (`amt_…`) or slug.","schema":{"type":"string","minLength":1,"maxLength":63},"example":"order-shipped"}],"get":{"operationId":"listAMBTemplateVersions","x-snippet-key":"amb.templates.versions.list","summary":"List an Apple Messages template's versions","description":"Returns a cursor-paginated version history, newest first. Each entry is shallow and names its variables and languages. Read a version item or one of its languages to retrieve text. A built-in template exposes its current catalogue content as one synthetic published version.\n","tags":["amb-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"sort","in":"query","required":false,"description":"Field to sort by.","schema":{"$ref":"#/components/schemas/AMBTemplateSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of template versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBTemplateVersionList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/templates/{template_ref}/versions/{version_id}":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's ID (`amt_…`) or slug.","schema":{"type":"string","minLength":1,"maxLength":63},"example":"order-shipped"},{"name":"version_id","in":"path","required":true,"description":"The version to read or reset.","schema":{"$ref":"#/components/schemas/AMBTemplateVersionID"}}],"get":{"operationId":"getAMBTemplateVersion","x-snippet-key":"amb.templates.versions.get","summary":"Get an Apple Messages template version","description":"Returns one version with its variables and text in every language. A workspace draft is editable, while published workspace versions are immutable. A built-in template exposes its current catalogue content through a synthetic published version.\n","tags":["amb-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The requested Apple Messages template version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBTemplateVersion"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/templates/{template_ref}/versions/{version_id}/languages":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's ID (`amt_…`) or slug.","schema":{"type":"string","minLength":1,"maxLength":63},"example":"order-shipped"},{"name":"version_id","in":"path","required":true,"description":"The version whose languages to list.","schema":{"$ref":"#/components/schemas/AMBTemplateVersionID"}}],"get":{"operationId":"listAMBTemplateVersionLanguages","x-snippet-key":"amb.templates.versions.languages.list","summary":"List an Apple Messages template version's languages","description":"Returns the languages a version holds, ordered by canonical language tag, without their text. Each summary includes the revision and content hash needed to detect changes. A version holds at most 25 languages.\n","tags":["amb-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The version's language summaries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBTemplateLanguageList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/amb/templates/{template_ref}/versions/{version_id}/languages/{language}":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's ID (`amt_…`) or slug.","schema":{"type":"string","minLength":1,"maxLength":63},"example":"order-shipped"},{"name":"version_id","in":"path","required":true,"description":"The version that holds the language.","schema":{"$ref":"#/components/schemas/AMBTemplateVersionID"}},{"name":"language","in":"path","required":true,"description":"The language as a BCP-47 tag. Case and separator differences are accepted and canonicalized.","schema":{"$ref":"#/components/schemas/LanguageTag"},"example":"pt-BR"}],"get":{"operationId":"getAMBTemplateVersionLanguage","x-snippet-key":"amb.templates.versions.languages.get","summary":"Get an Apple Messages template version's language","description":"Returns one language's full text, revision, content hash, and update time. The response echoes the language in its canonical BCP-47 form.\n","tags":["amb-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The requested language and its text.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AMBTemplateLanguage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/business-accounts":{"get":{"operationId":"listWhatsAppBusinessAccounts","x-snippet-key":"whatsapp.business_accounts.list","summary":"List WhatsApp Business Accounts","description":"Returns a paginated list of the WhatsApp Business Accounts your workspace has\nconnected, so you can choose which one a template belongs to. Only accounts\nwhose setup finished are listed: an account appears once WhatsApp has reported\nits name and at least one of its phone numbers has finished connecting. Page through the\nfull set with the cursors the response returns.\n\nEach account also carries the state WhatsApp last reported for it. That covers\nits own status, how far WhatsApp's review of it has got, whether Meta has\nverified the business behind it, the Meta business portfolio that owns it, and\n`ban` on an account WhatsApp has banned. These are the same fields\n[Get a WhatsApp Business Account](/docs/api/reference/get-whatsapp-business-account)\nreturns, and that operation documents them.\n","tags":["whatsapp-business-accounts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"sort","in":"query","required":false,"description":"Field to sort by.","schema":{"$ref":"#/components/schemas/WhatsAppBusinessAccountSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of the WhatsApp Business Accounts your workspace has connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppBusinessAccountList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/business-accounts/{business_account_ref}":{"parameters":[{"$ref":"#/components/parameters/WhatsAppBusinessAccountRef"}],"get":{"operationId":"getWhatsAppBusinessAccount","x-snippet-key":"whatsapp.business_accounts.get","summary":"Get a WhatsApp Business Account","description":"Returns one WhatsApp Business Account your workspace has connected, addressed\nby either the `id` the account list reports (`waa_` prefix) or the `waba` value\nWhatsApp reports for it. Both forms resolve to the same account.\n\nOnly accounts whose setup finished can be read: an account is readable once\nWhatsApp has reported its name and at least one of its phone numbers has\nfinished connecting. An account the list hides is `404` here too, in either form.\n\nThe account carries the state WhatsApp last reported for it: its own status,\nhow far WhatsApp's review of it has got, whether Meta has verified the\nbusiness behind it, and the Meta business portfolio that owns it.\n\nAn account WhatsApp has banned carries `ban`, with an `appeal_url` to Meta Business\nSupport once Bird knows the account's portfolio. `ban` is what WhatsApp announced on\nits own notification, not part of the reading `meta_synced_at` dates, because WhatsApp\nreports a ban's state and timing nowhere else. It is absent on an account in good\nstanding and on one whose ban Bird was never told about, so `meta_health_status` is\nwhat says whether an account can send.\n","tags":["whatsapp-business-accounts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"responses":{"200":{"description":"The WhatsApp Business Account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppBusinessAccount"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/business-accounts/{business_account_ref}/reach-estimate":{"parameters":[{"$ref":"#/components/parameters/WhatsAppBusinessAccountRef"}],"get":{"operationId":"getWhatsAppBusinessAccountReachEstimate","summary":"Estimate marketing reach for a maximum price","description":"Returns Meta's estimate of how many marketing deliveries, and at what cost,\neach candidate maximum price would have won over `window`. Use it to choose\na template language's `optimization_spec.bid_amount`.\n\nEvery amount is per 1,000 deliveries, in the smallest unit of\n`currency_code`. Estimates come from Meta's recent auctions and are not a\nguarantee. Bird asks Meta on every request and stores nothing.\n\nMeta estimates one country per request, so `countries` takes exactly one;\nrequest each country separately. A country that does not support a\nmaximum price fails with E15090.\n","tags":["whatsapp-business-accounts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"countries","in":"query","required":true,"description":"The recipients' country, as an ISO 3166-1 alpha-2 code. Exactly one, because Meta refuses an estimate for more than one country.","schema":{"type":"array","minItems":1,"maxItems":1,"items":{"$ref":"#/components/schemas/CountryCode"}},"example":["BR"]},{"name":"window","in":"query","required":false,"description":"The days of recent auctions the estimate is based on, ending now. Omit it to use the last 7 days.","schema":{"$ref":"#/components/schemas/WhatsAppReachEstimateWindow"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Meta's estimate per candidate bid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppReachEstimate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp"]}},"/v1/whatsapp/suppressions":{"get":{"operationId":"listWhatsAppSuppressions","summary":"List WhatsApp suppressions","description":"Returns the suppressions currently stopping your messages, most recent first by `effective_at`. Pass `address` to look up one recipient before messaging them, and `waba` to narrow to one business account.\n\nA suppression covers one address for one business account, or for every account in the workspace when `waba` is null. Filtering by `waba` returns that account's suppressions together with the workspace-wide ones that stop it too.\n\nEnded suppressions are excluded; fetch one by ID to read it. An empty result does not mean the address is reachable: another suppression scope, a newer suppression, or the recipient's WhatsApp preferences (such as a STOP) can still refuse a send.\n","tags":["whatsapp-suppressions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"whatsapp.suppressions.list","parameters":[{"name":"address","in":"query","required":false,"description":"Return only suppressions for this exact address: a phone number in E.164 form or a business-scoped user ID. A phone number is matched in its canonical form, so spacing and punctuation do not matter. Prefix matching is unsupported.\n","schema":{"type":"string","minLength":1},"example":"+5511977670804"},{"name":"waba","in":"query","required":false,"description":"Return only suppressions covering this WhatsApp Business Account, identified by its WhatsApp-issued account ID or by the `waa_` ID Bird gives it, including the workspace-wide ones that stop it too. Omit for every account in the workspace.\n","schema":{"type":"string","minLength":1},"example":"102290129340398"},{"name":"reason","in":"query","required":false,"description":"Return only suppressions with this reason:\n\n- `manual`: Added through the API or dashboard.\n","schema":{"$ref":"#/components/schemas/WhatsAppSuppressionReasonFilter"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of suppressions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppSuppressionList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createWhatsAppSuppression","summary":"Create a WhatsApp suppression","description":"Stops messages to a WhatsApp address, with reason `manual`, blocking every message category. Set `waba` to stop the address for one business account, or omit it to stop the address for every account in the workspace. The account must be one of yours; another workspace's account returns `404`.\n\nAdding is idempotent. A `201` means a new suppression was recorded, and a `200` means a `manual` one for that address and scope was already in place and is returned with `last_asserted_at` moved to this call, nothing else changed. The same address stopped for one account and for the whole workspace is two records.\n","tags":["whatsapp-suppressions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"whatsapp.suppressions.add","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppSuppressionCreate"},"example":{"address":"+5511977670804"}}}},"responses":{"200":{"description":"A manual suppression for this address and scope was already in place. It is returned with `last_asserted_at` moved to this call; nothing else changes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppSuppression"}}}},"201":{"description":"Suppression created.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppSuppression"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/suppressions/{suppression_id}":{"parameters":[{"name":"suppression_id","in":"path","required":true,"description":"ID of the WhatsApp suppression record to retrieve or end.","schema":{"$ref":"#/components/schemas/WhatsAppSuppressionID"},"example":"was_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"getWhatsAppSuppression","summary":"Get a WhatsApp suppression","description":"Returns the suppression record for the given ID, including one that has already ended. An ended record keeps its dates and reports when and how it ended.\n","tags":["whatsapp-suppressions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"whatsapp.suppressions.get","responses":{"200":{"description":"The suppression record for the requested ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppSuppression"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteWhatsAppSuppression","summary":"End a WhatsApp suppression","description":"Ends the suppression, so the address can be messaged again. The record itself is kept and stays readable by ID, reporting when it ended. Dropping it from the list does not destroy the history of what was suppressed when. Only suppressions you added yourself, which carry reason `manual`, can be ended: a recipient's own opt-out is theirs to reverse, and attempts to end one return `422`. Calling this again on a suppression that has already ended succeeds and changes nothing; an ID that does not exist still returns 404. To end one by address, first look up the ID with [List WhatsApp suppressions](/docs/api/reference/list-whatsapp-suppressions).\n","tags":["whatsapp-suppressions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"whatsapp.suppressions.remove","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Suppression ended."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/keyword-rules":{"get":{"operationId":"listWhatsAppKeywordRules","x-snippet-key":"whatsapp.keyword_rules.list","summary":"List WhatsApp keyword rules","description":"Returns the keyword rules that apply to inbound messages, most specific first. Bird's own rules are included, so opt-out and opt-in work on every inbound-capable number before you configure anything. A rule of yours with no `waba` replaces Bird's rule for the same operation and country, so that Bird rule is left out and yours carries its keywords in `effective_keywords`.\n\nUse the filters to narrow the full, unpaginated list. Set `scope=system` for Bird's rules only, including the ones yours replace, or `scope=workspace` for the ones you created.\n","tags":["whatsapp-keyword-rules"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"country","in":"query","required":false,"description":"Keep only rules that apply to someone messaging from this country, as an ISO 3166-1 alpha-2 code. Omit for every rule, whichever country it covers.\n","schema":{"type":"string","minLength":2,"maxLength":2,"example":"US"}},{"name":"waba","in":"query","required":false,"description":"Keep only the rules that apply to this WhatsApp Business Account of yours, identified by its WhatsApp-issued account ID or by the `waa_` ID Bird gives it. Either form finds the same rules.\n","schema":{"type":"string","example":"102290129340398"}},{"name":"operation","in":"query","required":false,"description":"Keep only rules for this operation. Omit for all of them. Open on the same terms as the response, so an operation Bird gains later can be filtered for without a client update; one Bird does not answer matches nothing rather than failing.\n","schema":{"$ref":"#/components/schemas/WhatsAppKeywordOperation"}},{"name":"scope","in":"query","required":false,"description":"Keep only Bird's own rules (`system`) or only the rules you created (`workspace`). Omit for both, in which case a Bird rule that one of yours replaces is left out.\n","schema":{"$ref":"#/components/schemas/WhatsAppKeywordRuleScope"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The keyword rules that apply to your workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppKeywordRuleList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createWhatsAppKeywordRule","x-snippet-key":"whatsapp.keyword_rules.create","summary":"Create a WhatsApp keyword rule","description":"Creates a keyword rule. Use it to replace the reply Bird sends for `opt_out` or `opt_in`, or to add keywords your customers actually type.\n\nYour rule takes precedence over Bird's at the same grain and keeps Bird's keywords, so replacing a reply takes two fields. Set `excluded_keywords` to remove some of Bird's for the people the rule covers: when this rule is the first to match, a message that is exactly one of them opts no one in or out and gets no reply. A keyword Bird has bound to one operation cannot be reused for the other.\n","tags":["whatsapp-keyword-rules"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppKeywordRuleCreate"}}}},"responses":{"201":{"description":"The created rule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppKeywordRule"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/whatsapp/keyword-rules/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"ID of the keyword rule, as returned by the list operation. Bird's own rules and yours share one ID space.","schema":{"$ref":"#/components/schemas/WhatsAppKeywordRuleID"}}],"get":{"operationId":"getWhatsAppKeywordRule","x-snippet-key":"whatsapp.keyword_rules.get","summary":"Get a WhatsApp keyword rule","description":"Returns one keyword rule, either one of Bird's own or one you created, with its `effective_keywords` and the reply it sends.\n","tags":["whatsapp-keyword-rules"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The keyword rule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppKeywordRule"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateWhatsAppKeywordRule","x-snippet-key":"whatsapp.keyword_rules.update","summary":"Update a WhatsApp keyword rule","description":"Changes the reply, the added keywords or the excluded keywords of a rule you created. Bird's own rules cannot be changed. To replace one, create a rule with the same operation and country and yours takes precedence.\n\nWhat the rule applies to is fixed once created, so this changes the reply and the keywords only.\n","tags":["whatsapp-keyword-rules"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppKeywordRuleUpdate"}}}},"responses":{"200":{"description":"The updated rule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppKeywordRule"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteWhatsAppKeywordRule","x-snippet-key":"whatsapp.keyword_rules.delete","summary":"Delete a WhatsApp keyword rule","description":"Deletes a rule you created. The next rule in the ladder answers that scope straight away with its own keywords; the keywords the deleted rule added or excluded go with it, and a word only that rule matched stops meaning anything. Which rule answers next is not always one of yours: the order runs from your rule for an account and country, through your rule for the account, your rule for the country, Bird's rule for the sender's country, your worldwide rule, and finally Bird's worldwide one. So deleting your rule for a country hands the scope to Bird's rule for that country before your own worldwide rule. List the rules to read the order for your workspace. Bird's own rules cannot be deleted.\n","tags":["whatsapp-keyword-rules"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The rule was deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbox-insights/placement":{"get":{"x-snippet-key":"email.inboxInsights.placement","operationId":"getEmailInboxInsightsPlacement","summary":"Get inbox placement for a sending domain","description":"Returns where a sending domain's measured mail landed over the period\n(inbox or spam): the domain-wide rates, a per-provider table, a time\nseries, the Gmail tab split, and optionally per-IP detail for the domain's\nsending infrastructure.\n\nPlacement figures are estimates from a measurement panel of real\nmailboxes. Every rate is a percentage of measured placements, never of\ndelivered volume, and the domain-wide summary is weighted against the\naudience mix described in `measurement`, so it can legitimately differ\nfrom any single provider row. Delta fields appear only when the request\nasks for a comparison and the prior period has data. Without a requested\ncomparison or comparable prior data they are absent, not zero change.\n\nThe series is sparse: buckets with no measured placement are omitted, not\nreturned as zeros, so charts index by date rather than by position. Each\nsection carries its own status, and a successful response never implies\nevery section is populated.\n","tags":["email-inbox-insights"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"sending_domain","in":"query","required":true,"description":"The sending domain to report on: one of the workspace's verified sending domains, exactly as it appears there. A domain that is not verified in this workspace answers not-found.\n","schema":{"type":"string","minLength":1,"example":"mail.acme.com"}},{"name":"from","in":"query","required":false,"description":"First UTC day of the period, inclusive, in YYYY-MM-DD: the same window\nconvention as the email statistics endpoints, so figures from the two\nsources cover the same days. Defaults to 30 days before `to`.\n\nIt may be at most 30 days before `to`, which is also the default, so a\nrequest naming neither date is already at the limit. Asking for more\nanswers `422`: the page pairs these figures with Bird's own per-provider\nsending statistics, and those are kept for 30 days, so a longer period\ncould only describe two different spans side by side.\n","schema":{"type":"string","format":"date","example":"2026-07-19"}},{"name":"to","in":"query","required":false,"description":"Last UTC day of the period, inclusive, in YYYY-MM-DD. Defaults to today.","schema":{"type":"string","format":"date","example":"2026-08-17"}},{"name":"group_by","in":"query","required":false,"description":"Bucket size for the series. Defaults to day.","schema":{"$ref":"#/components/schemas/EmailInboxInsightsGroupBy"}},{"name":"compare","in":"query","required":false,"description":"Include the prior equal-length period, populating `compared_to` and every delta field.\n","schema":{"$ref":"#/components/schemas/EmailInboxInsightsCompare"}},{"name":"series_providers","in":"query","required":false,"description":"Providers to break the series down by, named as the provider table names them. Each named provider adds one series line; without this, the series carries the domain-wide line only. The provider table is never filtered by this parameter.\n","schema":{"type":"array","maxItems":10,"items":{"type":"string","minLength":1},"example":["gmail","yahoo"]}},{"name":"include_ip_details","in":"query","required":false,"description":"Include per-IP placement detail for the domain's sending infrastructure. Off by default; only the sending-infrastructure view needs it.\n","schema":{"type":"boolean","default":false}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Placement for the requested domain and period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInboxInsightsPlacement"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbox-insights/authentication":{"get":{"x-snippet-key":"email.inboxInsights.authentication","operationId":"getEmailInboxInsightsAuthentication","summary":"Get email authentication standing for a sending domain","description":"Returns whether the domain's mail authenticates and who sends as the\ndomain: SPF and DKIM pass rates, the DMARC standing with its published\npolicy and a conservative ready-for-reject judgement, and a per-source\ntable showing every system observed sending under the domain's name,\nforwarders and unidentified senders included.\n\nThe DMARC figures name their source: authoritative aggregate reporting\nthat covers every sender, or Google Postmaster as a fallback covering\nonly mail Google received. Aggregate reports arrive on reporters' own\nschedules, routinely a day or more behind, so the source table names its\nlatest included day; label from it rather than reading the newest days'\nsparseness as a regression. For a domain with neither reporting source\nconfigured, sections report `not_configured` with a setup path, not an\nerror.\n","tags":["email-inbox-insights"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"sending_domain","in":"query","required":true,"description":"The sending domain to report on: one of the workspace's verified sending domains, exactly as it appears there. A domain that is not verified in this workspace answers not-found.\n","schema":{"type":"string","minLength":1,"example":"mail.acme.com"}},{"name":"from","in":"query","required":false,"description":"First UTC day of the period, inclusive, in YYYY-MM-DD: the same window\nconvention as the email statistics endpoints. Defaults to 30 days\nbefore `to`.\n\nIt may be at most 30 days before `to`, which is also the default, so a\nrequest naming neither date is already at the limit. Asking for more\nanswers `422`: the page pairs these figures with Bird's own per-provider\nsending statistics, and those are kept for 30 days, so a longer period\ncould only describe two different spans side by side.\n","schema":{"type":"string","format":"date","example":"2026-07-19"}},{"name":"to","in":"query","required":false,"description":"Last UTC day of the period, inclusive, in YYYY-MM-DD. Defaults to today.","schema":{"type":"string","format":"date","example":"2026-08-17"}},{"name":"compare","in":"query","required":false,"description":"Include the prior equal-length period, populating `compared_to`.","schema":{"$ref":"#/components/schemas/EmailInboxInsightsCompare"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Authentication standing for the requested domain and period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInboxInsightsAuthentication"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbox-insights/complaints":{"get":{"x-snippet-key":"email.inboxInsights.complaints","operationId":"getEmailInboxInsightsComplaints","summary":"Get the Google-reported spam rate for a sending domain","description":"Returns how often the domain's mail is reported as spam by Gmail\nrecipients, as Google Postmaster measures it: the rate for the period and\na time series for charting.\n\nThis is Google's number for Gmail-received mail only. The feedback-loop\ncomplaint rate across all providers is a Bird-measured figure served by\nthe email statistics endpoints; the two count different mail and are\nrendered as separate lines, never combined. For a domain without a\ncompleted Google Postmaster connection, sections report `not_configured`\nwith a setup path, not an error.\n","tags":["email-inbox-insights"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"sending_domain","in":"query","required":true,"description":"The sending domain to report on: one of the workspace's verified sending domains, exactly as it appears there. A domain that is not verified in this workspace answers not-found.\n","schema":{"type":"string","minLength":1,"example":"mail.acme.com"}},{"name":"from","in":"query","required":false,"description":"First UTC day of the period, inclusive, in YYYY-MM-DD: the same window\nconvention as the email statistics endpoints. Defaults to 30 days\nbefore `to`.\n\nIt may be at most 30 days before `to`, which is also the default, so a\nrequest naming neither date is already at the limit. Asking for more\nanswers `422`: the page pairs these figures with Bird's own per-provider\nsending statistics, and those are kept for 30 days, so a longer period\ncould only describe two different spans side by side.\n","schema":{"type":"string","format":"date","example":"2026-07-19"}},{"name":"to","in":"query","required":false,"description":"Last UTC day of the period, inclusive, in YYYY-MM-DD. Defaults to today.","schema":{"type":"string","format":"date","example":"2026-08-17"}},{"name":"group_by","in":"query","required":false,"description":"Bucket size for the series. Defaults to day.","schema":{"$ref":"#/components/schemas/EmailInboxInsightsGroupBy"}},{"name":"compare","in":"query","required":false,"description":"Include the prior equal-length period, populating `compared_to` and the rate's delta.\n","schema":{"$ref":"#/components/schemas/EmailInboxInsightsCompare"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The Google-reported spam rate for the requested domain and period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInboxInsightsComplaints"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbox-insights/spam-traps":{"get":{"x-snippet-key":"email.inboxInsights.spamTraps","operationId":"getEmailInboxInsightsSpamTraps","summary":"Get spam-trap hits for a sending domain","description":"Returns the spam-trap hits recorded against a sending domain over the\nperiod: the total, a split by the kind of trap, a split by the trap\nnetwork that observed them, and the individual hits with the sending IP\nand trap age behind each.\n\nSpam traps are addresses that exist only to catch senders mailing lists\nthey should not be mailing, so the kind of trap says more than the count.\nHits on pristine traps, which never belonged to a real person, point at\nharvested or guessed addresses; hits on recycled traps point at stale list\ndata. Zero hits is a measured zero and a good result, so the totals are\nreal figures rather than an empty state.\n","tags":["email-inbox-insights"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"sending_domain","in":"query","required":true,"description":"The sending domain to report on: one of the workspace's verified sending domains, exactly as it appears there. A domain that is not verified in this workspace answers not-found.\n","schema":{"type":"string","minLength":1,"example":"mail.acme.com"}},{"name":"from","in":"query","required":false,"description":"First UTC day of the period, inclusive, in YYYY-MM-DD: the same window\nconvention as the email statistics endpoints. Defaults to 30 days\nbefore `to`.\n\nIt may be at most 30 days before `to`, which is also the default, so a\nrequest naming neither date is already at the limit. Asking for more\nanswers `422`: the page pairs these figures with Bird's own per-provider\nsending statistics, and those are kept for 30 days, so a longer period\ncould only describe two different spans side by side.\n","schema":{"type":"string","format":"date","example":"2026-07-19"}},{"name":"to","in":"query","required":false,"description":"Last UTC day of the period, inclusive, in YYYY-MM-DD. Defaults to today.","schema":{"type":"string","format":"date","example":"2026-08-17"}},{"name":"compare","in":"query","required":false,"description":"Include the prior equal-length period, populating `compared_to` and `delta`.\n","schema":{"$ref":"#/components/schemas/EmailInboxInsightsCompare"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Spam-trap hits for the requested domain and period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInboxInsightsSpamTraps"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbox-insights/blocklists":{"get":{"x-snippet-key":"email.inboxInsights.blocklists","operationId":"getEmailInboxInsightsBlocklists","summary":"Check whether a sending domain's infrastructure is blocklisted","description":"Checks the sending IPs behind a sending domain against the blocklists\nreceivers consult, and returns what is listed now plus the listings seen\nrecently against each target. The vendor's default target selection includes\nIPs seen sending in the last 30 days and the domain itself. The returned\ntargets and their statuses describe the coverage of this lookup; an empty\ntarget list does not establish that the domain or its IPs are clear.\nThe 30-day period selects targets; listing status reflects the current lookup.\n\nThe check runs when the request is made, so this is a live lookup rather\nthan a measurement over a period: there is no window, and only the\nfreshness lag hint applies. Providers that publish several lists are\nreported per list, because what a listing means and how it is cleared\ndiffer between them.\n\nEach target is looked up separately, so one can fail while the rest\nsucceed. A target nobody managed to check comes back with its `status`\nreporting that and its `checked_at` null, rather than as a target that\ncame back clear. `active_count` is null when the lookup service supplies no\ncount; do not treat null as zero. Zero does not establish complete coverage:\ninspect the returned targets and their statuses. A `503` means Bird\ncould not reach the lookup service at all, which is a different answer from\na lookup that ran and reported nothing.\n","tags":["email-inbox-insights"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"sending_domain","in":"query","required":true,"description":"The sending domain to check: one of the workspace's verified sending domains, exactly as it appears there. Inspect the returned targets and their statuses for lookup coverage. A domain that is not verified in this workspace answers not-found.\n","schema":{"type":"string","minLength":1,"example":"mail.acme.com"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Blocklist standing for the requested domain's sending infrastructure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInboxInsightsBlocklists"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbox-insights/benchmarks/industry":{"get":{"x-snippet-key":"email.inboxInsights.benchmarks.industry","operationId":"getEmailInboxInsightsIndustryBenchmark","summary":"Get the industry placement benchmark for a sending domain","description":"Returns how senders in a sending domain's industry place: the median inbox\nrate across the industry's measured senders, how many senders that median\ncovers, and the industry the domain was classified into.\n\nThe benchmark describes the industry rather than the domain, so it carries\nno comparison of its own. Compare it against the domain's own inbox rate\nfrom the placement resource. Its weighting is a general default rather than\nany one account's audience mix, a deliberate asymmetry with the placement\nfigure it is compared against, and one worth naming wherever the two\nappear together.\n\nThe status is `no_data` when too few measured senders share the industry\nfor a median to be meaningful, when the domain's industry is not\nclassified, or before the industry figures have been computed. That state\nis normal for a young cohort rather than an edge case, so handle it from\nthe start.\n","tags":["email-inbox-insights"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"sending_domain","in":"query","required":true,"description":"The sending domain whose industry to benchmark: one of the workspace's verified sending domains, exactly as it appears there. A domain that is not verified in this workspace answers not-found.\n","schema":{"type":"string","minLength":1,"example":"mail.acme.com"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The industry benchmark for the requested domain's industry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInboxInsightsIndustryBenchmark"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbox-insights/automatic-seeding":{"get":{"x-snippet-key":"email.seeding.settings.get","operationId":"getAutomaticSeedingSettings","summary":"Get automatic seeding settings","description":"Read settings and the trigger address for this workspace. Requires Inbox Insights read permission. Before initial setup, the revision is zero and the trigger address is absent.","tags":["email-seeding"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"responses":{"200":{"description":"Current automatic seeding settings.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStoreCacheControl"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomaticSeedingSettings"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"x-snippet-key":"email.seeding.settings.update","operationId":"updateAutomaticSeedingSettings","summary":"Update automatic seeding settings","description":"Replace settings at the expected revision; omitted selections clear the saved values. Disabling enabled settings permanently stops ungranted copies in existing runs; re-enabling does not resume them. Already granted copies may still send. Use revision zero for initial setup; the first successful update creates a trigger address. A stale revision returns 409 without changing settings. Where automatic seeding is active for the workspace, enabling it lets a send to the trigger address start a seed run, which uses seed-test and email-send allowance.","tags":["email-seeding"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomaticSeedingSettingsUpdate"}}}},"responses":{"200":{"description":"Current automatic seeding settings.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStoreCacheControl"},"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomaticSeedingSettings"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbox-insights/automatic-seeding/rotate":{"post":{"x-snippet-key":"email.seeding.address.rotate","operationId":"rotateAutomaticSeedingAddress","summary":"Rotate the automatic seeding address","description":"Replace the trigger address and permanently stop ungranted copies in existing runs. Granted copies may still send. Initialize settings with PATCH `/v1/email/inbox-insights/automatic-seeding` first; otherwise rotation returns 404. Use the same idempotency key and expected revision after a lost response; a stale revision returns 409 without rotating again.","tags":["email-seeding"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomaticSeedingRotate"}}}},"responses":{"200":{"description":"Current automatic seeding settings.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStoreCacheControl"},"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomaticSeedingSettings"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbox-insights/automatic-seeding/runs":{"get":{"x-snippet-key":"email.seeding.runs.list","operationId":"listAutomaticSeedingRuns","summary":"List seeding runs","description":"Read retained run intents and sending progress. Results may lag recent writes and are separate from Inbox Tracker placement results. Filters use retained run metadata; tag and label search is unavailable. When both creation bounds are supplied, created_before must be later than created_after; otherwise the request returns 422.","tags":["email-seeding"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"responses":{"200":{"description":"Retained automatic-seeding activity.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStoreCacheControl"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomaticSeedingRunList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"name":"sort","in":"query","required":false,"description":"Field to sort by. Defaults to `created_at`.","schema":{"$ref":"#/components/schemas/AutomaticSeedingRunSort"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/AutomaticSeedingSourceKindFilter"},{"$ref":"#/components/parameters/AutomaticSeedingSourceEmailFilter"},{"$ref":"#/components/parameters/AutomaticSeedingSourceBroadcastFilter"},{"$ref":"#/components/parameters/CreatedAfter"},{"$ref":"#/components/parameters/CreatedBefore"},{"name":"state","in":"query","required":false,"description":"Match the current derived execution state.","schema":{"$ref":"#/components/schemas/AutomaticSeedingRunState"}},{"name":"sending_domain","in":"query","required":false,"description":"Match the exact sending domain recorded during registration.","schema":{"type":"string","minLength":1,"maxLength":253}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbox-insights/automatic-seeding/runs/{run_id}":{"get":{"x-snippet-key":"email.seeding.runs.get","operationId":"getAutomaticSeedingRun","summary":"Get a seeding run","description":"Read retained run metadata and sending progress without seed addresses, example content or provider receipts. Provider acceptance and receiving-server delivery do not establish inbox placement.","tags":["email-seeding"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"responses":{"200":{"description":"Retained automatic-seeding activity.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStoreCacheControl"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomaticSeedingRun"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/AutomaticSeedingRunIDPath"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbox-insights/automatic-seeding/runs/{run_id}/stop":{"post":{"x-snippet-key":"email.seeding.runs.cancel","operationId":"cancelAutomaticSeedingRun","summary":"Cancel a seeding run","description":"Stop future seed admissions for this run. Already granted copies may still send; registration uncertainty and late registration results remain visible. The original email, schedule or broadcast is unchanged. Repeating stop is safe; finished or failed runs keep their terminal state. Requires Inbox Insights write permission. Reuse the same idempotency key after a lost response.","tags":["email-seeding"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"responses":{"200":{"description":"Retained automatic-seeding activity.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStoreCacheControl"},"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomaticSeedingRun"},"example":{"id":"esrun_01krdgeqcxet5s7t44vh8rt9mg","state":"stopped","source":{"kind":"api","email_id":"em_01krdgeqcxet5s7t44vh8rt9mg"},"label":"spring-launch","source_created_at":"2026-05-20T09:14:52Z","retain_until":"2027-06-19T09:14:52Z","progress":{"planned":48,"admitted":30,"provider_accepted":30,"delivered":28,"failed":0,"not_sent":18,"unknown":0,"pending":2},"sending_domain":"mail.example.com","list_type":"private","engagement_profile":"all","regions":["North America - US"],"registration_started_at":"2026-05-20T09:14:55Z","registration_finished_at":"2026-05-20T09:15:02Z","dispatch_deadline":"2026-05-20T10:14:52Z","stop_requested_at":"2026-05-20T09:22:40Z","reason":"run_stopped","issues":[],"created_at":"2026-05-20T09:14:53Z","updated_at":"2026-05-20T09:22:40Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/AutomaticSeedingRunIDPath"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbox-insights/automatic-seeding/sources":{"get":{"x-snippet-key":"email.seeding.sources.list","operationId":"listAutomaticSeedingSources","summary":"List automatic seeding source observations","description":"Read retained capture observations, including scheduled, skipped or failed sources that never created a run. Reads may lag recent writes. When both creation bounds are supplied, created_before must be later than created_after; otherwise the request returns 422.","tags":["email-seeding"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"responses":{"200":{"description":"Retained automatic-seeding activity.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStoreCacheControl"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomaticSeedingSourceList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"name":"sort","in":"query","required":false,"description":"Field to sort by. Defaults to `created_at`.","schema":{"$ref":"#/components/schemas/AutomaticSeedingSourceSort"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/AutomaticSeedingSourceKindFilter"},{"$ref":"#/components/parameters/AutomaticSeedingSourceEmailFilter"},{"$ref":"#/components/parameters/AutomaticSeedingSourceBroadcastFilter"},{"$ref":"#/components/parameters/CreatedAfter"},{"$ref":"#/components/parameters/CreatedBefore"},{"name":"state","in":"query","required":false,"description":"Match the capture observation state.","schema":{"$ref":"#/components/schemas/AutomaticSeedingSourceState"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbox-insights/seed-tests":{"get":{"x-snippet-key":"email.inboxInsights.seedTests.list","operationId":"getEmailInboxInsightsSeedTests","summary":"Get seed tests for a sending domain","description":"Returns the seed tests run for a sending domain over the period, newest\nfirst, together with the newest test's full results and the organization's\nseed-test allowance for the current billing period.\n\nA seed test sends to a panel of real mailboxes across many providers and\nreports exactly where each copy landed, so unlike the placement estimates\nit is a direct measurement of one send. Seed counts are small by nature,\nso a single seed moves a rate noticeably.\n\nThe list is capped at 100 tests rather than paged: `tests.truncated` says\nwhether the period holds more than that, and an earlier period reaches the\nones left out. A test counts against the billing-period allowance when it is\nregistered, whether or not its send goes out.\n","tags":["email-inbox-insights"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"sending_domain","in":"query","required":true,"description":"The sending domain to report on: one of the workspace's verified sending domains, exactly as it appears there. A domain that is not verified in this workspace answers not-found.\n","schema":{"type":"string","minLength":1,"example":"mail.acme.com"}},{"name":"from","in":"query","required":false,"description":"First UTC day of the period, inclusive, in YYYY-MM-DD: the same window\nconvention as the email statistics endpoints. Defaults to 90 days\nbefore `to`, which is the span the history view shows.\n\nIt may be at most 90 days before `to`, which is also the default, so a\nrequest naming neither date is already at the limit. Asking for more\nanswers `422`. To reach older tests, request an earlier period.\n","schema":{"type":"string","format":"date","example":"2026-05-20"}},{"name":"to","in":"query","required":false,"description":"Last UTC day of the period, inclusive, in YYYY-MM-DD. Defaults to today.","schema":{"type":"string","format":"date","example":"2026-08-17"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Seed tests for the requested domain and period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInboxInsightsSeedTests"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"post":{"x-snippet-key":"email.inboxInsights.seedTests.create","operationId":"createEmailInboxInsightsSeedTest","summary":"Register a seed test and get its addresses","description":"Registers a seed test for a sending domain and returns the seed addresses\nit measures.\n\nRegistering a test does not add the addresses to a send. Include them in\nthe recipients of the send you want measured, and results appear as the\nseed mail arrives. A test that receives no seed mail before it expires\nnever produces results.\n\nThe test appears in the seed-test list for the domain once its seed mail has\nbeen measured, carrying the subject and the date of the send it rode on.\nThose two fields are what tell you the send has happened.\n\nRegistering spends one of the organization's seed-test allowance\nwhether or not the send goes out, and an expired test does not return it,\nso register when the send you want measured is ready. The configuration\nendpoint reports which seed pools, regions, and engagement behaviours this\ndomain's account can use.\n\nA pool or profile the configuration does not report as available, or a region\nit does not list, returns 422 E01001 and spends no allowance.\n\nSend an Idempotency-Key and reuse it with the unchanged request when retrying\na lost response. Before running the curl example, set `IDEMPOTENCY_KEY` to a\nunique key for this registration and retain it for retries of the same intent.\nIf registration cannot be confirmed, the API returns\n409 E27008 and retains that outcome for keyed retries while the replay result\nremains available. The allowance may have been used. Contact support before\nstarting another test; a new key or a request without a key can register\nanother batch. A replay does not recover addresses from an uncertain result.\n","tags":["email-inbox-insights"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInboxInsightsSeedTestCreate"},"example":{"sending_domain":"mail.acme.com","list_type":"private","engagement_profile":"all","regions":["North America - US","Europe - UK"],"label":"Fall preview send"}}}},"responses":{"201":{"description":"The seed test was registered.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInboxInsightsSeedTestRegistration"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictWithReplay"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbox-insights/seed-tests/configuration":{"get":{"x-snippet-key":"email.inboxInsights.seedTests.configuration.get","operationId":"getEmailInboxInsightsSeedTestConfiguration","summary":"Get the choices available for a new seed test","description":"Returns what a new seed test can be configured with for a sending domain:\nthe seed pools the account can use, the regions seeds can be placed in, and\nthe engagement behaviours the seeds can simulate.\n\nA seed pool flagged unavailable is one the account has not been provisioned\nfor, and no self-serve route enables one, so leave it out of the choices you\noffer rather than showing it unpickable. This is reference data\nthat changes only when provisioning does, so it suits being fetched when a\nconfiguration form opens rather than on every page view.\n","tags":["email-inbox-insights"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"sending_domain","in":"query","required":true,"description":"The sending domain a test would be registered for: one of the workspace's verified sending domains, exactly as it appears there. A domain that is not verified in this workspace answers not-found.\n","schema":{"type":"string","minLength":1,"example":"mail.acme.com"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The choices available for a new seed test on this domain.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInboxInsightsSeedTestConfiguration"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbox-insights/domains":{"get":{"x-snippet-key":"email.inboxInsights.domains.list","operationId":"getEmailInboxInsightsDomains","summary":"List sending domains and their Inbox Insights status","description":"Returns a page of sending domains this workspace can report on, in alphabetical\norder by default, and whether Inbox Insights is switched on for each.\n\nOnly verified domains appear. Verifying a domain proves it is yours, which is\nwhat Inbox Insights needs before it will report on it, and a domain that loses\nits verification drops out of this list even if it was switched on.\n\nA domain does not have to be ready to send to appear here. Verification and\nsending readiness are reported separately on your sending domains, and this\nlist follows the first.\n\nUse this list to select a verified domain for placement and reputation reports.\nThe `monitored` field records the workspace's monitoring preference; report access\ndepends on verified ownership and remains available when monitoring is off.\n","tags":["email-inbox-insights"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"sending_domain","in":"query","required":false,"description":"Exact sending domain to return. Matching is case-insensitive.","schema":{"type":"string"}},{"name":"search","in":"query","required":false,"description":"Substring match against the sending domain (case-insensitive).","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Field to sort by. Defaults to `domain`.","schema":{"$ref":"#/components/schemas/EmailInboxInsightsDomainSort"}},{"$ref":"#/components/parameters/OrderAsc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of the workspace's sending domains and their Inbox Insights status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInboxInsightsDomains"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbox-insights/domains/{sending_domain}":{"patch":{"x-snippet-key":"email.inboxInsights.domains.update","operationId":"updateEmailInboxInsightsDomain","summary":"Switch Inbox Insights on or off for a sending domain","description":"Changes the workspace's monitoring preference for one of its verified sending\ndomains. Enabling enrolls the domain with eDataSource before saving the preference.\nDisabling removes the preference without removing vendor enrollment or history.\nReport reads remain available for verified owned domains regardless of this setting.\n\nA domain switched on for the first time has to be measured before it has\nanything to report, so its results start empty and fill in as its mail is\nseen. Switching off keeps everything measured so far: switching the domain\nback on restores it in full and takes effect immediately, rather than starting\nthe domain over.\n\nSetting the value it already has changes nothing and answers normally, so this\nis safe to repeat.\n\nSwitching on answers `412` when the measurement provider declines to measure the\ndomain. The monitoring preference is not saved. Contact support with the\nsending domain and request ID.\n","tags":["email-inbox-insights"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"sending_domain","in":"path","required":true,"description":"The sending domain to change, exactly as it appears in your sending domains. A domain that is not verified in this workspace answers not-found.\n","schema":{"type":"string","minLength":1,"example":"mail.acme.com"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInboxInsightsDomainUpdate"},"example":{"monitored":true}}}},"responses":{"200":{"description":"The domain's Inbox Insights setting after the change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInboxInsightsDomain"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbox-insights/domain-monitoring":{"post":{"x-snippet-key":"email.inboxInsights.domainMonitoring.upsert","operationId":"upsertEmailInboxInsightsDomainMonitoring","summary":"Switch Inbox Insights on for the workspace's main sending domain","description":"Switches Inbox Insights on for the workspace's main sending domain, so a\nworkspace opening the product for the first time has something to read\nwithout having to pick a domain first.\n\nThe main sending domain is the one verified domain if there is only one, and\notherwise the verified domain that has sent the most mail over the last 30\ndays. Where the main domain cannot be identified, nothing is switched on and\nthe response says so. Which domain matters most is the customer's call, and\nnot a guess worth making on their behalf.\n\nSafe to repeat. A workspace that already has a domain switched on is left\nexactly as it is, and the response says nothing changed.\n\nThis chooses a starting point, not a permanent setting: the domain it picks\nis switched on the same way as one chosen by hand, and can be switched off\nor added to at any time.\n\nThe call answers `412` when the measurement provider declines to measure the\nchosen domain. The monitoring preference is not saved. Contact support with\nthe sending domain and request ID.\n","tags":["email-inbox-insights"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"What the call did: a domain switched on, nothing to change, or nothing this endpoint is willing to decide.\n","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInboxInsightsDomainMonitoringResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/stats/daily":{"get":{"operationId":"getEmailStatsDaily","summary":"Get daily sending statistics","description":"Returns one row of aggregate sending statistics per calendar day for the workspace: UTC days by default, or your local days when `timezone` is set. Days with no activity are included with zero counts, so the series charts without client-side gap handling. Suited to charts and trend lines; for per-message exact accounting use the message detail endpoints.\n\nRows use event time. For example, a complaint received on Wednesday for a message sent the prior Monday is counted in Wednesday's row.\n\nThe maximum window is 365 days; requesting a longer range returns `422`.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.daily","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive), `YYYY-MM-DD`. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive), `YYYY-MM-DD`. Interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"category","in":"query","required":false,"description":"Restrict the statistics to a category or a comma-separated union of categories: `transactional` or `marketing`. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"transactional"}},{"name":"sending_domain","in":"query","required":false,"description":"Restrict the statistics to a sending domain or a comma-separated union of sending domains (the part of the From address after @). Mutually exclusive with the other dimension filters; only one may be set per request.","schema":{"type":"string","minLength":1,"example":"mail.acme.com"}},{"name":"tag","in":"query","required":false,"description":"Restrict the statistics to a tag. Use `name` to match any value of a tag, or `name:value` for a specific pair (for example `campaign:spring_launch`). To combine values of one tag name, separate complete pairs with commas, such as `campaign:spring,campaign:summer`. Different tag names cannot be combined. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"campaign:spring_launch"}},{"name":"sending_ip","in":"query","required":false,"description":"Restrict the statistics to a sending IP or a comma-separated union of IPs. Mutually exclusive with the other dimension filters; only one may be set per request. A sending IP is assigned only after a message reaches delivery, so this filter reports delivery-side metrics only. Accepted, processed, rejected, complaint, and engagement counts are `0`, and processing latency is `null`. Complaint, open, and click rates are `0` when deliveries exist and `null` otherwise.\n","schema":{"type":"string","minLength":1,"example":"192.0.2.55"}},{"name":"recipient_domain","in":"query","required":false,"description":"Restrict the statistics to a recipient mailbox domain or a comma-separated union of domains (the part of the recipient address after the `@`, for example `gmail.com`). Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"gmail.com"}},{"$ref":"#/components/parameters/EmailStatsTemplateFilter"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Daily aggregate stats for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/stats/hourly":{"get":{"operationId":"getEmailStatsHourly","summary":"Get hourly sending statistics","description":"Returns one row of aggregate sending statistics per hour for the workspace: UTC hours by default, or your local hours when `timezone` is set (a timezone with a sub-hour offset gets correctly aligned hours). Useful for inspecting send rate, deliverability, and engagement inside a single day or a recent window; hours with no activity are included with zero counts.\n\nRows use event time. For example, a click recorded at 14:07 for a message sent at 09:00 lands in the 14:00 row.\n\nA single request may span at most 30 days (720 hourly rows); for longer ranges use the daily endpoint, which has a 365-day window. An hourly window longer than 30 days, or a `from` after `to`, returns `422`.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.hourly","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start of the window (ISO 8601 instant). Rounded down to the start of its hour (the local hour when `timezone` is set, otherwise the UTC hour), and that hour is included. When `timezone` is set, a numeric UTC offset here (for example `+05:45`) is rejected; use a `Z` (UTC) instant. Defaults to 7 days before `to` when omitted.","schema":{"type":"string","format":"date-time","example":"2026-05-25T00:00:00Z"}},{"name":"to","in":"query","required":false,"description":"End of the window (ISO 8601 instant). Rounded down to the start of its hour (the local hour when `timezone` is set, otherwise the UTC hour), and that hour is included (both bounds inclusive). When `timezone` is set, a numeric UTC offset here is rejected; use a `Z` (UTC) instant. Defaults to the current hour when omitted. Window may not exceed 30 days (720 hours).","schema":{"type":"string","format":"date-time","example":"2026-05-25T23:59:59Z"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"category","in":"query","required":false,"description":"Restrict the statistics to a category or a comma-separated union of categories: `transactional` or `marketing`. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"transactional"}},{"name":"sending_domain","in":"query","required":false,"description":"Restrict the statistics to a sending domain or a comma-separated union of sending domains (the part of the From address after @). Mutually exclusive with the other dimension filters; only one may be set per request.","schema":{"type":"string","minLength":1,"example":"mail.acme.com"}},{"name":"tag","in":"query","required":false,"description":"Restrict the statistics to a tag. Use `name` to match any value of a tag, or `name:value` for a specific pair (for example `campaign:spring_launch`). To combine values of one tag name, separate complete pairs with commas, such as `campaign:spring,campaign:summer`. Different tag names cannot be combined. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"campaign:spring_launch"}},{"name":"sending_ip","in":"query","required":false,"description":"Restrict the statistics to a sending IP or a comma-separated union of IPs. Mutually exclusive with the other dimension filters; only one may be set per request. A sending IP is assigned only after a message reaches delivery, so this filter reports delivery-side metrics only. Accepted, processed, rejected, complaint, and engagement counts are `0`, and processing latency is `null`. Complaint, open, and click rates are `0` when deliveries exist and `null` otherwise.\n","schema":{"type":"string","minLength":1,"example":"192.0.2.55"}},{"name":"recipient_domain","in":"query","required":false,"description":"Restrict the statistics to a recipient mailbox domain or a comma-separated union of domains (the part of the recipient address after the `@`, for example `gmail.com`). Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"gmail.com"}},{"$ref":"#/components/parameters/EmailStatsTemplateFilter"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Hourly aggregate stats for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/stats/tags":{"get":{"operationId":"getEmailStatsByTag","summary":"Get statistics by tag","description":"Returns delivery and engagement counts for the requested period, grouped by tag. Use it to compare performance across the tags you set at send time. Rows are ranked by the `sort` metric, `processed` by default, and paginated with the requested `limit` (50 by default, 200 at most).\n\nRows are computed against event time rather than send time, so engagement received during the period counts even for messages that were sent earlier.\n\nThe window can span at most 365 days. Ask for more and you get a `422`.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.byTag","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"name","in":"query","required":false,"description":"Restrict the breakdown to this tag name. Names match case-sensitively.","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). It defaults to 30 days before `to` when you leave it out. When `include_trend=true` and `trend_grain=hourly`, that default tightens to 29 days before `to` instead, so the defaulted window still fits inside the 720-hour trend cap.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"category","in":"query","required":false,"description":"Not supported on breakdown endpoints. Supplying it returns `422`. To compare categories, use `GET /v1/email/stats/categories`. The summary, daily, and hourly statistics accept `category` as a filter.","schema":{"type":"string","minLength":1}},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. Any count or rate in the response can be used. A row whose rate is undefined because its denominator is zero sorts last. It defaults to `processed`.\n","schema":{"$ref":"#/components/schemas/EmailStatsSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of tag rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"include_trend","in":"query","required":false,"description":"When true, each row also gets a `trend` array: a short per-bucket series showing that tag's delivery and engagement rates over the window. This only works when `limit` is 50 or fewer and the window is at most 90 days for `trend_grain=daily` or 720 hours for `trend_grain=hourly`. Ask for more and you get a `422`. When you leave `from` out and use `trend_grain=hourly`, the default window tightens to 29 days before `to` (720 hours total), so a request built entirely from defaults always fits inside the cap.\n","schema":{"type":"boolean","default":false}},{"name":"trend_grain","in":"query","required":false,"description":"Bucket grain for the `trend` series. Has no effect unless `include_trend=true`.","schema":{"$ref":"#/components/schemas/StatsTrendGrain"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-tag breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsTagsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/stats/query":{"post":{"operationId":"getEmailStatsQuery","summary":"Query email delivery and engagement metrics","description":"Returns selected delivery, engagement, and latency metrics for the workspace. Combine filters, one grouping dimension, and a time grain for reports such as weekly deliveries by recipient domain for a campaign. Events are selected and bucketed by when they occurred. An open in the window can belong to a message sent earlier; later outcomes outside the window are excluded. Ungrouped requests return one summary; grouped pages retain each group's complete series. Counts deduplicate by each metric's identity; event counts are not audience sizes. Undefined rates or empty latency samples return null.\n\nDates include whole local days. Instants include the quarter-hour containing the requested end. Responses echo normalized UTC bounds with an exclusive end. Follow cursors using the original body and replace the cursor fields. Requests can cover up to 365 local days or 720 hours for instant bounds, subject to available history. Unsupported combinations, unavailable history, or query-size limits return 422; a failed query returns no partial report.\n\nIdempotency is best-effort replay. Responses up to 256 KiB may be replayed while retained; larger valid responses up to 4 MiB are read again on retry. A key does not freeze an analytics snapshot. SDK iterators use your explicit key for the first page and a fresh automatic key per continuation page, reusing that page's key across retries. For a fresh read, omit the key or use a new one.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.query","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsQueryRequest"},"example":{"from":"2026-09-23","to":"2026-09-24","metrics":["delivered","bounce_rate"],"group_by":"recipient_domain","grain":"week","limit":25}}}},"responses":{"200":{"description":"Selected metrics, normalized bounds, and grouped navigation cursors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsQueryResponse"},"example":{"data":[{"dimensions":{"recipient_domain":"gmail.com"},"metrics":{"delivered":12,"bounce_rate":0.2},"series":[{"bucket":"2026-09-21T00:00:00Z","metrics":{"delivered":12,"bounce_rate":0.2}}]}],"period":{"from":"2026-09-23T00:00:00Z","to":"2026-09-25T00:00:00Z","timezone":"UTC","grain":"week"},"data_as_of":null,"next_cursor":null,"prev_cursor":null,"refresh_cursor":"eyJ2IjoxLCJ3b3Jrc3BhY2UiOiJ3c18wMTAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMCIsInF1ZXJ5IjoiYjM3MDNiMWVmNDNkZjExZDNlYzcwMGY2MmViNTdlZGIwYjAzODI4Yzk5ZTkxYzY4MzJhYWNjYTIwMzZhNDc3MSIsIm51bGwiOmZhbHNlLCJpbnRlZ2VyIjoxMiwia2V5IjoiZ21haWwuY29tIn0"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/stats/summary":{"get":{"operationId":"getEmailStatsSummary","summary":"Get aggregate email statistics","description":"Returns a single-row aggregate across the requested period covering delivery, bounce, complaint, open, and click counts plus the derived rates, along with processing, delivery, and total latency percentiles (p50/p95/p99). Suitable for KPI tiles, campaign reports, and email digests; the daily and hourly endpoints have the same metrics per time bucket.\n\nThe aggregate is computed against event time (not send time), so engagement received during the period for messages sent earlier is included. Rate fields are `null` when their denominator is zero.\n\nThe window grain follows the form of `from` and `to`: calendar days (`YYYY-MM-DD`, up to 365 days) or RFC 3339 instants (hour grain, up to 720 hours, 30 days). A rolling window such as the last 24 hours is a single request. Mixing the two forms returns `422`. Set `timezone` to compute day and hour boundaries in a local zone instead of UTC, and `compare=previous_period` to include the preceding equal-length window in the same response.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.summary","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window: a calendar day (`YYYY-MM-DD`) or an RFC 3339 instant (rounded down to the hour). Interpreted in `timezone` (a calendar day names a local day; an instant is rounded down to the local hour), or in UTC when `timezone` is omitted. A numeric UTC offset (for example `+05:45`) is rejected when `timezone` is set; use a calendar day or a `Z` (UTC) instant. Must use the same form as `to`. Defaults to 30 days before `to` for day windows, or 168 hours (7 days) before `to` for hour windows, when omitted.\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window: a calendar day (`YYYY-MM-DD`) or an RFC 3339 instant (rounded down to the hour). Interpreted in `timezone` (a calendar day names a local day; an instant is rounded down to the local hour), or in UTC when `timezone` is omitted. A numeric UTC offset is rejected when `timezone` is set; use a calendar day or a `Z` (UTC) instant. Must use the same form as `from`. Defaults to today for day windows, or the current hour for hour windows, in that timezone, when omitted. Day windows may not exceed 365 days; hour windows may not exceed 720 hours (30 days).\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"category","in":"query","required":false,"description":"Restrict the statistics to a category or a comma-separated union of categories: `transactional` or `marketing`. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"transactional"}},{"name":"sending_domain","in":"query","required":false,"description":"Restrict the statistics to a sending domain or a comma-separated union of sending domains (the part of the From address after @). Mutually exclusive with the other dimension filters; only one may be set per request.","schema":{"type":"string","minLength":1,"example":"mail.acme.com"}},{"name":"tag","in":"query","required":false,"description":"Restrict the statistics to a tag. Use `name` to match any value of a tag, or `name:value` for a specific pair (for example `campaign:spring_launch`). To combine values of one tag name, separate complete pairs with commas, such as `campaign:spring,campaign:summer`. Different tag names cannot be combined. Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"campaign:spring_launch"}},{"name":"sending_ip","in":"query","required":false,"description":"Restrict the statistics to a sending IP or a comma-separated union of IPs. Mutually exclusive with the other dimension filters; only one may be set per request. A sending IP is assigned only after a message reaches delivery, so this filter reports delivery-side metrics only. Accepted, processed, rejected, complaint, and engagement counts are `0`, and processing latency is `null`. Complaint, open, and click rates are `0` when deliveries exist and `null` otherwise.\n","schema":{"type":"string","minLength":1,"example":"192.0.2.55"}},{"name":"recipient_domain","in":"query","required":false,"description":"Restrict the statistics to a recipient mailbox domain or a comma-separated union of domains (the part of the recipient address after the `@`, for example `gmail.com`). Mutually exclusive with the other dimension filters; only one may be set per request.\n","schema":{"type":"string","minLength":1,"example":"gmail.com"}},{"$ref":"#/components/parameters/EmailStatsTemplateFilter"},{"name":"compare","in":"query","required":false,"description":"Set to `previous_period` to also include the same statistics for the immediately preceding window of equal length, plus the change between the two, so you can show \"+X% vs last period\" without a second request.\n","schema":{"type":"string","enum":["previous_period"]}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Aggregate summary for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsSummary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/stats/sending-ips":{"get":{"operationId":"getEmailStatsBySendingIp","summary":"Get statistics by sending IP","description":"Returns delivery and deliverability counts for the requested period, grouped by the specific IP address used to send each message. Use it to spot a reputation problem on one IP. Block bounces concentrated on a single IP usually mean that IP's reputation has taken a hit, and sorting by `bounces.block` puts those IPs first.\n\nA sending IP is only known once the receiving mail server reports an outcome: a delivery, a bounce, a deferral, or a late bounce. So this breakdown starts from the delivery stage onward. Accepted, processed, and rejected counts aren't included at all, and neither are engagement counts or processing latency. Complaints and out-of-band bounces aren't attributed to a sending IP either, so `complained` and `oob_bounces` are included but always read `0` here. Bounced, deferred, delivery latency, and total latency are the ones that have real numbers. For workspace-wide figures, use `GET /v1/email/stats/daily`. Rows are computed against event time rather than send time.\n\nRows are ranked by the `sort` field, `delivered` by default, and paginated with the requested `limit` (50 by default, 200 at most). The window can span at most 365 days. Ask for more and you get a `422`.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.bySendingIp","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). It defaults to 30 days before `to` when you leave it out. When `include_trend=true` and `trend_grain=hourly`, that default tightens to 29 days before `to` instead, so the defaulted window still fits inside the 720-hour trend cap.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"category","in":"query","required":false,"description":"Not supported on breakdown endpoints. Supplying it returns `422`. To compare categories, use `GET /v1/email/stats/categories`. The summary, daily, and hourly statistics accept `category` as a filter.","schema":{"type":"string","minLength":1}},{"name":"sort","in":"query","required":false,"description":"Metric to rank IPs by, applied descending. Sorting by `bounces.block` puts the IPs whose reputation is most likely degraded at the top. A row whose rate is undefined because its denominator is zero sorts last. It defaults to `delivered`. A sending IP has no engagement, so engagement metrics aren't sortable here, and neither are `processed`, `rejected`, or `oob_bounces`.\n","schema":{"type":"string","default":"delivered","enum":["delivered","bounced","complained","deferred","bounces.hard","bounces.soft","bounces.admin","bounces.block","bounces.undetermined","delivery_rate","bounce_rate","complaint_rate","bounces.hard_rate","bounces.soft_rate","bounces.admin_rate","bounces.block_rate","bounces.undetermined_rate"],"x-enum-varnames":["GetEmailStatsBySendingIpParamsSortDelivered","GetEmailStatsBySendingIpParamsSortBounced","GetEmailStatsBySendingIpParamsSortComplained","GetEmailStatsBySendingIpParamsSortDeferred","GetEmailStatsBySendingIpParamsSortBouncesHard","GetEmailStatsBySendingIpParamsSortBouncesSoft","GetEmailStatsBySendingIpParamsSortBouncesAdmin","GetEmailStatsBySendingIpParamsSortBouncesBlock","GetEmailStatsBySendingIpParamsSortBouncesUndetermined","GetEmailStatsBySendingIpParamsSortDeliveryRate","GetEmailStatsBySendingIpParamsSortBounceRate","GetEmailStatsBySendingIpParamsSortComplaintRate","GetEmailStatsBySendingIpParamsSortBouncesHardRate","GetEmailStatsBySendingIpParamsSortBouncesSoftRate","GetEmailStatsBySendingIpParamsSortBouncesAdminRate","GetEmailStatsBySendingIpParamsSortBouncesBlockRate","GetEmailStatsBySendingIpParamsSortBouncesUndeterminedRate"]}},{"name":"limit","in":"query","required":false,"description":"Maximum number of IP rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"include_trend","in":"query","required":false,"description":"When true, each row also gets a `trend` array: a short per-bucket series showing that IP's delivery rates over the window. A trend point's open and click rates read `0` in a bucket that had deliveries and `null` in one that had none, because a sending IP has no engagement data. This only works when `limit` is 50 or fewer and the window is at most 90 days for `trend_grain=daily` or 720 hours for `trend_grain=hourly`. Ask for more and you get a `422`. When you leave `from` out and use `trend_grain=hourly`, the default window tightens to 29 days before `to` (720 hours total), so a request built entirely from defaults always fits inside the cap.\n","schema":{"type":"boolean","default":false}},{"name":"trend_grain","in":"query","required":false,"description":"Bucket grain for the `trend` series. Has no effect unless `include_trend=true`.","schema":{"$ref":"#/components/schemas/StatsTrendGrain"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-sending-IP breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsBySendingIpResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/stats/sending-domains":{"get":{"operationId":"getEmailStatsBySendingDomain","summary":"Get statistics by sending domain","description":"Returns delivery, engagement, and deliverability counts for the requested period, grouped by sending domain: the portion of the `From` address after the `@`. Use it to compare deliverability across multiple verified domains in your workspace, for example transactional versus marketing domains, or sub-domain segregation during IP warming.\n\nRows are computed against event time rather than send time, so engagement and bounces received during the period count even for messages that were sent earlier.\n\nRows are ranked by the `sort` metric, `processed` by default, and paginated with the requested `limit` (50 by default, 200 at most). The window can span at most 365 days. Ask for more and you get a `422`.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.bySendingDomain","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). It defaults to 30 days before `to` when you leave it out. When `include_trend=true` and `trend_grain=hourly`, that default tightens to 29 days before `to` instead, so the defaulted window still fits inside the 720-hour trend cap.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"category","in":"query","required":false,"description":"Not supported on breakdown endpoints. Supplying it returns `422`. To compare categories, use `GET /v1/email/stats/categories`. The summary, daily, and hourly statistics accept `category` as a filter.","schema":{"type":"string","minLength":1}},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. Any count or rate in the response can be used. A row whose rate is undefined because its denominator is zero sorts last. It defaults to `processed`.\n","schema":{"$ref":"#/components/schemas/EmailStatsSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of domain rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"include_trend","in":"query","required":false,"description":"When true, each row also gets a `trend` array: a short per-bucket series showing that domain's delivery and engagement rates over the window. This only works when `limit` is 50 or fewer and the window is at most 90 days for `trend_grain=daily` or 720 hours for `trend_grain=hourly`. Ask for more and you get a `422`. When you leave `from` out and use `trend_grain=hourly`, the default window tightens to 29 days before `to` (720 hours total), so a request built entirely from defaults always fits inside the cap.\n","schema":{"type":"boolean","default":false}},{"name":"trend_grain","in":"query","required":false,"description":"Bucket grain for the `trend` series. Has no effect unless `include_trend=true`.","schema":{"$ref":"#/components/schemas/StatsTrendGrain"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-sending-domain breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsBySendingDomainResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/stats/categories":{"get":{"operationId":"getEmailStatsByCategory","summary":"Get statistics by category","description":"Returns delivery and engagement counts for the requested period, grouped by category, so you can compare deliverability and engagement between your transactional and marketing traffic. Rows are ranked by the `sort` metric, `processed` by default, and paginated with the requested `limit` (50 by default, 200 at most).\n\nRows are computed against event time rather than send time, so engagement received during the period counts even for messages that were sent earlier.\n\nThe window can span at most 365 days. Ask for more and you get a `422`.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.byCategory","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). It defaults to 30 days before `to` when you leave it out. When `include_trend=true` and `trend_grain=hourly`, that default tightens to 29 days before `to` instead, so the defaulted window still fits inside the 720-hour trend cap.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. Any count or rate in the response can be used. A row whose rate is undefined because its denominator is zero sorts last. It defaults to `processed`.\n","schema":{"$ref":"#/components/schemas/EmailStatsSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of category rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"include_trend","in":"query","required":false,"description":"When true, each row also gets a `trend` array: a short per-bucket series showing that category's delivery and engagement rates over the window. This only works when `limit` is 50 or fewer and the window is at most 90 days for `trend_grain=daily` or 720 hours for `trend_grain=hourly`. Ask for more and you get a `422`. When you leave `from` out and use `trend_grain=hourly`, the default window tightens to 29 days before `to` (720 hours total), so a request built entirely from defaults always fits inside the cap.\n","schema":{"type":"boolean","default":false}},{"name":"trend_grain","in":"query","required":false,"description":"Bucket grain for the `trend` series. Has no effect unless `include_trend=true`.","schema":{"$ref":"#/components/schemas/StatsTrendGrain"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-category breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsByCategoryResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/stats/mailbox-providers":{"get":{"operationId":"getEmailStatsByMailboxProvider","summary":"Get statistics by mailbox provider","description":"Returns delivery, engagement, and deliverability counts for the requested period, grouped by recipient mailbox provider, for example `gmail`, `yahoo`, `microsoft`, or `apple`. Use it to compare how each major inbox provider treats your mail, for example to spot a delivered-rate dip or a complaint spike at one provider before it spreads. For a per-region split within a provider, use the mailbox-provider-region breakdown.\n\nA recipient's mailbox provider is only known once the receiving mail system reports an outcome, so this breakdown covers the delivery stage onward. Accepted, processed, and rejected counts and processing latency are not included. Rows are computed against event time rather than send time.\n\nRows are ranked by the `sort` metric, `delivered` by default, and paginated with the requested `limit` (50 by default, 200 at most). The window can span at most 365 days. Ask for more and you get a `422`.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.byMailboxProvider","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). It defaults to 30 days before `to` when you leave it out. When `include_trend=true` and `trend_grain=hourly`, that default tightens to 29 days before `to` instead, so the defaulted window still fits inside the 720-hour trend cap.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"category","in":"query","required":false,"description":"Not supported on breakdown endpoints; supplying it returns `422`. To compare categories use `GET /v1/email/stats/categories`; the summary, daily, and hourly statistics accept `category` as a filter.","schema":{"type":"string","minLength":1}},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. Any count or rate in the response can be used. A row whose rate is undefined because its denominator is zero sorts last. It defaults to `delivered`. `processed`, `rejected`, and `oob_bounces` are not part of this breakdown's rows, so they are not sortable here.\n","schema":{"$ref":"#/components/schemas/EmailMailboxProviderSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of mailbox-provider rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"include_trend","in":"query","required":false,"description":"When true, each row also gets a `trend` array: a short per-bucket series showing that provider's delivery and engagement rates over the window. This only works when `limit` is 50 or fewer and the window is at most 90 days for `trend_grain=daily` or 720 hours for `trend_grain=hourly`. Ask for more and you get a `422`. When you leave `from` out and use `trend_grain=hourly`, the default window tightens to 29 days before `to` (720 hours total), so a request built entirely from defaults always fits inside the cap.\n","schema":{"type":"boolean","default":false}},{"name":"trend_grain","in":"query","required":false,"description":"Bucket grain for the `trend` series. Has no effect unless `include_trend=true`.","schema":{"$ref":"#/components/schemas/StatsTrendGrain"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-mailbox-provider breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsByMailboxProviderResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/stats/mailbox-provider-regions":{"get":{"operationId":"getEmailStatsByMailboxProviderRegion","summary":"Get statistics by mailbox provider region","description":"Returns delivery, engagement, and deliverability counts for the requested period, grouped by mailbox provider and provider region pair, for example `gmail` in `NA` or `microsoft` in `EU`. The provider region is the regional grouping the receiving mail system reports for the recipient's provider. Pairing it with the provider tells apart a region label that several providers share. Use it to spot a deliverability problem isolated to one provider in one region. For a per-provider view without the region split, use the mailbox-provider breakdown.\n\nA provider region is only known once the receiving mail system reports an outcome, so this breakdown covers the delivery stage onward. Accepted, processed, and rejected counts and processing latency are not included. Rows are computed against event time rather than send time.\n\nRows are ranked by the `sort` metric, `delivered` by default, and paginated with the requested `limit` (50 by default, 200 at most). The window can span at most 365 days. Ask for more and you get a `422`.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.byMailboxProviderRegion","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). It defaults to 30 days before `to` when you leave it out. When `include_trend=true` and `trend_grain=hourly`, that default tightens to 29 days before `to` instead, so the defaulted window still fits inside the 720-hour trend cap.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"category","in":"query","required":false,"description":"Not supported on breakdown endpoints. Supplying it returns `422`. To compare categories, use `GET /v1/email/stats/categories`. The summary, daily, and hourly statistics accept `category` as a filter.","schema":{"type":"string","minLength":1}},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. Any count or rate in the response can be used. A row whose rate is undefined because its denominator is zero sorts last. It defaults to `delivered`. `processed`, `rejected`, and `oob_bounces` are not part of this breakdown's rows, so they are not sortable here.\n","schema":{"$ref":"#/components/schemas/EmailMailboxProviderSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of provider-region rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"include_trend","in":"query","required":false,"description":"When true, each row also gets a `trend` array: a short per-bucket series showing that provider region's delivery and engagement rates over the window. This only works when `limit` is 50 or fewer and the window is at most 90 days for `trend_grain=daily` or 720 hours for `trend_grain=hourly`. Ask for more and you get a `422`. When you leave `from` out and use `trend_grain=hourly`, the default window tightens to 29 days before `to` (720 hours total), so a request built entirely from defaults always fits inside the cap.\n","schema":{"type":"boolean","default":false}},{"name":"trend_grain","in":"query","required":false,"description":"Bucket grain for the `trend` series. Has no effect unless `include_trend=true`.","schema":{"$ref":"#/components/schemas/StatsTrendGrain"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-(mailbox provider, provider region) breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsByMailboxProviderRegionResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/stats/recipient-domains":{"get":{"operationId":"getEmailStatsByRecipientDomain","summary":"Get statistics by recipient domain","description":"Returns delivery and engagement counts for the requested period, grouped by recipient mailbox domain: the part of each recipient address after the `@`, for example `gmail.com`, `yahoo.com`, or `outlook.com`. This is the finest-grained deliverability view. Where the mailbox-provider breakdown groups recipients into provider buckets such as `gmail` or `microsoft`, this keys on the exact destination domain. Use it to spot a delivery-rate dip or a complaint spike at a specific domain.\n\nRows are ranked by the `sort` metric, `processed` by default, and paginated with the requested `limit` (50 by default, 200 at most). Rows are computed against event time rather than send time, so engagement received during the period counts even for messages that were sent earlier.\n\nThe window can span at most 365 days. Ask for more and you get a `422`.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.byRecipientDomain","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). It defaults to 30 days before `to` when you leave it out. When `include_trend=true` and `trend_grain=hourly`, that default tightens to 29 days before `to` instead, so the defaulted window still fits inside the 720-hour trend cap.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"category","in":"query","required":false,"description":"Not supported on breakdown endpoints. Supplying it returns `422`. To compare categories, use `GET /v1/email/stats/categories`. The summary, daily, and hourly statistics accept `category` as a filter.","schema":{"type":"string","minLength":1}},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. Any count or rate in the response can be used. A row whose rate is undefined because its denominator is zero sorts last. It defaults to `processed`.\n","schema":{"$ref":"#/components/schemas/EmailStatsSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of recipient-domain rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"include_trend","in":"query","required":false,"description":"When true, each row also gets a `trend` array: a short per-bucket series showing that recipient domain's delivery and engagement rates over the window. This only works when `limit` is 50 or fewer and the window is at most 90 days for `trend_grain=daily` or 720 hours for `trend_grain=hourly`. Ask for more and you get a `422`. When you leave `from` out and use `trend_grain=hourly`, the default window tightens to 29 days before `to` (720 hours total), so a request built entirely from defaults always fits inside the cap.\n","schema":{"type":"boolean","default":false}},{"name":"trend_grain","in":"query","required":false,"description":"Bucket grain for the `trend` series. Has no effect unless `include_trend=true`.","schema":{"$ref":"#/components/schemas/StatsTrendGrain"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-recipient-domain breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsByRecipientDomainResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/stats/templates":{"get":{"operationId":"getEmailStatsByTemplate","summary":"Get statistics by template","description":"Returns aggregate delivery and engagement counts grouped by the template each message was sent with, so a template's deliverability and engagement can be compared side by side. Attribution is by the template used at send time; only messages sent with a template appear here, so a workspace that has sent none returns an empty list rather than an error. Each row is keyed by the template ID (`emt_…`); a template deleted after sending still appears by its ID.\n\nRows are ranked by the `sort` metric (default `processed`) descending and paginated with the requested `limit` (default 50, hard maximum 200). Rows are computed against event time (not send time), so engagement received during the period for messages sent earlier is included.\n\nThe maximum window is 365 days; requesting a longer range returns `422`.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.byTemplate","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted; with `include_trend=true` and `trend_grain=hourly` the default tightens to 29 days before `to`, keeping the defaulted window within the 720-hour trend cap.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"category","in":"query","required":false,"description":"Not supported on breakdown endpoints; supplying it returns `422`. To compare categories use `GET /v1/email/stats/categories`; the summary, daily, and hourly statistics accept `category` as a filter.","schema":{"type":"string","minLength":1}},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. Any count or rate in the response may be used; rows whose rate is undefined (zero denominator) sort last. Defaults to `processed`.\n","schema":{"$ref":"#/components/schemas/EmailStatsSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of template rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"include_trend","in":"query","required":false,"description":"When true, each row also has a `trend` array: a short per-bucket series of that template's delivery and engagement rates over the window. Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns `422`. When `from` is omitted and `trend_grain=hourly`, the default start tightens to 29 days before `to`, keeping the window inside 720 hours, so a request built entirely from defaults always fits the cap.\n","schema":{"type":"boolean","default":false}},{"name":"trend_grain","in":"query","required":false,"description":"Bucket grain for the `trend` series. Has no effect unless `include_trend=true`.","schema":{"$ref":"#/components/schemas/StatsTrendGrain"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-template breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsByTemplateResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/stats/locations":{"get":{"operationId":"getEmailStatsByLocation","summary":"Get engagement by location","description":"Returns engagement counts (opens and clicks) for the requested period, grouped by the location they were recorded from. Use it to see where your audience engages, for example the top countries by unique opens. The reading location is only known from open and click events, so rows have engagement counts but no delivery counts or rates.\n\nUse `group_by` to choose the granularity: `country` (the default), `region`, or `city`. Each row has the location hierarchy down to the requested level, so a `city` grouping also reports that row's region and country. Rows are ranked by the `sort` metric, `unique_opens` by default, and paginated with the requested `limit` (50 by default, 200 at most).\n\nRows are computed against event time rather than send time. The window can span at most 365 days. Ask for more and you get a `422`.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.byLocation","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"category","in":"query","required":false,"description":"Not supported on breakdown endpoints; supplying it returns `422`. To compare categories use `GET /v1/email/stats/categories`; the summary, daily, and hourly statistics accept `category` as a filter.","schema":{"type":"string","minLength":1}},{"name":"group_by","in":"query","required":false,"description":"Location granularity for each row. `country` (default) groups by country; `region` groups by region within country; `city` groups by city within region. Each row reports the location hierarchy down to the chosen level.\n","schema":{"type":"string","default":"country","enum":["country","region","city"],"x-enum-varnames":["GetEmailStatsByLocationParamsGroupByCountry","GetEmailStatsByLocationParamsGroupByRegion","GetEmailStatsByLocationParamsGroupByCity"]}},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. It defaults to `unique_opens`. Only engagement counts are sortable. This breakdown has no rates.\n","schema":{"$ref":"#/components/schemas/EmailEngagementSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of location rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-location engagement breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsByLocationResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/stats/clients":{"get":{"operationId":"getEmailStatsByClient","summary":"Get engagement by email client","description":"Returns engagement counts (opens and clicks) for the requested period, grouped by the email client, operating system, or device type they were recorded from. Use it for the classic view of opens by mail client, for example the share of opens from Apple Mail compared with Gmail and Outlook. The reading environment is only known from open and click events, so rows have engagement counts but no delivery counts or rates.\n\nUse `group_by` to choose the facet: `email_client` (the default), `os`, or `device_type`. Each row fills in the facet you chose and leaves the other two `null`. Rows are ranked by the `sort` metric, `unique_opens` by default, and paginated with the requested `limit` (50 by default, 200 at most).\n\nRows are computed against event time rather than send time. The window can span at most 365 days. Ask for more and you get a `422`.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.byClient","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"category","in":"query","required":false,"description":"Not supported on breakdown endpoints; supplying it returns `422`. To compare categories use `GET /v1/email/stats/categories`; the summary, daily, and hourly statistics accept `category` as a filter.","schema":{"type":"string","minLength":1}},{"name":"group_by","in":"query","required":false,"description":"Which reading-environment facet to group rows by. `email_client` (default) groups by mail client; `os` groups by operating system; `device_type` groups by device type. Each row populates the chosen facet and leaves the other two `null`.\n","schema":{"type":"string","default":"email_client","enum":["email_client","os","device_type"],"x-enum-varnames":["GetEmailStatsByClientParamsGroupByEmailClient","GetEmailStatsByClientParamsGroupByOs","GetEmailStatsByClientParamsGroupByDeviceType"]}},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. It defaults to `unique_opens`. Only engagement counts are sortable. This breakdown has no rates.\n","schema":{"$ref":"#/components/schemas/EmailEngagementSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of client rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-client engagement breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsByClientResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/stats/bounce-codes":{"get":{"operationId":"getEmailStatsByBounceCode","summary":"Get bounces by SMTP error code","description":"Returns bounce counts for the requested period, grouped by the SMTP error code the receiving mail server returned. It answers the question of which SMTP responses are driving your bounces. Each row reports how many recipients bounced with that code, plus the hard, soft, admin, block, and undetermined split for that code.\n\nThis failure-only breakdown omits delivered, open, click, and rate fields because bounce codes occur only on bounce events.\n\nRows are ranked by the `sort` metric, `bounced` by default, and paginated with the requested `limit` (50 by default, 200 at most). They are computed against event time rather than send time. The window can span at most 365 days. Ask for more and you get a `422`.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.byBounceCode","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"category","in":"query","required":false,"description":"Not supported on breakdown endpoints. Supplying it returns `422`. To compare categories, use `GET /v1/email/stats/categories`. The summary, daily, and hourly statistics accept `category` as a filter.","schema":{"type":"string","minLength":1}},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. It defaults to `bounced`. Only the bounce counts are sortable here, because this breakdown has no rate fields.\n","schema":{"type":"string","default":"bounced","enum":["bounced","bounces.hard","bounces.soft","bounces.admin","bounces.block","bounces.undetermined"],"x-enum-varnames":["GetEmailStatsByBounceCodeParamsSortBounced","GetEmailStatsByBounceCodeParamsSortBouncesHard","GetEmailStatsByBounceCodeParamsSortBouncesSoft","GetEmailStatsByBounceCodeParamsSortBouncesAdmin","GetEmailStatsByBounceCodeParamsSortBouncesBlock","GetEmailStatsByBounceCodeParamsSortBouncesUndetermined"]}},{"name":"limit","in":"query","required":false,"description":"Maximum number of bounce-code rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-SMTP-code bounce breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsByBounceCodeResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/stats/complaint-types":{"get":{"operationId":"getEmailStatsByComplaintType","summary":"Get complaints by type","description":"Returns spam-complaint counts for the requested period, grouped by the feedback-loop complaint type the mailbox provider reported, for example `abuse`, `fraud`, or `virus`. Use it to see what kind of complaints your mail attracts.\n\nThis breakdown only covers the complaint side. Each row has the complained count for one type and nothing else, because a complaint type is only ever recorded on a spam-complaint event.\n\nRows are ranked by `complained` descending, and paginated with the requested `limit` (default 50, hard maximum 200). They are computed against event time rather than send time. The window can span at most 365 days. Ask for more and you get a `422`.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.byComplaintType","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"category","in":"query","required":false,"description":"Not supported on breakdown endpoints. Supplying it returns `422`. To compare categories, use `GET /v1/email/stats/categories`. The summary, daily, and hourly statistics accept `category` as a filter.","schema":{"type":"string","minLength":1}},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. It defaults to `complained`, the only sortable metric for this breakdown.\n","schema":{"type":"string","default":"complained","enum":["complained"],"x-enum-varnames":["GetEmailStatsByComplaintTypeParamsSortComplained"]}},{"name":"limit","in":"query","required":false,"description":"Maximum number of complaint-type rows to return, ranked by `complained` descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-complaint-type breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsByComplaintTypeResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/stats/broadcasts":{"get":{"operationId":"getEmailStatsByBroadcast","summary":"Get statistics by broadcast","description":"Returns aggregate delivery and engagement counts grouped by broadcast for the requested period, so each broadcast's deliverability and engagement can be compared side by side. Only messages sent as part of a broadcast appear here. One-off and transactional sends are not included, so a workspace that has not sent broadcasts returns an empty list rather than an error.\n\nRows are ranked by the `sort` metric (default `processed`) descending and paginated with the requested `limit` (default 50, hard maximum 200). Rows are computed against event time (not send time), so engagement received during the period for messages sent earlier is included.\n\nThe maximum window is 365 days. Requesting a longer range returns a `422`. Aggregate statistics remain available after the underlying message activity details expire. Counts and latency percentiles are approximate and may lag newly received activity; `data_as_of` reports refresh freshness when available. Historical results include only activity captured before those details expired.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.byBroadcast","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (UTC when omitted). Defaults to 30 days before `to` when omitted.","schema":{"type":"string","format":"date","example":"2026-05-01"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in `YYYY-MM-DD`, interpreted as a calendar day in `timezone` (UTC when omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"category","in":"query","required":false,"description":"Not supported on breakdown endpoints. Supplying it returns a `422`. To compare categories, use `GET /v1/email/stats/categories`. The summary, daily, and hourly statistics accept `category` as a filter.","schema":{"type":"string","minLength":1}},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. Any count or rate in the response may be used; rows whose rate is undefined (zero denominator) sort last. Defaults to `processed`.\n","schema":{"$ref":"#/components/schemas/EmailStatsSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of broadcast rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-broadcast breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsByBroadcastResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/stats/brands":{"get":{"operationId":"getEmailStatsByBrand","summary":"Get statistics by Brand","description":"Returns aggregate delivery, engagement, and latency counts grouped by the Brand each message was sent with, so each Brand's deliverability and engagement can be compared side by side. Attribution uses the Brand recorded at send time. Archived Brands retain their historical activity keyed by their ID. Historical or unattributed messages recorded without a Brand appear in a separate row with `brand_id` set to `null` rather than being merged into the default Brand.\n\nRows are ranked by the `sort` metric (default `processed`) descending and paginated with the requested `limit` (default 50, hard maximum 200). Rows are computed against event time (not send time), so engagement received during the period for messages sent earlier is included. Preserve `from`, `to`, `sort`, and `timezone` when following `next_cursor` or `prev_cursor`; if the first request omitted `from` or `to`, pass the returned `period.from` and `period.to` on continuation so the cursor stays valid across local midnight.\n\nThis endpoint reads retained reporting events directly (`data_as_of` is `null`), covering up to the last 180 days starting on or after `2026-09-23T00:00:00Z`. Requesting dates before the available history boundary returns `422` (`E04072`). When drilling down into a single Brand with `POST /v1/email/stats/query`, use local today or earlier for `to` (since `POST /v1/email/stats/query` rejects future calendar dates).\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.stats.byBrand","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"from","in":"query","required":false,"description":"Inclusive start of the window: a calendar day (`YYYY-MM-DD`) or an RFC 3339 instant (rounded down to a local quarter-hour). Use the same form for `from` and `to`, and use `Z` UTC instants when `timezone` is supplied. Defaults to 30 calendar days before `to` when both are omitted. Must fall within retained reporting history (last 180 days, on or after `2026-09-23T00:00:00Z`).\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-11-01"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window: a calendar day (`YYYY-MM-DD`, including the whole local day) or an RFC 3339 instant (rounded down to a local quarter-hour and including that quarter-hour). Must use the same form as `from` and not lie in the future for instant windows. Calendar windows allow up to 365 local days; instant windows allow up to 720 hours. Defaults to today in `timezone` when both are omitted.\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-11-23"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"category","in":"query","required":false,"description":"Not supported on breakdown endpoints. Supplying it returns `422`. To compare categories, use `GET /v1/email/stats/categories`, or use `POST /v1/email/stats/query` to combine `brand_id` and `category`.","schema":{"type":"string","minLength":1}},{"name":"sort","in":"query","required":false,"description":"Metric to rank rows by, applied descending. Supports every count and rate defined by `EmailStatsSortMetric`; rows whose rate is undefined (zero denominator) sort last. Defaults to `processed`.\n","schema":{"$ref":"#/components/schemas/EmailStatsSortMetric"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of Brand rows to return, ranked by the `sort` field descending.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Per-Brand breakdown for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatsByBrandResponse"},"example":{"period":{"from":"2026-10-01","to":"2026-10-30","data_as_of":null},"data":[{"brand_id":"bnd_01krdgeqcxet5s7t44vh8rt9mg","delivery":{"processed":14810,"delivered":14720,"bounced":90,"bounces":{"hard":40,"soft":35,"admin":5,"block":8,"undetermined":2,"hard_rate":0.4444,"soft_rate":0.3889,"admin_rate":0.0556,"block_rate":0.0889,"undetermined_rate":0.0222},"complained":3,"deferred":14,"rejected":10,"oob_bounces":2,"effective_delivered":14718,"all_bounces":92,"oob_rate":0.00014,"delivery_rate":0.9938,"bounce_rate":0.0062,"complaint_rate":0.0002},"engagement":{"opens":5420,"opens_non_prefetched":3210,"unique_opens":3640,"unique_opens_non_prefetched":2480,"clicks":924,"unique_clicks":621,"unsubscribes":12,"open_rate":0.1685,"click_rate":0.0422,"unsubscribe_rate":0.0008},"latency":{"processing":{"p50_ms":24,"p95_ms":80,"p99_ms":140},"delivery":{"p50_ms":null,"p95_ms":null,"p99_ms":null},"total":{"p50_ms":210,"p95_ms":620,"p99_ms":1100}}}],"total":2,"next_cursor":null,"prev_cursor":null,"refresh_cursor":"eyJ2ZXJzaW9uIjoxfQ"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/health":{"get":{"operationId":"getEmailHealth","summary":"Get sending health and deliverability limits","description":"Returns your workspace's sending-health verdict for the requested window, together with reference deliverability limits and the boundaries used to classify risk. Use it to render a health badge, label the bounce-rate and complaint-rate limits, and draw the risk lines on a deliverability chart without hard-coding thresholds that we may retune.\n\nThe overall `status` is `healthy`, `watching`, or `throttled`, taken as the worst of the delivery-rate, bounce-rate, and complaint-rate signals. It describes deliverability risk and never pauses your sending on its own. For the counts and rates the verdict is derived from, call [Get aggregate email statistics](/docs/api/reference/get-email-stats-summary) over the same window.\n\nRates follow each event's occurrence time. A bounce or complaint that occurred during the window counts toward it even when the message was sent earlier. When you omit both dates the window ends today (UTC) and starts 7 days earlier. A window longer than 365 days returns `422`.\n","tags":["email-stats"],"x-audiences":["public","command"],"x-snippet-key":"email.health","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Start date (inclusive) in `YYYY-MM-DD`, UTC. Defaults to 7 days before `to` when omitted.","schema":{"type":"string","format":"date","example":"2026-05-19"}},{"name":"to","in":"query","required":false,"description":"End date (inclusive) in `YYYY-MM-DD`, UTC. Defaults to today (UTC) when omitted. Window may not exceed 365 days. Day boundaries are always UTC; unlike the statistics reads, this one takes no `timezone`.","schema":{"type":"string","format":"date","example":"2026-05-25"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Current sending-health verdict, reference limits, and risk classification boundaries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailHealth"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/domains":{"post":{"operationId":"createDomain","summary":"Create a sending domain","description":"Registers a new sending domain and returns the DNS records to publish\nfor it. The DKIM TXT record proves ownership, and together with the\nreturn-path CNAME (which also covers SPF, so no separate SPF record is\nneeded) and a DMARC policy it gates sending. The tracking CNAME is\noptional and gates branded link tracking only. Publish the records at\nyour DNS provider, then check progress with\n[Trigger domain verification](/docs/api/reference/verify-domain). Published\nrecords are also re-checked for you automatically. Setup walkthrough:\n[Sending domains](/docs/guides/email/sending-domains).\n\nThe domain starts in `pending` status. A domain already registered in\nthis workspace returns `409`, and creation beyond your organization's\ndomain quota returns `422` `E10000`. A domain that never verifies\nownership is removed after about 14 days, with a reminder email first.\n","tags":["domains"],"x-audiences":["public","command"],"x-snippet-key":"domains.create","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"examples":{"domain-bounce":{"summary":"A sending domain with a custom bounce return path","value":{"domain":"mail.acme.com","return_path":{"name":"bounce"}}},"domain-tracking":{"summary":"A sending domain with a custom click-tracking host","value":{"domain":"mail.acme.com","tracking":{"name":"click"}}}},"schema":{"$ref":"#/components/schemas/DomainCreate"}}}},"responses":{"201":{"description":"Domain created.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"get":{"operationId":"listDomains","summary":"List sending domains","description":"Returns all sending domains for the current workspace, newest first by default. Each item is the full domain object, including capability statuses and `dns_records`, so no per-domain follow-up read is needed. Filter with `name` to find a specific domain.\n","tags":["domains"],"x-audiences":["public","command"],"x-snippet-key":"domains.list","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"name","in":"query","required":false,"description":"Substring match against the domain name (case-insensitive).","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Field to sort by. Defaults to `created_at`.","schema":{"type":"string","enum":["created_at","name"],"default":"created_at"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of sending domains.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/domains/{domain_id}":{"patch":{"operationId":"updateDomain","summary":"Update a sending domain","description":"Updates settings and configuration on a sending domain. `settings`\nchanges apply immediately. Changes to `return_path`, `tracking`, or\n`dkim` on a verified capability are staged: the current configuration\nkeeps serving until the new one's DNS records verify, then the change\nis promoted automatically. Staged values are visible under\n`capabilities.*.pending`. The records to publish appear in\n`dns_records` with `state: pending`.\n\nInvalid combinations are rejected. Enabling tracking toggles without a\ntracking domain, or removing the tracking domain while a toggle is on,\nreturns `409`. Enabling inbound receiving has verification\nprerequisites that return `422`. When receiving has an assigned workspace,\ndisabling it from a sibling returns `403`. Read `receiving.managed_elsewhere`\nbefore changing receiving and `receiving.state` to follow a turn-off request.\nEach rule is detailed on its field.\n","tags":["domains"],"x-audiences":["public","command"],"x-snippet-key":"domains.update","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"domain_id","in":"path","required":true,"description":"ID of the domain to update.","schema":{"$ref":"#/components/schemas/DomainID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainUpdate"}}}},"responses":{"200":{"description":"Domain updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"get":{"operationId":"getDomain","summary":"Get a sending domain","description":"Returns the domain with its capability statuses and every DNS record's current verification state. This read reports the stored result of the last check. To run a fresh DNS check, use [Trigger domain verification](/docs/api/reference/verify-domain).\n","tags":["domains"],"x-audiences":["public","command"],"x-snippet-key":"domains.get","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"domain_id","in":"path","required":true,"description":"ID of the domain to fetch.","schema":{"$ref":"#/components/schemas/DomainID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The sending domain.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"delete":{"operationId":"deleteDomain","summary":"Delete a sending domain","description":"Removes the domain and revokes its sender authorization. New sends from a deleted domain are rejected. Historical statistics and events for past sends from this domain are preserved. Returns `409` while this assignment owns receiving, or while deleting it would remove the organization's final assignment for a domain with a retained receiving claim. Disable receiving from the receiving workspace and poll the domain until `capabilities.inbound.status` is `not_configured` before retrying. Removing an ordinary sibling assignment leaves receiving unchanged.\n","tags":["domains"],"x-audiences":["public","command"],"x-snippet-key":"domains.delete","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"domain_id","in":"path","required":true,"description":"ID of the domain to delete.","schema":{"$ref":"#/components/schemas/DomainID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Domain deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/domains/{domain_id}/events":{"get":{"operationId":"listDomainEvents","summary":"List domain events","description":"Returns the domain's activity history, newest first by default:\n\n- Registration.\n- A configuration change to settings, return path, or tracking.\n- A verification status transition for the domain or one of its individual DNS records.\n\nUse it to see when and why a domain's status changed, rather than\npolling [Get a sending domain](/docs/api/reference/get-domain).\n","tags":["domains"],"x-audiences":["public"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"domain_id","in":"path","required":true,"description":"ID of the domain whose events to list.","schema":{"$ref":"#/components/schemas/DomainID"}},{"name":"sort","in":"query","required":false,"description":"Field to sort by. Defaults to `created_at`.","schema":{"type":"string","enum":["created_at"],"default":"created_at"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"A page of domain events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainEventList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["n8n"]}},"/v1/email/domains/{domain_id}/verify":{"post":{"operationId":"verifyDomain","summary":"Verify a domain","description":"Runs a fresh DNS check across the domain's records (DKIM, return path,\nDMARC, tracking, inbound MX, and any staged changes) and returns the\nupdated domain. Use it for an immediate result after publishing or\ncorrecting records. [Get a sending domain](/docs/api/reference/get-domain)\nonly reports the last stored result. Published records are also re-checked\nfor you automatically in the background.\n\nA `200` with records still `pending` is not a failure: the records were\nnot found yet, which is normal while DNS propagates (minutes to hours).\nRecently verified records are not re-queried, so the call is safe to\nrepeat while you wait.\n","tags":["domains"],"x-audiences":["public","command"],"x-snippet-key":"domains.verify","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"domain_id","in":"path","required":true,"description":"ID of the domain to verify.","schema":{"$ref":"#/components/schemas/DomainID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Verification result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/domains/{domain_id}/tracking/release":{"post":{"operationId":"releaseTrackingDomain","summary":"Release link tracking configuration","description":"Removes the link tracking configuration from this domain and releases\nthe claim on its tracking subdomain, so another organization can\nconfigure the same hostname. Click and open tracking are switched off\nas part of the release. Tracking links in previously delivered messages\nstop resolving once no other domain in your organization uses the same\ntracking hostname.\n\nThis is the hard removal. To swap or remove tracking while keeping\npreviously sent links working, use\n[Update a sending domain](/docs/api/reference/update-domain) instead,\nwhich retires the old records gradually. A domain with no tracking\nconfigured returns `422`.\n","tags":["domains"],"x-audiences":["public"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"domain_id","in":"path","required":true,"description":"ID of the domain to release tracking for.","schema":{"$ref":"#/components/schemas/DomainID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Updated domain after tracking release.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["n8n"]}},"/v1/email/domains/{domain_id}/dns-records/share":{"post":{"operationId":"shareDomainDnsRecords","summary":"Share a domain's DNS records by email","description":"Emails the domain's current DNS records to up to three recipients, so a\ncolleague who manages your DNS can publish them without an account.\nOne email is sent: the first recipient receives it directly and the\nrest are copied. It lists each record's type, name, value, and current\nverification status, and names who requested it.\n\nAn invalid recipient address, or none, returns `422`. Rate limited per\nuser (default 5 calls per hour). Further calls return `429`.\n","tags":["domains"],"x-audiences":["public"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"domain_id","in":"path","required":true,"description":"ID of the domain whose DNS records to share.","schema":{"$ref":"#/components/schemas/DomainID"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareDomainDnsRequest"}}}},"responses":{"204":{"description":"DNS records shared."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["n8n"]}},"/v1/email/suppressions":{"get":{"operationId":"listSuppressions","summary":"List email suppressions","description":"Returns the workspace's suppressed email addresses as a paginated list, newest first. Pass an address in the `email` parameter to narrow the page to that address.\n\nThe `email` filter matches by prefix rather than exactly, so `bob@example.com` also returns a suppressed `bob@example.com.au`. Compare the `email` on each record before treating the address you asked about as suppressed.\n\nAn empty result does not establish that the address can receive mail. Read `/v1/preferences?channel=email&handle=` with the complete address to inspect its preferences, including Brand and sender scope. Subscribe to `preference.revoked`, `preference.granted`, and `preference.deleted` when maintaining a scoped preference mirror. Bird evaluates delivery policy after accepting a send.\n\nAn address can appear more than once because Bird keeps one suppression record per reason. Delivery stays blocked while any blocking record for the address remains.\n\nBrand-scoped spam complaints are recorded as preferences with origin `complaint` and do not appear in this list. Read `/v1/preferences` to inspect those opt-outs. Complaints without reliable Brand attribution and existing workspace-wide complaint suppressions remain here.\n","tags":["email-suppressions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"suppressions.list","parameters":[{"name":"email","in":"query","required":false,"description":"Case-insensitive prefix filter on the address. Returns every suppression whose address starts with this value. A full address finds that address's records, while a fragment such as `alice` finds every address beginning with it. The same address can match several records, one per suppression reason.\n","schema":{"type":"string","minLength":1},"example":"user@example.com"},{"name":"reason","in":"query","required":false,"description":"Return only suppressions with this reason:\n\n- `hard_bounce`: Delivery permanently failed.\n- `complaint`: The recipient reported a message as spam.\n- `unsubscribe`: The recipient opted out. Deprecated: unsubscribes are now\n  recorded as messaging preferences rather than suppressions, so no new\n  records carry this reason. The filter returns legacy records until they\n  are moved to messaging preferences.\n- `manual`: Added through the API or dashboard.\n","schema":{"$ref":"#/components/schemas/SuppressionReasonFilter"}},{"name":"scope_type","in":"query","required":false,"description":"Return only suppressions with this scope.\n\nEvery suppression is workspace-wide, so `workspace` returns all of\nthem without narrowing the results. The other five values,\n`category`, `audience`, `topic`, `contact` and `domain`, always come\nback with an empty page.\n","schema":{"$ref":"#/components/schemas/SuppressionScopeTypeFilter"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of suppressions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"post":{"operationId":"createSuppression","summary":"Create an email suppression","description":"Adds an email address to the suppression list, stopping all email to it. The record is created with reason `manual` and blocks every message category, including transactional.\n\nAdding is idempotent: a `201` means a new record was created, and a `200` means a `manual` suppression for the address already existed and is returned unchanged. An address suppressed for another reason (for example `hard_bounce`) gets a separate `manual` record, and delivery stays blocked until every blocking record is removed.\n","tags":["email-suppressions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"suppressions.add","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionCreate"},"example":{"email":"jane@example.com"}}}},"responses":{"200":{"description":"A manual suppression for this address already existed. The existing record is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Suppression"}}}},"201":{"description":"Suppression created.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Suppression"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/suppressions/{suppression_id}":{"parameters":[{"name":"suppression_id","in":"path","required":true,"description":"ID of the suppression record, as returned when the suppression was created or listed.\n","schema":{"$ref":"#/components/schemas/SuppressionID"},"example":"sup_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"getSuppression","summary":"Get an email suppression","description":"Returns one suppression record:\n\n- The address.\n- Why it is suppressed (`reason`).\n- How the record came to exist (`origin`).\n- Which message categories it blocks (`applies_to`).\n\nTo find a record when you only know the address, use `GET /v1/email/suppressions` with the `email` parameter. An ID that does not exist in the workspace returns `404`.\n","tags":["email-suppressions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"suppressions.get","responses":{"200":{"description":"Suppression object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Suppression"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n","sdk"]},"delete":{"operationId":"deleteSuppression","summary":"Delete an email suppression","description":"Permanently deletes the selected suppression record. Other blocking records for the address remain in effect. Deletion cannot be undone. If the address hard-bounces or the recipient complains again, the corresponding protection is recorded automatically.\n\nMost records exist because the address bounced or complained. Resuming delivery without cause can harm sender reputation. An address suppressed for several reasons has one record per reason. Delete each blocking record to re-enable delivery. To find a record by address, use `GET /v1/email/suppressions` with the `email` parameter. An ID that does not exist in the workspace returns `404`.\n\nBrand-scoped complaint preferences are separate from these suppression records. They require a newer individual opt-in through `POST /v1/preferences`; deleting a suppression does not clear them.\n\nA record with reason `complaint` can only be deleted by a signed-in dashboard user; an API key gets `422` (`SuppressionNotRemovableByAPIKey`). `hard_bounce` and `manual` records are unaffected and stay removable either way.\n","tags":["email-suppressions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"suppressions.remove","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Suppression deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/competitive/watchlist":{"get":{"x-snippet-key":"email.competitive.watchlist.get","operationId":"getEmailCompetitiveWatchlist","summary":"Get the competitor watchlist with its latest figures","description":"Returns every competitor brand on the workspace's watchlist, plus a row for\nyour own sending, each with estimated send volume and how it changed against\nthe previous period, how often the brand sends, inbox placement, estimated\nread rate, audience overlap with you, and the most recent campaign seen.\n\nFigures about a competitor are estimates from an email panel, which observes a\nsample of real inboxes and scales what it sees up to a whole audience. They\nare fetched while the request runs; the panel can revise recent measurements,\nso two requests minutes apart can differ. Your send volume and cadence cover\nthe workspace, while your panel rates and overlap use its highest-volume\nsending domain. The `provenance` object records each metric's source.\n\nInterpret `null` using each field's description: rates can be unavailable,\nwhile a last campaign can be unobserved and overlap can be absent from the\npanel response. A `0` means a measurement. `panel_status` distinguishes an\nuntracked domain, no observed mail and a temporarily unavailable panel.\n\n`esp` and `list_size` are the exception, and are always `null` here. Read a\nsingle brand to get them.\n","tags":["email-competitive"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/EmailCompetitiveRange"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The watchlist with its figures for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCompetitiveWatchlist"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/competitive/watchlist/notable":{"get":{"x-snippet-key":"email.competitive.watchlist.notable","operationId":"getEmailCompetitiveNotableCampaigns","summary":"Get the notable campaigns across watched brands","description":"Returns the campaigns worth a second look across every brand the workspace watches,\nsurfaced for what they did rather than for when they were sent.\n\nEach campaign carries the signal that surfaced it: an unusually big send for its brand,\na campaign read unusually well for its brand, or heavy spam placement at one mailbox\nprovider. Every signal compares a campaign against its own brand's history, never\nagainst your other brands, so several brands can carry the same signal in one period.\n\nUp to 100 findings are returned. Selection takes turns across brands in watchlist order\nuntil the response is full, prioritizing spam placement, biggest sends, then read-rate\nstandouts within a brand. Returned findings retain watchlist, signal, domain, and source\norder. Your own sending is never included.\n\nAn empty list is an ordinary answer, not a failure: a signal only fires on a campaign\nthat stands out for its own brand, and a watchlist of steady senders produces nothing.\nCheck `panel_status` to tell that apart from the panel being unreachable.\n\nThis is a separate request from the watchlist on purpose, so a slow or degraded panel\nread cannot delay the watchlist itself.\n","tags":["email-competitive"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/EmailCompetitiveRange"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The notable campaigns for the period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCompetitiveNotableFeed"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/competitive/watchlist/brands":{"post":{"x-snippet-key":"email.competitive.watchlist.brands.create","operationId":"createEmailCompetitiveWatchlistBrand","summary":"Add a competitor brand to the watchlist","description":"Adds a brand to the workspace's watchlist so its figures appear next to your\nown. Pass a `brand_id` from a brand search.\n\nAdding a brand records the one domain the panel sees the most of its mail\nfrom, and every figure reported for the brand describes that domain. A brand\nthat mails from several domains therefore reports less than its full volume.\nA brand the panel has never seen send cannot be measured at all and is\nrefused.\n\nHow many brands can be watched is capped per organization, counted across\nevery workspace it owns, so the same competitor watched from two workspaces\nuses two of the allowance.\n","tags":["email-competitive"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCompetitiveWatchlistBrandCreate"},"example":{"brand_id":"81531"}}}},"responses":{"201":{"description":"The brand was added to the watchlist.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCompetitiveWatchlistBrand"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/competitive/watchlist/brands/{watchlist_brand_id}":{"parameters":[{"name":"watchlist_brand_id","in":"path","required":true,"description":"The watchlist entry to act on.","schema":{"$ref":"#/components/schemas/CompetitiveWatchlistBrandID"}}],"get":{"x-snippet-key":"email.competitive.watchlist.brands.get","operationId":"getEmailCompetitiveBrand","summary":"Get a watched brand's figures","description":"Returns one watched brand's figures for the period, together with how each mailbox\nprovider treated its mail and how that compares with your own.\n\nThe headline figures are the ones the watchlist reports for this brand, derived the same\nway from the same fields. Estimated volume can differ very slightly between the two\nviews, because each request asks the panel about a different set of domains and the panel\nscales its estimate per request. The figures the two views share are either rates or\nbuilt from raw counts, and are identical. The per-provider breakdown, `esp`, and\n`list_size` are available only here.\n\nEvery figure is an estimate from an email panel, fetched while the request runs,\nexcept your own inbox rate where noted.\n","tags":["email-competitive"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/EmailCompetitiveRange"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The brand's figures for the period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCompetitiveBrandProfile"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"x-snippet-key":"email.competitive.watchlist.brands.delete","operationId":"deleteEmailCompetitiveWatchlistBrand","summary":"Remove a competitor brand from the watchlist","description":"Takes a brand off the workspace's watchlist and frees its place in the\norganization's allowance. Nothing about the brand is retained, so adding it\nagain starts a fresh entry.\n","tags":["email-competitive"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The brand was removed from the watchlist."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/competitive/watchlist/brands/{watchlist_brand_id}/campaigns":{"parameters":[{"name":"watchlist_brand_id","in":"path","required":true,"description":"The watchlist entry whose campaigns to return.","schema":{"$ref":"#/components/schemas/CompetitiveWatchlistBrandID"}}],"get":{"x-snippet-key":"email.competitive.watchlist.brands.campaigns.list","operationId":"getEmailCompetitiveBrandCampaigns","summary":"Get the campaigns a watched brand sent","description":"Returns a page of campaigns an email panel observed a watched brand sending over\nthe period, in the requested order. Sampled statistics describe eligible campaigns\nin the first 100 newest panel rows for each tracked domain, independently of the page.\n\nEach campaign is one send the panel saw reach real inboxes, so the subject and\ntiming are what the brand's subscribers received rather than anything the brand\npublished. Volume and read rate are panel estimates, fetched while the request\nruns.\n\nThe panel folds a day's low-volume sending into a single synthetic entry with no\ncreative and no volume. Those are left out, so the count here is lower than the\nnumber of rows the panel holds and describes campaigns a person would recognise\nas campaigns.\n","tags":["email-competitive"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/EmailCompetitiveRange"},{"name":"sort","in":"query","required":false,"description":"Field to sort campaigns by.","schema":{"$ref":"#/components/schemas/EmailCompetitiveCampaignSort"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The brand's campaigns for the period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCompetitiveCampaignFeed"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/competitive/watchlist/brands/{watchlist_brand_id}/campaigns/{campaign_id}":{"parameters":[{"name":"watchlist_brand_id","in":"path","required":true,"description":"The watched brand that sent the campaign.","schema":{"$ref":"#/components/schemas/CompetitiveWatchlistBrandID"}},{"name":"campaign_id","in":"path","required":true,"description":"The campaign to return, taken from the brand's campaign list.","schema":{"type":"string","minLength":1,"maxLength":19,"pattern":"^[0-9]+$","example":"3914827265"}}],"get":{"x-snippet-key":"email.competitive.watchlist.brands.campaigns.get","operationId":"getEmailCompetitiveBrandCampaign","summary":"Get one campaign a watched brand sent","description":"Returns one campaign an email panel observed a watched brand sending. It carries the\nsame figures the brand's campaign list gives for that campaign, so a page can open one\ncampaign without reading the whole list first.\n\nThe campaign has to be one the brand in the path sent. An identifier that belongs to\nanother brand's campaign comes back as not found, whether or not the panel holds it. A\nworkspace can read the campaigns of the brands it watches, and no others.\n\nThe panel folds a day of low-volume sending into one synthetic entry, and the campaign\nlist leaves those out. They stand for a day of sending rather than for a campaign\nanyone sent, so they come back as not found here as well.\n","tags":["email-competitive"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"responses":{"200":{"description":"The campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCompetitiveCampaign"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/competitive/watchlist/brands/{watchlist_brand_id}/send-time":{"parameters":[{"name":"watchlist_brand_id","in":"path","required":true,"description":"The watchlist entry whose sending pattern to return.","schema":{"$ref":"#/components/schemas/CompetitiveWatchlistBrandID"}}],"get":{"x-snippet-key":"email.competitive.watchlist.brands.sendTime","operationId":"getEmailCompetitiveBrandSendTime","summary":"Get when a watched brand sends","description":"Returns how a watched brand's sending is spread across the week: one figure per\nweekday and hour of the day, over the last 90 days, with the hour of the day it\nsends most of its mail in.\n\nEach hour counts when the brand **sent**, not when its subscribers opened or\nreceived the mail. It answers \"when does this brand mail its list\", which is what\na competing send has to be timed against. It says nothing about how busy a\nsubscriber's inbox was at that hour.\n\nHours are reported in the timezone you ask for, echoed back in `timezone`, and the\nweek is folded into that zone before it is totalled, so a send at 02:00 UTC on\nMonday counts as Sunday evening in New York. Label an axis from `timezone` rather than from what you asked for: a\nresponse the panel could not answer reports UTC regardless.\n\nExpect the weekday axis to look flat. For most brands the hour of the day is where\nthe pattern is, and which day of the week it is barely moves the figure; a grid\nwith little variation down its rows is a real finding about how the brand mails\nrather than a gap in the data.\n","tags":["email-competitive"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/EmailCompetitiveTimezone"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The brand's sending pattern for the period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCompetitiveSendTimeGrid"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/competitive/brands/search":{"get":{"x-snippet-key":"email.competitive.brands.search","operationId":"searchEmailCompetitiveBrands","summary":"Search brands to add to the watchlist","description":"Searches for brands by name and returns the ones that can be watched, each\nwith the domain its figures would describe and the identifier to add it with.\nPaste a domain instead of a name to find the brand that sends from it.\n\nBrands the panel has never seen send are left out, since no figure could be\nreported for them. Results are capped at eight and can omit matches whose\nsending domain could not be resolved. An empty result means no watchable match\nwas returned for this query; try a more specific name or known sending domain.\n","tags":["email-competitive"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"name":"q","in":"query","required":true,"description":"A brand name, or a sending domain to look up the brand behind it.","schema":{"type":"string","minLength":2,"maxLength":128,"example":"everlane"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Brands matching the search.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCompetitiveBrandSearchResults"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/competitive/volume-series":{"get":{"x-snippet-key":"email.competitive.volumeSeries","operationId":"getEmailCompetitiveVolumeSeries","summary":"Get send volume over time for watched brands","description":"Returns daily send volume for the watched brands you name, plus a line for your\nown sending, over one shared axis. Intended for a chart comparing a handful of\ncompetitors against yourself rather than the whole watchlist: each brand you name\nand each month of range adds to how long the request takes, so ask for the few\nyou are plotting.\n\nCompetitor volume is an estimate from an email panel, fetched while the request\nruns. Your own line counts messages accepted for delivery. The `source` field on each line records which of the two it is, and\nthe two are not measuring the same thing, so a chart putting them on one axis\nshould say so.\n\nEvery line carries one point per day of the period, oldest first, with a `0` for\na day nothing was observed, so the lines need no aligning before plotting. The last\npoint is the last whole UTC day, not the one in progress, so your own line and a\ncompetitor's cover the same days. A line with no points at all has a `panel_status`\nsaying why.\n","tags":["email-competitive"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"parameters":[{"$ref":"#/components/parameters/EmailCompetitiveRange"},{"name":"brand_ids","in":"query","required":false,"description":"Which watched brands to plot, in the order you want the lines. Omit to get only your own line. An id your workspace does not watch is rejected rather than skipped, so a chart cannot quietly lose a line.\n","style":"form","explode":false,"schema":{"type":"array","minItems":1,"maxItems":20,"uniqueItems":true,"items":{"$ref":"#/components/schemas/CompetitiveWatchlistBrandID"}}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The requested lines for the period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCompetitiveVolumeSeries"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/blocks":{"get":{"operationId":"listEmailBlocks","summary":"List reusable email blocks","description":"Returns the workspace's reusable email blocks without their content. Filter by part of the name with `q`, or by archive state with `archived`; leave `archived` out to return active and archived blocks together.","tags":["email-blocks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.blocks.list","parameters":[{"name":"sort","in":"query","description":"Field to sort by. Defaults to `created_at`.","schema":{"$ref":"#/components/schemas/EmailBlockSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"name":"q","in":"query","description":"Case-insensitive text to match within the block name.","schema":{"type":"string","maxLength":200}},{"name":"archived","in":"query","description":"Return only archived blocks when true, or only active blocks when false.","schema":{"type":"boolean"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The blocks on this page, without their content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlockList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createEmailBlock","summary":"Create a reusable email block","description":"Creates an unpublished block with a draft in its source language. Send the section as HTML in `fragment`, with `serializer_version` set to `2`: one presentation table whose single content cell sets `lang` to the source language and its own typography, under the rules `fragment_html` lists. Unfinished content can be saved; validating or publishing the block checks it.\n\nThe block is not live until you publish it. Each language keeps the authoring mode of its first section, so a section written as HTML stays HTML.\n","tags":["email-blocks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.blocks.create","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlockCreate"}}}},"responses":{"201":{"description":"The created block, with the `revision` to send when updating or duplicating it.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlock"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/blocks/validate":{"post":{"operationId":"validateEmailBlockFragment","summary":"Validate a reusable email section","description":"Checks a section against the rules applied when it is published: its structure and the content cell's typography, balanced Liquid, and registered contact properties. Contact properties are checked only for a caller with contact read access; without it, validation says nothing about them, and publication still refuses a property that is not registered or is archived. Returns the plain text derived from the section, or a `422` `validation_error` naming each field to correct. Nothing is saved or published. Each call computes a fresh result: an `Idempotency-Key` header is accepted but does not replay an earlier result.","tags":["email-blocks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.blocks.validate","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlockFragmentValidationRequest"}}}},"responses":{"200":{"description":"The section passed, with the plain text derived from it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlockFragmentValidation"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/blocks/{block_id}":{"parameters":[{"$ref":"#/components/parameters/EmailBlockId"}],"get":{"operationId":"getEmailBlock","summary":"Get a reusable email block","description":"Returns a block's metadata, including archived blocks. Send its `revision` when updating or duplicating the block; each language's content has its own draft revision.","tags":["email-blocks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.blocks.get","responses":{"200":{"description":"The block's metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlock"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateEmailBlock","summary":"Update a reusable email block","description":"Changes a block's name, description, archive state or source language, using the `revision` you last read. A stale revision returns a `409` `conflict_error`. The source language can change until the block is first published.\n\nTemplates that already link an archived block keep filling it, and new links to it are refused. Unarchive the block to link it again.\n","tags":["email-blocks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.blocks.update","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlockUpdate"}}}},"responses":{"200":{"description":"The updated block.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlock"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/blocks/{block_id}/duplicate":{"parameters":[{"$ref":"#/components/parameters/EmailBlockId"}],"post":{"operationId":"duplicateEmailBlock","summary":"Duplicate a reusable email block","description":"Copies every current draft language into a new unpublished block, with no publication history or translation-source references. Each language keeps its authoring mode. A change to the source block while copying returns a `409` `conflict_error`.","tags":["email-blocks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.blocks.duplicate","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlockDuplicate"}}}},"responses":{"201":{"description":"The new block.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlock"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/blocks/{block_id}/publish":{"parameters":[{"$ref":"#/components/parameters/EmailBlockId"}],"post":{"operationId":"publishEmailBlock","summary":"Publish a reusable email block","description":"Publishes the current drafts of the named languages, each with the draft `revision` you last read. All named languages publish together or none do. Saving a draft never publishes.\n\nTemplates that link the block in a published language use the new content for mail that starts afterwards, including broadcasts already scheduled. A message scheduled on its own keeps the content it was accepted with.\n\nA draft saved after you read it returns a `409` `conflict_error`, and a draft with no unpublished changes or invalid section content returns a `422` `validation_error`. So does a publication that would remove the only unsubscribe link from a live marketing template; the error names up to ten of those templates.\n\nA publication that makes live templates using the block require a new input the sender supplies returns a `409` `conflict_error` naming the inputs and up to ten templates. Unlike a stale draft, it asks for review: once those senders supply the inputs, repeat the same languages and revisions with `confirm` set to `true`, under a new idempotency key.\n","tags":["email-blocks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.blocks.publish","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlockPublish"}}}},"responses":{"200":{"description":"The publication, with the revisions it made live.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlockSubmission"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/blocks/{block_id}/languages":{"parameters":[{"$ref":"#/components/parameters/EmailBlockId"}],"get":{"operationId":"listEmailBlockLanguages","summary":"List reusable block languages","description":"Returns the block's languages, ordered by language tag, without their content. Each has its draft `revision`, its `authoring_mode` and its current published revision. A block holds at most 25 languages.","tags":["email-blocks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.blocks.languages.list","responses":{"200":{"description":"The block's languages, without their content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlockLanguageList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/blocks/{block_id}/languages/{language}":{"parameters":[{"$ref":"#/components/parameters/EmailBlockId"},{"$ref":"#/components/parameters/EmailBlockLanguageTag"}],"get":{"operationId":"getEmailBlockLanguage","summary":"Get a reusable block language","description":"Returns the draft section for the exact language requested, with the `revision` to send when saving or publishing it. A missing language returns a `404` `not_found_error` without falling back to another language. A section built in the Bird dashboard's visual editor has `authoring_mode` `visual` and is changed there.","tags":["email-blocks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.blocks.languages.get","responses":{"200":{"description":"The language's draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlockLanguage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"put":{"operationId":"upsertEmailBlockLanguage","summary":"Upsert a reusable block language","description":"Replaces one language's draft with a complete section, or copies a published revision back into the draft with `from_revision_id`. Send the draft `revision` you last read, or `0` to add a language. A stale revision returns a `409` `conflict_error`.\n\nUnfinished content can be saved, and saving never publishes. A language keeps the authoring mode of its first section, so a section in the other mode returns a `422` `validation_error`.\n","tags":["email-blocks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.blocks.languages.set","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlockLanguageUpsert"}}}},"responses":{"200":{"description":"The saved language draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlockLanguage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteEmailBlockLanguage","summary":"Delete a reusable block language","description":"Deletes a language that has never been published, with its draft. The block's source language and a language with a published revision cannot be deleted and return a `422` `validation_error`, because templates can link a published language.","tags":["email-blocks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.blocks.languages.delete","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The language was deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/blocks/{block_id}/languages/{language}/revisions":{"parameters":[{"$ref":"#/components/parameters/EmailBlockId"},{"$ref":"#/components/parameters/EmailBlockLanguageTag"}],"get":{"operationId":"listEmailBlockRevisions","summary":"List published block revisions","description":"Returns the retained publications of the exact language, highest `version_number` first by default. A `version_number` counts publications of the language and is separate from the draft `revision`. Drafts that were never published are not listed.","tags":["email-blocks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.blocks.languages.revisions.list","parameters":[{"name":"sort","in":"query","description":"Field to sort by. Defaults to `version_number`.","schema":{"$ref":"#/components/schemas/EmailBlockRevisionSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The language's published revisions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlockRevisionList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/blocks/{block_id}/languages/{language}/revisions/{revision_id}":{"parameters":[{"$ref":"#/components/parameters/EmailBlockId"},{"$ref":"#/components/parameters/EmailBlockLanguageTag"},{"$ref":"#/components/parameters/EmailBlockRevisionId"}],"get":{"operationId":"getEmailBlockRevision","summary":"Get a published block revision","description":"Returns one published revision of the exact block and language, including for archived blocks. To make it the draft again, save the language with `from_revision_id`. A revision that was never published returns a `404` `not_found_error`.","tags":["email-blocks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.blocks.languages.revisions.get","responses":{"200":{"description":"The published revision.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBlockRevision"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/templates":{"post":{"operationId":"createEmailTemplate","summary":"Create an email template","description":"Creates a template and its first editable draft.\n\nSend the template's `slug` (the name you send the template by), an optional display name that\ndefaults to the slug, a category, the authoring format (`source`), and the draft's content in one\nor more languages. Leave the content out to start from an empty draft. A slug already used in the\nworkspace returns a conflict.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.templates.author","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateCreate"},"example":{"slug":"welcome-email","category":"transactional","source":"html","languages":{"en":{"subject":"Welcome, {{ first_name }}","preview_text":"Your account is ready","html":"<!DOCTYPE html>\n<html>\n<body>\n<p>Hi {{ first_name }}, thanks for signing up.</p>\n</body>\n</html>\n"}}}}}},"responses":{"201":{"description":"Email template created.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"get":{"operationId":"listEmailTemplates","summary":"List email templates","description":"Returns a paginated list of email templates, newest first.\n\nThe list covers both the workspace's own templates and our built-in `system` templates. Use\n`scope` to get only one of the two, or leave it out to get both. When you leave it out, the\nworkspace's own templates come first, newest first, and our built-in templates fill the rest of\nthe list once the workspace's templates run out.\n\nFilter further by category, authoring format or `status`, or search with `q`, a case-insensitive\nsubstring match against the template's slug, name, and description. Use `status=active` to list\nonly the templates a send can use.\n\nOur built-in templates come in five visual themes. Each theme ships its own set of eight\nemails, and the sets overlap only partly. Use `theme` to see one of them. A template your\nworkspace authored has no theme, so naming one returns our built-ins alone.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.templates.list","parameters":[{"name":"scope","in":"query","required":false,"description":"Filter by who owns the template. Use `system` for our built-in templates and `workspace` for the ones your workspace created. Leave it out to get both.","schema":{"$ref":"#/components/schemas/TemplateScope"}},{"name":"category","in":"query","required":false,"description":"Return only `transactional` or `marketing` templates; omit to return both categories.","schema":{"$ref":"#/components/schemas/EmailTemplateCategory"}},{"name":"source","in":"query","required":false,"description":"Return only templates authored in this format.","schema":{"$ref":"#/components/schemas/EmailTemplateSource"}},{"name":"theme","in":"query","required":false,"description":"Filter by the visual theme a built-in template is designed in. Only our built-in templates have a theme, so naming one returns built-ins alone.","schema":{"$ref":"#/components/schemas/EmailTemplateThemeFilter"}},{"name":"status","in":"query","required":false,"description":"Return templates with this lifecycle status. Use `active` to list only the templates you can send now, which includes every built-in template. Use `draft` for your workspace's templates that have never been published.","schema":{"$ref":"#/components/schemas/TemplateStatus"}},{"name":"q","in":"query","required":false,"description":"A case-insensitive substring search across the template's slug, name, and description.","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of email templates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["attio","cli","mcp","n8n","sdk"]}},"/v1/email/templates/{template_ref}":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's id (`emt_…`) or slug. On read, a built-in `system` template's `bird_` slug also resolves here. Write operations (update, delete) accept a workspace template only, because a `system` template is immutable.\n","schema":{"type":"string","minLength":1},"example":"bird_welcome"}],"get":{"operationId":"getEmailTemplate","summary":"Get an email template","description":"Returns a template's metadata, language states, sendable languages, draft revision, and draft and published version IDs. Read a version's language to retrieve content.\n\nAccepts a template ID (`emt_…`), whether workspace or built-in, or a built-in `system` template's `bird_` slug. A `system` template has `null` for the workspace, draft, revision, and timestamp fields.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","responses":{"200":{"description":"The requested email template metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateEmailTemplate","summary":"Update an email template","description":"Updates a template's metadata and draft settings, such as its name or default language. Only the fields you send are changed.\n\nContent is not edited here: save a language on the draft version instead.\n\nSend the draft `revision` you last read. If someone else changed the draft first, including by saving a language, the revision is stale and the request returns a conflict so you can reload and retry.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateUpdate"}}}},"responses":{"200":{"description":"The template with the updated metadata and draft settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteEmailTemplate","summary":"Delete an email template","description":"Deletes the template from authoring and lists. The slug becomes available for reuse in the workspace, and the deletion cannot be undone.\n\nPublished versions remain readable and previewable when you supply the template ID and version ID, so you can review the original content of a started broadcast. Sections linked from reusable blocks show their current publication, which can differ from what a started broadcast froze. Deletion does not remove access to that published content. The draft is unavailable, and the old slug can refer to a different template after reuse.\n\nA template can't be deleted while a broadcast that has not started sending still uses it, because a `scheduled` or `accepted` broadcast has not pinned the content it will send yet. [List the broadcasts blocking a template delete](/docs/api/reference/list-email-template-broadcasts) to see which ones those are. A broadcast that has already started sending does not block the delete: it pinned its version when it started, so it keeps sending the content it froze.\n\nA template that an active Verify configuration pins as the body of its custom email sender can't be deleted either. The conflict reports only how many verification configurations pin it, directly or for one country, not which; open Verify settings in the dashboard to find the configuration or country sender using it and switch it to Bird's built-in email or another template.\n\nA message scheduled with this template does not block the delete either. It keeps only a reference to the template version until it falls due, so once the template is deleted that message is rejected with `generation_failure` at its scheduled time and no email is sent.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Email template deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/templates/{template_ref}/duplicate":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The source template to copy: a workspace template's id (`emt_…`) or slug, or a built-in `system` template's `bird_` slug. The copy is always a new workspace template.\n","schema":{"type":"string","minLength":1},"example":"welcome-email"}],"post":{"operationId":"duplicateEmailTemplate","summary":"Duplicate an email template","description":"Creates a new template by copying an existing one: one of your workspace\ntemplates, or a built-in `system` template (by its `bird_` slug). The copy\nis a new template with its own id and a single editable draft seeded from\nthe source's current content. It inherits the source's category, authoring\nformat (`source`), and description. Copying a workspace template also\ncarries over its default language and its missing-language policy, so the\ncopy behaves like what it was copied from. Links to reusable blocks are\nkept, so the copy fills the same blocks. The copy starts unpublished.\n\nBy default the copy's slug derives from the source's slug, for example\n`welcome-email-copy`, with a numeric suffix added if that slug is already\ntaken. Supply `slug` to choose your own. A slug already in use in the\nworkspace returns a conflict.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateDuplicate"}}}},"responses":{"201":{"description":"The newly created template copy.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/templates/{template_ref}/parameters":{"get":{"operationId":"getEmailTemplateParameters","summary":"Get published email template parameters","description":"Get the parameters and variables used by the template's published content in one language. The result describes the template and holds no saved values. Parameters are the names a broadcast supplies in `template.parameters`, and variables are the `bird.` references Bird fills in. The result identifies list values, which broadcast parameters cannot supply. It also includes a fingerprint that identifies the published content without exposing contact values. You cannot select an older template version. Requires email_marketing read permission in addition to email_management read. Parameter sites cover template subject, HTML and text; envelope overrides are checked by broadcast validation.","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.templates.parameters","parameters":[{"name":"template_ref","in":"path","required":true,"description":"Workspace template ID, workspace template slug, or built-in template slug.","schema":{"type":"string","minLength":1}},{"name":"language","in":"query","required":false,"schema":{"$ref":"#/components/schemas/LanguageTag"},"description":"Language of the template's published content. Omission uses the template's default language."},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The parameters and variables of the current published content.","headers":{"Cache-Control":{"schema":{"type":"string"},"description":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateParameters"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/templates/{template_ref}/preview":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template to preview: a workspace template's id (`emt_…`) or slug, or a built-in `system` template's `bird_` slug.\n","schema":{"type":"string","minLength":1},"example":"welcome-email"}],"post":{"operationId":"getEmailTemplatePreview","summary":"Get an email template preview","description":"Renders a template with the sample values you supply and returns the resulting subject, HTML, and plain-text bodies. Bird does not issue a recipient-specific unsubscribe URL in a preview. If you supply `bird.unsubscribe_url` in `parameters`, the preview renders your value; an empty link is not live. Bird adds unsubscribe content to marketing email at send time; transactional email gets no automatic unsubscribe footer. By default it renders the current draft, so you can check your changes before you submit it. Pass `version` to preview a specific published version instead; built-in `system` templates have no versions, so `version` on a `bird_` template returns a validation error. Pass `contact` to see the email the way one of your contacts would receive it. Works for your workspace templates and built-in `system` templates. Sample `parameters` are capped at 16 KB once serialized, and personalization that is not valid or not supported returns a validation error naming what to fix.\n\nA retained published version remains available by template ID after the template is deleted. Its draft and slug are unavailable.\n\nThe response also reports what the HTML uses that mail clients remove, ignore, or render inconsistently. Each finding in `compatibility` names the pattern, the line and column it sits on, and what to use instead, and `compatibility_severity` reduces them to one word for the whole body. It is advisory: the preview renders either way.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplatePreviewRequest"}}}},"responses":{"200":{"description":"The rendered preview.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplatePreview"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/templates/{template_ref}/versions":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's id (`emt_…`) or slug. A built-in `system` template's `bird_` slug also resolves here, to its one permanently published version.\n","schema":{"type":"string","minLength":1},"example":"emt_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"listEmailTemplateVersions","summary":"List email template versions","description":"Returns the template's versions as a cursor page (the current draft plus all published versions), newest first. Each entry names its languages without returning their content. Templates retain every language of every submitted version, so listing their content would grow the response with the template's history. Read a single version for its content. A published version's `variables` here leave out inputs of sections linked from reusable blocks; the single-version read includes them.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The template's versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateVersionList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/templates/{template_ref}/broadcasts":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's id (`emt_…`) or slug. A built-in `system` template's `bird_` slug also resolves here, but a system template can never be referenced by a broadcast, so this always returns an empty page for one.\n","schema":{"type":"string","minLength":1},"example":"emt_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"listEmailTemplateBroadcasts","summary":"List the broadcasts blocking a template delete","description":"Returns the broadcasts that block deleting this template, as a cursor page, newest first. Those are the ones that have not started sending, so they have not pinned the content they will send: `scheduled` and `accepted`. Clear every one of them and the delete goes through, unless a Verify configuration pins the template as the body of its custom email sender; that dependency is not listed here, and is cleared in the dashboard's Verify settings. Canceling clears either status; repointing at another template only works while the broadcast is `scheduled`, because an `accepted` broadcast is committed to send and an edit returns a conflict. A broadcast that is already sending is not listed and does not block the delete, because it froze its version when it started.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The broadcasts blocking a delete of the template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateBroadcastList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/templates/{template_ref}/versions/{version_id}":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's id (`emt_…`) or slug. On read, a built-in `system` template's `bird_` slug also resolves here, to its one permanently published version. Discarding a draft requires a workspace template, because a `system` template has no draft and returns `404` `not_found_error`.\n","schema":{"type":"string","minLength":1},"example":"emt_01krdgeqcxet5s7t44vh8rt9mg"},{"name":"version_id","in":"path","required":true,"description":"The version to read or reset.","schema":{"$ref":"#/components/schemas/EmailTemplateVersionID"},"example":"emv_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"getEmailTemplateVersion","summary":"Get an email template version","description":"Returns a single version of an email template:\n\n- Its lifecycle metadata (`status`, `version_number`, `published_at`).\n- The content it froze in every language.\n- Its `variables`: the parameters you supply when sending and the values Bird fills in for each recipient, told apart by `system`.\n\nA deleted workspace template's published versions remain readable when you pass its template ID as `template_ref`. Its slug can belong to a newer template, and its draft is no longer readable. Use the pinned IDs from a broadcast to review its original content before resuming. Sections the version links from reusable blocks show as currently published, not as the broadcast froze them. Leave the broadcast paused if you cannot verify what its remaining recipients will receive.\n\nUse [List email template versions](/docs/api/reference/list-email-template-versions) to enumerate the draft and published versions. [Roll back an email template](/docs/api/reference/rollback-email-template) makes an earlier published version live again. Returns a `404 Not Found` error if the template or version does not exist in the workspace.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","responses":{"200":{"description":"Email template version object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateVersion"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteEmailTemplateVersion","summary":"Delete an email template draft","description":"Discards the draft's unsaved work: its content resets to what is currently published (or to a single empty language when nothing has been published yet), so the draft matches what sends actually deliver again. Compare each language's `content_hash` against the published version's to see what a discard would throw away.\n\nThe draft itself remains, ready for new edits at a bumped `revision`, and what is published never changes. Only the draft can be discarded. Addressing a published version returns a `422` `validation_error`, because published versions are permanent history.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The draft was reset."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/templates/{template_ref}/versions/{version_id}/languages":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's id (`emt_…`) or slug. A built-in `system` template's `bird_` slug also resolves here, to its one permanently published version.\n","schema":{"type":"string","minLength":1},"example":"emt_01krdgeqcxet5s7t44vh8rt9mg"},{"name":"version_id","in":"path","required":true,"description":"The version whose languages to list.","schema":{"$ref":"#/components/schemas/EmailTemplateVersionID"},"example":"emv_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"listEmailTemplateVersionLanguages","summary":"List a version's languages","description":"Returns every language the version holds, ordered by language tag, without the content itself, so listing a template with twenty-five languages stays small.\n\nEach entry has the language's `revision` (send it back when you save that language) and its `content_hash`, so you can tell which languages changed since you last read them and fetch only those. Read a single language for its subject and bodies.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","responses":{"200":{"description":"The version's languages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateLanguageList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/templates/{template_ref}/versions/{version_id}/languages/{language}":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's id (`emt_…`) or slug. On read, a built-in `system` template's `bird_` slug also resolves here. Writing or removing a language requires a workspace template, because a `system` template has no draft to edit and returns `404` `not_found_error`.\n","schema":{"type":"string","minLength":1},"example":"emt_01krdgeqcxet5s7t44vh8rt9mg"},{"name":"version_id","in":"path","required":true,"description":"The version that holds the language.","schema":{"$ref":"#/components/schemas/EmailTemplateVersionID"},"example":"emv_01krdgeqcxet5s7t44vh8rt9mg"},{"name":"language","in":"path","required":true,"description":"The language as a BCP-47 tag.","schema":{"$ref":"#/components/schemas/LanguageTag"},"example":"pt-BR"}],"get":{"operationId":"getEmailTemplateLanguage","summary":"Get one language of a version","description":"Returns one language's content from a version (its subject and bodies) plus the `revision` to send back when saving it.\n\nWorks on any version, including a published version whose content is frozen. Returns a `404 Not Found` error if the version does not have the language.\n\nIn a language that links reusable blocks (`has_shared_blocks`), the HTML shows each block's current published content and changes when a block is published. Copying that HTML into another template creates independent content. Set `authoring` to `true` to read the HTML with its block markers and the `shared_blocks` links instead, which is what a save of the language needs.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.templates.languages.get","parameters":[{"name":"authoring","in":"query","description":"Return the HTML with its reusable block markers in place of the blocks' content, plus `shared_blocks`, so a language that links blocks can be saved back with its links intact. Compatibility locations still refer to the HTML with the blocks filled in.","schema":{"type":"boolean","default":false}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The version's content for this language.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateLanguage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]},"put":{"operationId":"upsertEmailTemplateLanguage","summary":"Upsert one language of a draft","description":"Saves one language's content on the template's draft, creating that language if the draft does not have it yet and replacing it in full if it does. Send the same content twice and the draft ends up the same way, so a sync job or CI run needs one call rather than a create-or-edit decision.\n\nSaving one language leaves every other language untouched, so a template with many languages can be edited a language at a time. Send the `revision` you last read to have a concurrent edit rejected with a `409` `conflict_error` instead of silently overwritten.\n\nOnly a draft can be saved: addressing a published version returns a `422` `validation_error`, because a published version never changes. A template holds at most 25 languages.\n\nTo link reusable blocks, send `shared_blocks` and place one HTML comment marker, `bird:shared-block:` followed by the binding's UUID, in `html` for each of its bindings, with an empty `text` and the `revision` read with `authoring` set to `true`. A language that already links blocks must be saved this way whenever its body changes. A language edited in the Bird dashboard's visual editor is changed in the dashboard, and this save returns a `422` `validation_error` for it.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateLanguageUpsert"}}}},"responses":{"200":{"description":"The saved language's new revisions and fingerprint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateLanguageSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateEmailTemplateLanguage","summary":"Update one language of a draft","description":"Changes part of one language's content on the template's draft: send only the fields you are changing and the rest keep their current values. Use this to fix a subject line without resending a megabyte of HTML.\n\nThe language must already exist on the draft. A language it does not have returns a `404` `not_found_error`. Save the language's full content instead to create it.\n\nSend the `revision` you last read to have a concurrent edit rejected with a `409` `conflict_error`. Only a draft can be edited. Addressing a published version returns a `422` `validation_error`.\n\nOn a language that links reusable blocks, send the `revision` and change only `subject` or `preview_text` here. Changing its body takes a full save with its `shared_blocks`.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateLanguageUpdate"}}}},"responses":{"200":{"description":"The edited language's new revisions and fingerprint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateLanguageSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteEmailTemplateLanguage","summary":"Delete one language from a draft","description":"Removes one language from the template's draft, along with its content. Every other language is untouched, and the change takes effect for sends when you next submit.\n\nThe draft's current default language cannot be removed on its own. Point the default at a different language first, then remove the old one; doing it in the other order returns a `422` `validation_error`. Removing a language the draft does not have returns a `404` `not_found_error`, and only a draft can be changed, so addressing a published version also returns a `422` `validation_error`.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The language was removed."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/templates/{template_ref}/versions/{version_id}/rollback":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's id (`emt_…`) or slug. Rollback resets a draft, and a built-in `system` template has no draft, so its `bird_` slug returns `404` `not_found_error` here.\n","schema":{"type":"string","minLength":1},"example":"emt_01krdgeqcxet5s7t44vh8rt9mg"},{"name":"version_id","in":"path","required":true,"description":"The published version to restore.","schema":{"$ref":"#/components/schemas/EmailTemplateVersionID"},"example":"emv_01krdgeqcxet5s7t44vh8rt9mh"}],"post":{"operationId":"rollbackEmailTemplate","summary":"Roll back an email template","description":"Makes an earlier published version the live version used by sends, and replaces the draft with that version's content so editing continues from it. The change is immediate. No new version is created, and the version history is unchanged. Include the draft `revision` you last read, so the request is rejected with a conflict if someone else changed the draft first. The draft's current content is replaced. Rolling back to the currently live version is allowed and resets the draft to it. The version's links to reusable blocks come back with its content. Only published versions can be rolled back to.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateRollback"}}}},"responses":{"200":{"description":"The template, with its draft reset to the restored version's content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/templates/{template_ref}/versions/{version_id}/submit":{"parameters":[{"name":"template_ref","in":"path","required":true,"description":"The template's id (`emt_…`) or slug. Submit freezes a draft, and a built-in `system` template has no draft, so its `bird_` slug returns `404` `not_found_error` here.\n","schema":{"type":"string","minLength":1},"example":"emt_01krdgeqcxet5s7t44vh8rt9mg"},{"name":"version_id","in":"path","required":true,"description":"The draft version to validate or publish.","schema":{"$ref":"#/components/schemas/EmailTemplateVersionID"},"example":"emv_01krdgeqcxet5s7t44vh8rt9mh"}],"post":{"operationId":"submitEmailTemplateVersion","summary":"Submit an email template version","description":"Submits the template's draft as a new immutable, numbered version and\nmakes it the live version used by sends. The draft remains editable.\n\nEvery language the draft has must have a subject and a body, and the\ndefault language must be present. Submission is all or nothing: an\nincomplete language rejects the request and the response reports every\nlanguage error. A submit freezes every language the draft carries, so it\ncannot name a subset. The draft does not have to hold every language you\nplan to support: add more in a later version.\n\nSet `validate_only: true` to run the checks without creating a version.\nSet `expected_revision` to reject a concurrent edit. An unchanged draft is\nrejected. Submission is synchronous, and a returned `version` is live.\n","tags":["email-templates"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.templates.submit","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateSubmit"},"example":{"validate_only":true}}}},"responses":{"200":{"description":"The submit's outcome, including the frozen version unless this was a validation run.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateSubmitResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/inbound-addresses":{"get":{"operationId":"listInboundAddresses","summary":"List inbound addresses","description":"Returns a paginated list of the workspace's inbound addresses. An inbound address is one you forward a real mailbox to, so mail sent to that mailbox arrives as a received email.\n","tags":["email-inbound-addresses"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of inbound addresses.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundAddressList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","n8n"]},"post":{"operationId":"createInboundAddress","summary":"Create an inbound address","description":"Creates a new inbound address. Forward a real mailbox to the returned `address`, and every message sent there arrives as a received email.\n\nThe address works as soon as it is returned and requires no verification step.\n\nAn optional `label` records which source mailbox the address maps to.\n","tags":["email-inbound-addresses"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundAddressCreate"}}}},"responses":{"201":{"description":"Inbound address created.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundAddress"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n"]}},"/v1/email/inbound-addresses/{inbound_address_id}":{"parameters":[{"name":"inbound_address_id","in":"path","required":true,"description":"Inbound address identifier. Starts with `ina_`.","schema":{"$ref":"#/components/schemas/InboundAddressID"}}],"get":{"operationId":"getInboundAddress","summary":"Get an inbound address","description":"Returns a single inbound address: the `address` you forward a mailbox to, and the `label` you gave it. Use [List inbound addresses](/docs/api/reference/list-inbound-addresses) to find IDs. A deleted or unknown address returns `404`.\n","tags":["email-inbound-addresses"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"Inbound address object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundAddress"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n"]},"patch":{"operationId":"updateInboundAddress","summary":"Update an inbound address","description":"Updates the label on an inbound address. The address itself is fixed and cannot be changed.","tags":["email-inbound-addresses"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundAddressUpdate"}}}},"responses":{"200":{"description":"Inbound address updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundAddress"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n"]},"delete":{"operationId":"deleteInboundAddress","summary":"Delete an inbound address","description":"Deletes an inbound address. Mail forwarded to the address after deletion is no longer received. Previously received messages are unaffected.\n","tags":["email-inbound-addresses"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Inbound address deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n"]}},"/v1/email/inbound-messages":{"get":{"operationId":"listInboundMessages","summary":"List received emails","description":"Returns a paginated list of received emails for the workspace, newest first. Filter by sender address, by the inbound address or mailbox that received the mail, or by a received-time range. Mail a mailbox received is listed whatever its placement, including spam and blocked mail, with its `mailbox_id` and, while the mailbox keeps it, its `thread_id`. Received emails are retained for 30 days.\n","tags":["email-inbound-messages"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"from","in":"query","required":false,"description":"Filter to messages whose sender address matches this value exactly. Sender addresses are stored lowercase, so pass the address in lowercase to match reliably.","schema":{"type":"string","format":"email","minLength":5},"example":"alice@example.com"},{"name":"inbound_address_id","in":"query","required":false,"description":"Filter to messages received on a specific inbound address.","schema":{"$ref":"#/components/schemas/InboundAddressID"}},{"name":"mailbox_id","in":"query","required":false,"description":"Filter to messages received by a specific mailbox.","schema":{"$ref":"#/components/schemas/MailboxID"}},{"name":"received_after","in":"query","required":false,"description":"Filter to messages received at or after this time.","schema":{"type":"string","format":"date-time"}},{"name":"received_before","in":"query","required":false,"description":"Filter to messages received at or before this time.","schema":{"type":"string","format":"date-time"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of received emails.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundEmailMessageList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","n8n"]}},"/v1/email/inbound-messages/{inbound_message_id}":{"parameters":[{"name":"inbound_message_id","in":"path","required":true,"description":"Received email identifier. Starts with `rem_`.","schema":{"$ref":"#/components/schemas/InboundEmailMessageID"}}],"get":{"operationId":"getInboundMessage","summary":"Get a received email","description":"Returns the parsed metadata for a received email:\n\n- Addresses.\n- Subject.\n- Threading headers.\n- The mailbox and conversation that received it, when a mailbox did.\n- Authentication results.\n- The attachment manifest.\n\nContent is fetched separately:\n\n- Get the parsed body from [Get a received email's body](/docs/api/reference/get-inbound-message-body).\n- Get the original MIME from [Get a received email's raw content](/docs/api/reference/get-inbound-message-raw).\n- Get attachment bytes from [Get a received email's attachment](/docs/api/reference/get-inbound-message-attachment).\n\nReceived emails are retained for 30 days. An unknown or expired message returns `404`.\n","tags":["email-inbound-messages"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"Received email object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundEmailMessage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n"]}},"/v1/email/inbound-messages/{inbound_message_id}/body":{"parameters":[{"name":"inbound_message_id","in":"path","required":true,"description":"Received email identifier. Starts with `rem_`.","schema":{"$ref":"#/components/schemas/InboundEmailMessageID"}}],"get":{"operationId":"getInboundMessageBody","summary":"Get a received email's body","description":"Returns the parsed, decoded body of a received email as JSON: the `html` and `text` parts, each `null` when the message had no such part. This is the reading-friendly form. For the exact original bytes (headers, signatures, full MIME structure) use [Get a received email's raw content](/docs/api/reference/get-inbound-message-raw). An unknown or expired message returns `404`. A message that exists but has no stored content returns both parts `null`.\n","tags":["email-inbound-messages"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"Parsed message body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundEmailMessageBody"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n"]}},"/v1/email/inbound-messages/{inbound_message_id}/raw":{"parameters":[{"name":"inbound_message_id","in":"path","required":true,"description":"Received email identifier. Starts with `rem_`.","schema":{"$ref":"#/components/schemas/InboundEmailMessageID"}}],"get":{"operationId":"getInboundMessageRaw","summary":"Get a received email's raw content","description":"Returns the original message exactly as received, in RFC 5322 (MIME) format, as a `message/rfc822` download. Use it when you need the exact bytes:\n\n- Full headers.\n- Signatures.\n- Your own MIME parsing.\n\nFor parsed fields use [Get a received email](/docs/api/reference/get-inbound-message) and [Get a received email's body](/docs/api/reference/get-inbound-message-body).\n\nReturns `404` when the message is unknown or its stored content has expired (received emails are retained for 30 days). A received message, including its attachments, cannot exceed 20 MB.\n","tags":["email-inbound-messages"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The original message in RFC 5322 (MIME) format.","headers":{"Content-Disposition":{"description":"Always `attachment`, so a browser saves the bytes rather than rendering them.","required":true,"schema":{"type":"string"}}},"content":{"message/rfc822":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp"]}},"/v1/email/inbound-messages/{inbound_message_id}/attachments":{"parameters":[{"name":"inbound_message_id","in":"path","required":true,"description":"Received email identifier. Starts with `rem_`.","schema":{"$ref":"#/components/schemas/InboundEmailMessageID"}}],"get":{"operationId":"listInboundMessageAttachments","summary":"List a received email's attachments","description":"Returns metadata for each attachment on a received email:\n\n- The `attachment_id`.\n- The declared filename.\n- The MIME type.\n- The size.\n\nThe same manifest is embedded in [Get a received email](/docs/api/reference/get-inbound-message). Fetch an individual attachment's bytes with [Get a received email's attachment](/docs/api/reference/get-inbound-message-attachment).\n","tags":["email-inbound-messages"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The attachments on the received email.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundAttachmentList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n"]}},"/v1/email/inbound-messages/{inbound_message_id}/attachments/{attachment_id}":{"parameters":[{"name":"inbound_message_id","in":"path","required":true,"description":"Received email identifier. Starts with `rem_`.","schema":{"$ref":"#/components/schemas/InboundEmailMessageID"}},{"name":"attachment_id","in":"path","required":true,"description":"Inbound attachment identifier. Starts with `rea_`.","schema":{"$ref":"#/components/schemas/InboundAttachmentID"}}],"get":{"operationId":"getInboundMessageAttachment","summary":"Get a received email's attachment","description":"Returns the raw bytes of a single attachment on a received email, served as `application/octet-stream`. The attachment's declared MIME type and filename are in its metadata, from [List a received email's attachments](/docs/api/reference/list-inbound-message-attachments), which is also where you find the `attachment_id`. Returns `404` when the attachment is not part of the message or its stored bytes have expired. A received message, including its attachments, cannot exceed 20 MB.\n","tags":["email-inbound-messages"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The raw attachment bytes.","headers":{"Content-Disposition":{"description":"Always `attachment`, so a browser saves the bytes rather than rendering them.","required":true,"schema":{"type":"string"}}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp"]}},"/v1/email/mailboxes":{"get":{"operationId":"listMailboxes","summary":"List mailboxes","description":"Returns a paginated list of the workspace's mailboxes, newest first. Search across `address`, `name` and `display_name` with `q`, look a mailbox up by its exact address, or filter by lifecycle state or domain.\n","tags":["email-mailboxes"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.mailboxes.list","parameters":[{"name":"address","in":"query","required":false,"description":"Filter to the mailbox with exactly this address.","schema":{"type":"string","format":"email","minLength":5},"example":"concierge@inbox.ai"},{"name":"q","in":"query","required":false,"description":"Case-insensitive substring match on the mailbox's `address`, `name`, or `display_name`.","schema":{"type":"string","minLength":1,"maxLength":320},"example":"concierge"},{"name":"state","in":"query","required":false,"description":"Return only `active` or `suspended` mailboxes. Use `include_deleted` for restorable deleted mailboxes.","schema":{"type":"string","enum":["active","suspended"]}},{"name":"domain","in":"query","required":false,"description":"Filter to mailboxes whose address is on this domain.","schema":{"type":"string","minLength":1},"example":"inbox.ai"},{"name":"include_deleted","in":"query","required":false,"description":"Include mailboxes deleted within their 30-day restore window. Defaults to false, so only active and suspended mailboxes are returned. A deleted mailbox has `deleted_at` set.","schema":{"type":"boolean","default":false}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of mailboxes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailboxList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"post":{"operationId":"createMailbox","summary":"Create a mailbox","description":"Creates a mailbox. The address is `local_part@domain`. The domain defaults to `inbox.ai`, Bird's shared mailbox domain, where creating the mailbox claims the address for your organization. It is first come, first served, and reserved to your organization even after the mailbox is deleted. You may instead name one of your own domains. A domain enabled for receiving email delivers to the mailbox directly. A domain this workspace has verified (its `status` is `verified`) that is not set up for receiving gives the mailbox a `forwarding_address` to forward its mail to. If another workspace receives the domain's mail, creation fails with `E17009`. An omitted local part is generated. On a custom domain, addresses of deleted mailboxes are quarantined for 30 days and remain reserved for your workspace.\n","tags":["email-mailboxes"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.mailboxes.create","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"examples":{"mailbox-open":{"summary":"An agent mailbox that accepts mail from anyone","value":{"name":"My Agent","receive_policy":"open"}}},"schema":{"$ref":"#/components/schemas/MailboxCreate"}}}},"responses":{"201":{"description":"Mailbox created.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Mailbox"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/mailboxes/{mailbox_id}":{"parameters":[{"name":"mailbox_id","in":"path","required":true,"description":"Mailbox ID or email address in this workspace.","schema":{"$ref":"#/components/schemas/MailboxIdentifier"}}],"get":{"operationId":"getMailbox","summary":"Get a mailbox","description":"Returns a single mailbox by ID or email address in this workspace. A mailbox deleted within its 30-day restore window is still returned, with `deleted_at` set. Once the window closes it is permanently removed and returns `404`.\n","tags":["email-mailboxes"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.mailboxes.get","responses":{"200":{"description":"Mailbox object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Mailbox"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n","sdk"]},"patch":{"operationId":"updateMailbox","summary":"Update a mailbox","description":"Updates a mailbox. The address and domain are immutable. Lowering the retention tier makes remembered messages older than the new cutoff eligible for deletion. If any exist, the request requires `confirm=true`. A tier change is applied to the mailbox's stored messages in the background; lowering the tier again while that is still being applied is refused with `E17050`. You can still raise it to a tier your plan permits.\n","tags":["email-mailboxes"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.mailboxes.update","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"confirm","in":"query","required":false,"description":"Set to `true` when lowering `retention_tier` would make remembered messages older than the new cutoff eligible for deletion. The request is rejected without it in that case.","schema":{"type":"boolean","default":false}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailboxUpdate"}}}},"responses":{"200":{"description":"Mailbox updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Mailbox"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"delete":{"operationId":"deleteMailbox","summary":"Delete a mailbox","description":"Deletes a mailbox. The address stops receiving mail immediately and enters quarantine. After 30 days, your workspace can bind the address to a new mailbox; the address remains reserved to your workspace. You can restore the mailbox for 30 days with `POST /email/mailboxes/{mailbox_id}/restore`. Normal message-retention expiry continues during that period. After 30 days, the mailbox and its remaining messages are permanently deleted. Returns `409` (`E01028`) if an enabled inbound route targets the mailbox. Disable, delete, or redirect those routes before retrying.\n","tags":["email-mailboxes"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.mailboxes.delete","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Mailbox deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/mailboxes/{mailbox_id}/restore":{"parameters":[{"name":"mailbox_id","in":"path","required":true,"description":"Mailbox ID or email address in this workspace.","schema":{"$ref":"#/components/schemas/MailboxIdentifier"}}],"post":{"operationId":"restoreMailbox","summary":"Restore a deleted mailbox","description":"Restores receiving and access to unexpired messages. Returns `404` if deletion was 30 or more days ago or permanent erasure has started, and `409` if the mailbox is not deleted or its address is unavailable.\n","tags":["email-mailboxes"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.mailboxes.restore","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Mailbox restored.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Mailbox"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/mailboxes/{mailbox_id}/forwarding-address":{"parameters":[{"name":"mailbox_id","in":"path","required":true,"description":"Mailbox ID or email address in this workspace.","schema":{"$ref":"#/components/schemas/MailboxIdentifier"}}],"post":{"operationId":"createMailboxForwardingAddress","summary":"Create a mailbox forwarding address","description":"Gives a mailbox on your own domain an address on our receiving domain.\nForward mail for the mailbox's `address` to it from your current email\nprovider, and the mail lands in this mailbox. We choose the address; the\nrequest takes no body. The response is the mailbox with\n`forwarding_address` set.\n\nIf the mailbox already has a forwarding address, it is returned\nunchanged, so retrying is safe. The address stays the same for the life\nof the mailbox, including after a delete and restore. A suspended\nmailbox can get one too; it stays suspended. Setting up the address does\nnot change DNS or your email provider, and does not show that forwarding\nworks. Add the forwarding rule at your provider, then send a new test\nmessage to `address`.\n\nReturns `422` for a mailbox on the shared inbox.ai domain, which already\nreceives mail directly. Also returns `422` when the mailbox's domain is\nnot verified in this workspace or another workspace receives mail for it.\n","tags":["email-mailboxes"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.mailboxes.forwarding_address.create","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The mailbox, with its forwarding address.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Mailbox"},"example":{"id":"mbx_01krdgeqcxet5s7t44vh8rt9mg","address":"support@acme.com","forwarding_address":"k7q2mzxw4h6p5ra3@eu1.inbound.bird.com","name":"Acme Support","display_name":"Acme Support","default_reply_to":null,"receive_policy":"open","state":"active","channel":"email","owner":{"type":"workspace","id":"ws_01krdgeqcxet5s7t44vh8rt9mg"},"inbound_address_id":"ina_01krdgeqcxet5s7t44vh8rt9mg","retention_tier":"30d","message_count":142,"thread_count":37,"size_bytes":12500,"metadata":{},"local_part_generated":false,"last_message_at":"2026-10-28T09:42:00Z","created_at":"2026-07-08T12:00:00Z","updated_at":"2026-10-28T10:00:00Z","deleted_at":null,"next":[{"kind":"external","description":"Configure forwarding at your email provider, then send a fresh test message to support@acme.com and inspect its delivered_to address."}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/mailboxes/{mailbox_id}/stats":{"parameters":[{"name":"mailbox_id","in":"path","required":true,"description":"Mailbox ID or email address in this workspace.","schema":{"$ref":"#/components/schemas/MailboxIdentifier"}}],"get":{"operationId":"getMailboxStats","summary":"Get mailbox email statistics","description":"Returns the mailbox's sent and received email statistics over a time window: a period-wide summary plus a bucketed series. Sent-mail metrics have the same delivery, engagement, and latency breakdowns as the email stats endpoints. `received` counts mail that arrived at the mailbox.\n\nRows are bucketed by the time the event happened rather than the time the message was sent, so engagement that arrived during the period for a message sent earlier is counted here. Statistics start when the mailbox starts sending and receiving; the mailbox's all-time `message_count` and `thread_count` live on the mailbox resource itself.\n\n`from` and `to` accept either calendar days (`YYYY-MM-DD`, `day` granularity only) or RFC 3339 instants (`hour` granularity only). Both bounds must use the same form. Window caps depend on `granularity`: 365 days at `day`, 30 days at `hour`. Set `timezone` to report in a local zone instead of UTC.\n","tags":["email-mailboxes"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.mailboxes.stats","parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive start of the window: a calendar day (`YYYY-MM-DD`, `day` granularity only) or an RFC 3339 instant rounded down to the hour (`hour` granularity only). Interpreted in `timezone`, or in UTC when `timezone` is omitted. A numeric UTC offset is rejected when `timezone` is set; use a calendar day or a `Z` (UTC) instant. Must use the same form as `to`. Defaults to 30 days before `to` at `day` granularity and 7 days before `to` at `hour`, when omitted.\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-07-01"}},{"name":"to","in":"query","required":false,"description":"Inclusive end of the window: a calendar day (`YYYY-MM-DD`, `day` granularity only) or an RFC 3339 instant rounded down to the hour (`hour` granularity only). Interpreted in `timezone`, or in UTC when `timezone` is omitted. A numeric UTC offset is rejected when `timezone` is set; use a calendar day or a `Z` (UTC) instant. Must use the same form as `from`. Defaults to today (day) or the current hour (hour) in that timezone when omitted. Window may not exceed 365 days at `day` or 30 days at `hour` granularity.\n","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","example":"2026-07-21"}},{"$ref":"#/components/parameters/StatsTimezone"},{"name":"granularity","in":"query","required":false,"description":"Granularity of the series: `day` (default) or `hour`. Echoed back as `period.grain`.\n","schema":{"type":"string","enum":["day","hour"],"default":"day"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The mailbox's sent and received email statistics for the requested period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailboxStatsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/mailboxes/{mailbox_id}/resume":{"parameters":[{"name":"mailbox_id","in":"path","required":true,"description":"Mailbox ID or email address in this workspace.","schema":{"$ref":"#/components/schemas/MailboxIdentifier"}}],"post":{"operationId":"resumeMailbox","summary":"Resume a suspended mailbox","description":"Resumes a mailbox that was suspended because the organization dropped below the plan needed to keep it active. The mailbox can send and receive again and its conversations and messages become visible. Resuming is refused when the organization has no room for another active mailbox, or for another custom inbox.ai handle, on its current plan. Free up a slot by deleting an active mailbox, or move to a bigger plan. Resuming a mailbox that is not suspended returns a conflict.\n","tags":["email-mailboxes"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.mailboxes.resume","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Mailbox activated.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Mailbox"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/mailboxes/{mailbox_id}/receive-rules":{"parameters":[{"name":"mailbox_id","in":"path","required":true,"description":"Mailbox ID or email address in this workspace.","schema":{"$ref":"#/components/schemas/MailboxIdentifier"}}],"get":{"operationId":"listMailboxReceiveRules","summary":"List receive rules","description":"Returns a paginated list of the mailbox's receive rules, oldest first. Filter by action to see only allow or only block entries.\n","tags":["email-mailboxes"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.mailboxes.receive_rules.list","parameters":[{"name":"action","in":"query","required":false,"description":"Return only `allow` or `block` rules; omit to return both actions.","schema":{"type":"string","enum":["allow","block"]}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of receive rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiveRuleList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"post":{"operationId":"createMailboxReceiveRule","summary":"Create a receive rule","description":"Adds an allow or block rule to the mailbox. Rules match the message's envelope sender. Domain entries also match subdomains. Block rules always win, both over allow rules and over the reply admission on allowlist mailboxes. An entry is either allow or block. Rules have no update operation, so a rule that needs the other action is a new rule and the old one is removed. A mailbox holds up to 200 rules.\n","tags":["email-mailboxes"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.mailboxes.receive_rules.create","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiveRuleCreate"}}}},"responses":{"201":{"description":"Receive rule created.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiveRule"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/mailboxes/{mailbox_id}/receive-rules/{rule_id}":{"parameters":[{"name":"mailbox_id","in":"path","required":true,"description":"Mailbox ID or email address in this workspace.","schema":{"$ref":"#/components/schemas/MailboxIdentifier"}},{"name":"rule_id","in":"path","required":true,"description":"Receive-rule identifier. Starts with `erl_`.","schema":{"$ref":"#/components/schemas/ReceiveRuleID"}}],"delete":{"operationId":"deleteMailboxReceiveRule","summary":"Delete a receive rule","description":"Removes a receive rule from the mailbox. A rule's allow or block action cannot be changed after creation; delete it and create a replacement.\n","tags":["email-mailboxes"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.mailboxes.receive_rules.delete","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Receive rule deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/inbound-routes":{"get":{"operationId":"listInboundRoutes","summary":"List inbound routes","description":"Returns a paginated list of the workspace's inbound routes in evaluation order, lowest priority number first. Filter by domain or by enabled state.\n","tags":["email-inbound-routes"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public"],"parameters":[{"name":"domain","in":"query","required":false,"description":"Filter to routes on this domain.","schema":{"type":"string","minLength":1},"example":"mail.acme.com"},{"name":"enabled","in":"query","required":false,"description":"Set to `true` for active routes or `false` for routes skipped during evaluation.","schema":{"type":"boolean"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of inbound routes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundRouteList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["n8n"]},"post":{"operationId":"createInboundRoute","summary":"Create an inbound route","description":"Creates a routing rule that delivers matching inbound mail on one of your domains to a mailbox, or drops it. Routes are evaluated in order, lowest `priority` first, and a mailbox's own address always matches ahead of any route you create. Mail that no route matches is still received as a plain received email. The `domain` must be one of your workspace's inbound-enabled domains. Some fields depend on each other, and that dependency is described on the field itself. Breaking one of those rules returns `422`.\n","tags":["email-inbound-routes"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundRouteCreate"}}}},"responses":{"201":{"description":"Inbound route created.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundRoute"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["n8n"]}},"/v1/email/inbound-routes/{route_id}":{"parameters":[{"name":"route_id","in":"path","required":true,"description":"Inbound route identifier. Starts with `ein_`.","schema":{"$ref":"#/components/schemas/EmailInboundRouteID"}}],"get":{"operationId":"getInboundRoute","summary":"Get an inbound route","description":"Returns a single inbound route:\n\n- Its match rule.\n- Its action.\n- Its target mailbox.\n- Its priority.\n- Its enabled state.\n\nUse [List inbound routes](/docs/api/reference/list-inbound-routes) to see every route in evaluation order.\n","tags":["email-inbound-routes"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public"],"responses":{"200":{"description":"Inbound route object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundRoute"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["n8n"]},"patch":{"operationId":"updateInboundRoute","summary":"Update an inbound route","description":"Updates an inbound route. Omitted fields are unchanged. The `domain` is immutable. Fields that depend on each other are checked against the updated route, so a change that leaves it inconsistent (for example `deliver_to_mailbox` without a target mailbox) returns `422`. Disabled routes are kept but skipped during evaluation.\n","tags":["email-inbound-routes"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundRouteUpdate"}}}},"responses":{"200":{"description":"Inbound route updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundRoute"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["n8n"]},"delete":{"operationId":"deleteInboundRoute","summary":"Delete an inbound route","description":"Deletes an inbound route. Mail the route matched falls through to the next route in priority order, or, when nothing matches, is received as a plain received email.\n","tags":["email-inbound-routes"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Inbound route deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["n8n"]}},"/v1/email/threads":{"get":{"operationId":"listEmailThreads","summary":"List threads","description":"Returns a paginated list of conversations across the workspace's mailboxes, most recently active first. `folder` selects inbox, archive, spam, blocked, sent, or trash. The default is inbox when neither folder nor custom labels are supplied. `labels` matches custom labels only; `read_state=read|unread` restricts read state. You can also filter by mailbox, by linked contact, by participant address, or by a subject substring.\n\nThis listing filters; it does not search message content.\nTrashed conversations appear only with `folder=trash`. Expired trash never appears.\n\n`before` and `after` filter by time. To page through the results, pass the response cursors back as `starting_after` or `ending_before`.\n","tags":["email-threads"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.threads.list","parameters":[{"name":"mailbox_id","in":"query","required":false,"description":"Filter to conversations in a mailbox by ID or email address in this workspace. An unknown or ambiguous email address returns 404; a valid mailbox ID with no matching threads returns an empty page.","schema":{"$ref":"#/components/schemas/MailboxIdentifier"}},{"name":"contact_id","in":"query","required":false,"description":"Filter to conversations linked to a specific contact.","schema":{"$ref":"#/components/schemas/ContactID"}},{"name":"folder","in":"query","required":false,"description":"Filter to a folder. Defaults to inbox when neither folder nor custom labels are supplied.","schema":{"$ref":"#/components/schemas/EmailThreadFolder"}},{"name":"read_state","in":"query","required":false,"description":"Filter to read or unread conversations. Omit for either state.","schema":{"$ref":"#/components/schemas/EmailThreadReadState"}},{"name":"labels","in":"query","required":false,"description":"Match every listed custom label. Repeat labels to supply more than one. System label names are refused. Names match in any casing.","schema":{"type":"array","maxItems":20,"items":{"type":"string","minLength":1,"maxLength":64}},"example":["urgent"]},{"name":"participant","in":"query","required":false,"description":"Conversations involving this address, matching the sender or any recipient. The match is case-insensitive and matches on any part of the address, so a fragment works as well as the whole address.","schema":{"type":"string","minLength":3,"maxLength":320},"example":"billing@acme.com"},{"name":"subject","in":"query","required":false,"description":"Conversations whose subject contains this text (case-insensitive).","schema":{"type":"string","minLength":3,"maxLength":256},"example":"quarterly invoice"},{"name":"after","in":"query","required":false,"description":"Filter to conversations whose most recent message is at or after this time. Use the response cursors for pagination.","schema":{"type":"string","format":"date-time"}},{"name":"before","in":"query","required":false,"description":"Filter to conversations whose most recent message is at or before this time. Use the response cursors for pagination.","schema":{"type":"string","format":"date-time"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of threads.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["attio","cli","mcp","n8n","sdk"]}},"/v1/email/threads/{thread_id}":{"parameters":[{"name":"thread_id","in":"path","required":true,"description":"Thread identifier. Starts with `thr_`.","schema":{"$ref":"#/components/schemas/ThreadID"}}],"get":{"operationId":"getEmailThread","summary":"Get a thread","description":"Returns a single conversation. Fetch the messages in the conversation with [List messages in a thread](/docs/api/reference/list-email-thread-messages). A thread whose retention tier has ended returns `410 Gone`.\n","tags":["email-threads"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.threads.get","responses":{"200":{"description":"Thread object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThread"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["attio","cli","mcp","n8n","sdk"]},"patch":{"operationId":"updateEmailThread","summary":"Update a thread","description":"Sets the conversation's `read` state and `folder`, adds or removes custom `labels`, and links or unlinks a contact. Set `read` to true or false to mark all retained received messages read or unread. Set `folder` to inbox, archive or spam; blocked and sent are assigned automatically. Use DELETE to trash a conversation and POST restore to recover eligible retained messages. A trashed conversation must be restored before its folder can change. Labels accept custom names only. An archived conversation returns to the inbox when a new received message is neither spam nor blocked. To block a sender going forward, add a receive rule. Any field you leave out stays unchanged.\n","tags":["email-threads"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.threads.update","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadUpdateRequest"}}}},"responses":{"200":{"description":"The updated thread.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThread"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"delete":{"operationId":"deleteEmailThread","summary":"Delete a thread","description":"Moves the conversation and all of its messages to the trash. Trashed messages are permanently deleted after 30 days, or sooner if the mailbox's retention period ends first. Pass `permanent=true` to permanently delete the conversation and its messages immediately. Pending scheduled sends are canceled in the same transaction as the deletion. If dispatch already claimed a send, deletion returns a conflict and changes nothing.\n","tags":["email-threads"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.threads.delete","parameters":[{"name":"permanent","in":"query","required":false,"description":"Permanently delete the conversation and its messages immediately instead of moving them to the trash.","schema":{"type":"boolean","default":false}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Thread deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/threads/{thread_id}/restore":{"parameters":[{"name":"thread_id","in":"path","required":true,"description":"Thread identifier. Starts with `thr_`.","schema":{"$ref":"#/components/schemas/ThreadID"}}],"post":{"operationId":"restoreEmailThread","summary":"Restore a thread from trash","description":"Restores the conversation's unexpired trashed messages and updates its message and unread counts. Messages past their trash deadline or the mailbox retention period stay deleted. Folder, read state and custom labels are preserved. Repeating the operation leaves restored messages unchanged. Previously canceled scheduled sends are not resumed.","tags":["email-threads"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.threads.restore","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Thread restored.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThread"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/threads/{thread_id}/messages":{"parameters":[{"name":"thread_id","in":"path","required":true,"description":"Thread identifier. Starts with `thr_`.","schema":{"$ref":"#/components/schemas/ThreadID"}}],"get":{"operationId":"listEmailThreadMessages","summary":"List messages in a thread","description":"Returns the messages in a conversation, newest first, both received and sent. To page through older messages, use `starting_after`. The sort order is fixed, so to render the messages in conversation order, reverse the page yourself.\n\nBy default, every message that is not in the trash is returned, whichever folder the conversation is in. Pass `label` to narrow the view instead: use `trash` for trashed messages, or any custom label.\n\nPass `include=extracted_text` to inline each message's extracted plain text. A thread whose retention tier has ended returns `410 Gone`.\n","tags":["email-threads"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.threads.messages.list","parameters":[{"name":"direction","in":"query","required":false,"description":"Filter to received (`inbound`) or sent (`outbound`) messages.","schema":{"$ref":"#/components/schemas/MessageDirection"}},{"name":"label","in":"query","required":false,"description":"Filter to messages that have this label. `trash` lists trashed messages. Any other label, whether that is `archive`, `spam`, `blocked`, `unread` or one of your own, lists the messages that have it and are not in the trash. When omitted, every message that is not trashed is returned, whichever folder the conversation is in. A custom label name matches in any casing.\n","schema":{"type":"string","minLength":1,"maxLength":64},"example":"unread"},{"name":"include","in":"query","required":false,"description":"Set to `extracted_text` to inline each message's extracted plain text.","schema":{"type":"string","enum":["extracted_text"]}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of messages in the conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadMessageList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["attio","cli","mcp","n8n","sdk"]}},"/v1/email/threads/{thread_id}/messages/{message_id}":{"parameters":[{"name":"thread_id","in":"path","required":true,"description":"Thread identifier. Starts with `thr_`.","schema":{"$ref":"#/components/schemas/ThreadID"}},{"name":"message_id","in":"path","required":true,"description":"Message ID (`rem_` for a received message, `em_` for a sent one).","schema":{"type":"string","minLength":1,"pattern":"^(rem|em)_[0-9a-hjkmnp-tv-z]{26}$"}}],"get":{"operationId":"getEmailThreadMessage","summary":"Get a message in a thread","description":"Returns a single message in a conversation, including its extracted plain text. Metadata and extracted text stay readable for the mailbox's retention tier. A message that has aged past its retention tier returns `410 Gone`. A message that exists but does not belong to this thread returns `404`.\n","tags":["email-threads"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.threads.messages.get","responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadMessage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["attio","cli","mcp","n8n","sdk"]},"patch":{"operationId":"updateEmailThreadMessage","summary":"Update a message in a thread","description":"Applies read-state, label, and contact changes to a message in a conversation. Omitted fields are left unchanged. The read flag is only valid on received messages.\n","tags":["email-threads"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadMessageUpdateRequest"}}}},"responses":{"200":{"description":"The updated message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadMessage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["n8n"]},"delete":{"operationId":"deleteEmailThreadMessage","summary":"Delete a message in a thread","description":"Moves the message to the trash. Trashed messages are permanently deleted after 30 days, or sooner if the mailbox's retention period ends first. Pass `permanent=true` to permanently delete the message immediately. When the last message in a conversation is permanently deleted, the conversation is deleted with it.\n","tags":["email-threads"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public"],"x-snippet-key":"none","parameters":[{"name":"permanent","in":"query","required":false,"description":"Permanently delete the message immediately instead of moving it to the trash.","schema":{"type":"boolean","default":false}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Message deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["n8n"]}},"/v1/email/threads/{thread_id}/messages/{message_id}/body":{"parameters":[{"name":"thread_id","in":"path","required":true,"description":"Thread identifier. Starts with `thr_`.","schema":{"$ref":"#/components/schemas/ThreadID"}},{"name":"message_id","in":"path","required":true,"description":"Message ID (`rem_` for a received message, `em_` for a sent one).","schema":{"type":"string","minLength":1,"pattern":"^(rem|em)_[0-9a-hjkmnp-tv-z]{26}$"}}],"get":{"operationId":"getEmailThreadMessageBody","summary":"Get a thread message's original body","description":"Returns the original rendered HTML and plain-text body of a message in a conversation. The original body is available for 30 days after the message occurred. Later requests return `410 Gone`, while the message's extracted text stays readable on the message itself.\n","tags":["email-threads"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.threads.messages.body","responses":{"200":{"description":"The original rendered body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadMessageBody"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/threads/{thread_id}/messages/{message_id}/raw":{"parameters":[{"name":"thread_id","in":"path","required":true,"description":"Thread identifier. Starts with `thr_`.","schema":{"$ref":"#/components/schemas/ThreadID"}},{"name":"message_id","in":"path","required":true,"description":"Message ID (`rem_` for a received message, `em_` for a sent one).","schema":{"type":"string","minLength":1,"pattern":"^(rem|em)_[0-9a-hjkmnp-tv-z]{26}$"}}],"get":{"operationId":"getEmailThreadMessageRaw","summary":"Get a thread message's raw content","description":"Returns the original message exactly as received, in RFC 5322 (MIME) format. Available for received messages for 30 days after the message occurred. Later requests return `410 Gone`. Sent messages have no stored raw form and return `404`.\n","tags":["email-threads"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","responses":{"200":{"description":"The original message in RFC 5322 (MIME) format.","headers":{"Content-Disposition":{"description":"Always `attachment`, so a browser saves the bytes rather than rendering them.","required":true,"schema":{"type":"string"}}},"content":{"message/rfc822":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp"]}},"/v1/email/threads/{thread_id}/messages/{message_id}/attachments":{"parameters":[{"name":"thread_id","in":"path","required":true,"description":"Thread identifier. Starts with `thr_`.","schema":{"$ref":"#/components/schemas/ThreadID"}},{"name":"message_id","in":"path","required":true,"description":"Message ID (`rem_` for a received message, `em_` for a sent one).","schema":{"type":"string","minLength":1,"pattern":"^(rem|em)_[0-9a-hjkmnp-tv-z]{26}$"}}],"get":{"operationId":"listEmailThreadMessageAttachments","summary":"List a thread message's attachments","description":"Returns the attachments on a message in a conversation. Attachment bytes are downloadable for the mailbox's retention tier after the message occurred. Later requests return `410 Gone`, while the attachment metadata stays readable on the message's `attachment_manifest`.\n","tags":["email-threads"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.threads.messages.attachments","responses":{"200":{"description":"The message's attachments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadMessageAttachmentList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/threads/{thread_id}/messages/{message_id}/attachments/{attachment_id}":{"parameters":[{"name":"thread_id","in":"path","required":true,"description":"Thread identifier. Starts with `thr_`.","schema":{"$ref":"#/components/schemas/ThreadID"}},{"name":"message_id","in":"path","required":true,"description":"Message ID (`rem_` for a received message, `em_` for a sent one).","schema":{"type":"string","minLength":1,"pattern":"^(rem|em)_[0-9a-hjkmnp-tv-z]{26}$"}},{"name":"attachment_id","in":"path","required":true,"description":"Attachment identifier. Starts with `ea_` for sent mail or `rea_` for received mail.","schema":{"type":"string","minLength":1,"pattern":"^(ea|rea)_[0-9a-hjkmnp-tv-z]{26}$"}}],"get":{"operationId":"getEmailThreadMessageAttachment","summary":"Get a thread message's attachment","description":"Returns the raw bytes of a single attachment on a conversation message. Works for both received messages (`rem_`) and sent messages (`em_`). Attachment bytes are downloadable for the mailbox's retention tier after the message occurred. Later requests return `410 Gone`.\n","tags":["email-threads"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","responses":{"200":{"description":"The raw attachment bytes.","headers":{"Content-Disposition":{"description":"Always `attachment`, so a browser saves the bytes rather than rendering them.","required":true,"schema":{"type":"string"}}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp"]}},"/v1/email/threads/{thread_id}/messages/{message_id}/reply":{"parameters":[{"name":"thread_id","in":"path","required":true,"description":"Thread identifier. Starts with `thr_`.","schema":{"$ref":"#/components/schemas/ThreadID"}},{"name":"message_id","in":"path","required":true,"description":"Message ID (`rem_` for a received message, `em_` for a sent one).","schema":{"type":"string","minLength":1,"pattern":"^(rem|em)_[0-9a-hjkmnp-tv-z]{26}$"}}],"post":{"operationId":"replyEmailThreadMessage","summary":"Reply to a thread message","description":"Sends a reply to a specific message in a conversation, from the mailbox's own address. Recipients are derived from the message being replied to: for a received message, its Reply-To address when present, otherwise its From address; for a message the mailbox sent, its original To recipients. Set `reply_all` to copy the original To and Cc recipients in as `Cc`, leaving out the mailbox's own address. Add `cc` or `bcc` to copy further recipients. The subject and the threading headers that keep the reply in this conversation are set automatically, and the reply is recorded in the conversation. To reply to a conversation as a whole, target its newest received message. Set `scheduled_at` to send later; the reply joins the conversation only at dispatch.\n","tags":["email-threads"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.threads.messages.reply","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadMessageReplyRequest"}}}},"responses":{"202":{"description":"Reply accepted for asynchronous delivery. A scheduled reply is recorded in the conversation only at dispatch.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadMessage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"410":{"$ref":"#/components/responses/Gone"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["attio","cli","mcp","n8n","sdk"]}},"/v1/email/mailboxes/{mailbox_id}/scheduled-messages":{"parameters":[{"name":"mailbox_id","in":"path","required":true,"description":"Mailbox ID or email address in this workspace that owns the scheduled send.","schema":{"$ref":"#/components/schemas/MailboxIdentifier"}}],"get":{"operationId":"listMailboxScheduledMessages","summary":"List scheduled mailbox sends","description":"List scheduled sends separately from conversation messages, including completed and canceled records. Filter by conversation or status; use cursors to page.","tags":["email-threads"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"responses":{"200":{"description":"List scheduled mailbox sends.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMailboxScheduledMessageList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"name":"thread_id","in":"query","description":"Filter by the reserved conversation identifier.","schema":{"$ref":"#/components/schemas/ThreadID"}},{"name":"status","in":"query","description":"Filter by scheduling state.","schema":{"$ref":"#/components/schemas/EmailMailboxScheduledMessageStatus"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/mailboxes/{mailbox_id}/scheduled-messages/{scheduled_message_id}":{"parameters":[{"name":"mailbox_id","in":"path","required":true,"description":"Mailbox ID or email address in this workspace that owns the scheduled send.","schema":{"$ref":"#/components/schemas/MailboxIdentifier"}},{"name":"scheduled_message_id","in":"path","required":true,"description":"Scheduled send identifier from scheduled_message_id in the acceptance response.","schema":{"$ref":"#/components/schemas/MailboxScheduledMessageID"}}],"get":{"operationId":"getMailboxScheduledMessage","summary":"Get a scheduled mailbox send","description":"Read the scheduled send and its dispatch, failure or cancellation state. The actual message enters the conversation only at dispatch.","tags":["email-threads"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"responses":{"200":{"description":"Get a scheduled mailbox send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMailboxScheduledMessage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/mailboxes/{mailbox_id}/scheduled-messages/{scheduled_message_id}/cancel":{"parameters":[{"name":"mailbox_id","in":"path","required":true,"description":"Mailbox ID or email address in this workspace that owns the scheduled send.","schema":{"$ref":"#/components/schemas/MailboxIdentifier"}},{"name":"scheduled_message_id","in":"path","required":true,"description":"Scheduled send identifier from scheduled_message_id in the acceptance response.","schema":{"$ref":"#/components/schemas/MailboxScheduledMessageID"}}],"post":{"operationId":"cancelMailboxScheduledMessage","summary":"Cancel a scheduled mailbox send","description":"Cancels a scheduled send before the scheduler claims dispatch. The record remains visible with status canceled. Cancellation does not refund the scheduled-email allowance. A send already claimed for dispatch or already terminal returns a conflict.","tags":["email-threads"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The message is canceled and no longer eligible to send."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/email/mailboxes/{mailbox_id}/messages":{"parameters":[{"name":"mailbox_id","in":"path","required":true,"description":"Mailbox ID or email address in this workspace.","schema":{"$ref":"#/components/schemas/MailboxIdentifier"}}],"get":{"operationId":"listMailboxMessages","summary":"List a mailbox's messages","description":"Returns the messages in a mailbox across all of its conversations,\nnewest first. By default only received messages in the inbox and all\nsent messages are returned. Pass `label` to see another view instead:\n\n- `archive`: Filed-away mail.\n- `spam` or `blocked`: Mail placed in either folder.\n- `trash`: Trashed messages.\n- `unread`: Messages you have not read yet, across all conversations.\n- Any custom label you have applied.\n\nFilter by direction or combined delivery status. Pass\n`include=extracted_text` to inline each message's extracted plain text.\n`before` and `after` filter by time. To page through results, pass the\nresponse cursors back as `starting_after` or `ending_before`.\n","tags":["email-threads"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public"],"x-snippet-key":"none","parameters":[{"name":"label","in":"query","required":false,"description":"Filter to messages that have this label. `trash` lists trashed messages. Any other label, whether that is `archive`, `spam`, `blocked`, `unread` or one of your own, lists the messages that have it and are not in the trash. When omitted, received messages in the inbox and all sent messages are returned. A custom label name matches in any casing.\n","schema":{"type":"string","minLength":1,"maxLength":64},"example":"unread"},{"name":"direction","in":"query","required":false,"description":"Filter to received (`inbound`) or sent (`outbound`) messages.","schema":{"$ref":"#/components/schemas/MessageDirection"}},{"name":"status","in":"query","required":false,"description":"Filter sent messages by combined delivery status: `accepted`, `sent`, `delivered`, or `failed`.","schema":{"type":"string","enum":["accepted","sent","delivered","failed"]}},{"name":"after","in":"query","required":false,"description":"Filter to messages that occurred at or after this time. Page through results with `starting_after` or `ending_before` instead of this value.","schema":{"type":"string","format":"date-time"}},{"name":"before","in":"query","required":false,"description":"Filter to messages that occurred at or before this time. Page through results with `starting_after` or `ending_before` instead of this value.","schema":{"type":"string","format":"date-time"}},{"name":"include","in":"query","required":false,"description":"Set to `extracted_text` to inline each message's extracted plain text.","schema":{"type":"string","enum":["extracted_text"]}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of the mailbox's messages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadMessageList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["n8n"]},"post":{"operationId":"createMailboxMessage","summary":"Create a message from a mailbox","description":"Sends a new message from the mailbox's own address and starts a new conversation with it. The request mirrors the plain send request minus `from`, because the mailbox is who the message comes from. We set the RFC 5322 Message-ID, so later replies from the recipients thread back into the conversation automatically. For an immediate send, the message is added to the mailbox and returned as the conversation's first message. Set `scheduled_at` to send later: the response reserves the message and conversation IDs with status `scheduled` and links the separate schedule through `scheduled_message_id`. The message joins the conversation only at dispatch. A suspended mailbox cannot send and returns `403`.\n","tags":["email-threads"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"email.mailboxes.messages.create","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMailboxComposeRequest"}}}},"responses":{"202":{"description":"Message accepted for asynchronous delivery. A scheduled send reserves its conversation and message IDs but is recorded only at dispatch.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadMessage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/email/smtp/configs":{"get":{"operationId":"listEmailSmtpConfigs","summary":"List SMTP configs","description":"Returns the SMTP send-option configs stored for API keys in this workspace, as a cursor page. Only keys with an explicitly stored config are included. A key with no config still accepts SMTP submissions, using your organization's default pool, the transactional category, and tracking on.\n","tags":["email-smtp-configs"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public"],"parameters":[{"name":"sort","in":"query","required":false,"description":"Sort by `created_at`, the default and only supported field.","schema":{"type":"string","enum":["created_at"],"default":"created_at"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of SMTP configs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSmtpConfigList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["n8n"]}},"/v1/email/smtp/configs/{api_key_id}":{"parameters":[{"name":"api_key_id","in":"path","required":true,"description":"ID of the API key the config applies to, the same key your SMTP client authenticates with.\n","schema":{"$ref":"#/components/schemas/APIKeyID"},"example":"key_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"getEmailSmtpConfig","summary":"Get an SMTP config","description":"Returns the SMTP send-option config stored for the given API key. Returns a `404` if you have not set a config for that key. The key still accepts SMTP submissions, using your organization's default pool, the transactional category, and tracking on.\n","tags":["email-smtp-configs"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public"],"responses":{"200":{"description":"SMTP config object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSmtpConfig"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["n8n"]},"patch":{"operationId":"updateEmailSmtpConfig","summary":"Update the SMTP config for an API key","description":"Sets the default send options applied to messages submitted over SMTP with this API key:\n\n- Which IP pool to send from.\n- The content category.\n- Tags.\n- Open and click tracking.\n- Which Brand to send for.\n\nSMTP submissions have no fields for these, so Bird stores them per key instead.\n\nA field you omit is left unchanged. If no config exists yet for this key, it is created first with the documented defaults (your organization's default pool, transactional category, no tags, tracking on), and omitted fields take those defaults. A key that does not belong to this workspace returns `404`.\n","tags":["email-smtp-configs"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSmtpConfigUpdate"}}}},"responses":{"200":{"description":"The stored SMTP config.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSmtpConfig"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["n8n"]}},"/v1/webhooks":{"post":{"operationId":"createWebhook","summary":"Create a webhook endpoint","description":"Registers an `active` webhook endpoint that receives the event types in `events` as signed HTTPS `POST` requests. The call stores the endpoint, subscribes it to each event type, generates its signing secret and, for a connector destination, stores a connection holding the credentials supplied. Nothing is sent when the endpoint is created; deliveries start with the next matching event. See the [webhooks guide](/docs/guides/webhooks) for delivery, signing, and retry behavior.\n\nThe `201` response is the only response that includes the signing secret (`whsec_` prefix). Store it immediately; if it is lost, [rotate the signing secret](/docs/api/reference/rotate-webhook-secret).\n\nA non-HTTPS or non-public `url`, an unknown event type, or exceeding the organization's endpoint limit returns `422`.\n\nCreating a connector endpoint does not contact its platform. `next` suggests [testing the endpoint](/docs/api/reference/test-webhook), which checks its fields with the platform.\n","tags":["webhooks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-snippet-key":"webhooks.create","x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreate"}}}},"responses":{"201":{"description":"Created webhook endpoint, including its one-time signing secret.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreated"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"get":{"operationId":"listWebhooks","summary":"List webhook endpoints","description":"Returns the workspace's webhook endpoints as a cursor-paginated list, newest first by default. Endpoint objects never include the signing secret; to inspect a single endpoint, use [Get a webhook endpoint](/docs/api/reference/get-webhook).\n","tags":["webhooks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-snippet-key":"webhooks.list","x-audiences":["public","command"],"parameters":[{"name":"sort","in":"query","required":false,"description":"Field to sort webhook endpoints by: `created_at` (the default; newest first with the default `order`) or the endpoint URL.\n","schema":{"$ref":"#/components/schemas/WebhookSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"name":"url","in":"query","required":false,"description":"Only endpoints delivering to exactly this URL. Several endpoints can share a URL, so this finds matches for a setup to reuse; it does not prevent a duplicate.\n","schema":{"type":"string","maxLength":2048},"example":"https://hooks.zapier.com/hooks/catch/123/abc/"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of webhook endpoints.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/webhooks/{webhook_id}":{"parameters":[{"name":"webhook_id","in":"path","required":true,"description":"ID of the webhook endpoint (`whk_` prefix), as returned when it was created.","schema":{"$ref":"#/components/schemas/WebhookEndpointID"},"example":"whk_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"getWebhook","summary":"Get a webhook endpoint","description":"Returns one webhook endpoint's configuration and current delivery `status`, including its URL and subscribed event types. The signing secret is never included; if you lost it, mint a new one with [Rotate webhook signing secret](/docs/api/reference/rotate-webhook-secret).\n","tags":["webhooks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-snippet-key":"webhooks.get","x-audiences":["public","command"],"responses":{"200":{"description":"Webhook endpoint with its current URL, subscriptions, and status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n","sdk"]},"patch":{"operationId":"updateWebhook","summary":"Update a webhook endpoint","description":"Updates the webhook endpoint. Only the fields you send change: `events` replaces the\nwhole subscription set, and `status` pauses or re-enables delivery.\n\nThe `200` response is the updated endpoint. Invalid input (a non-HTTPS or non-public\n`url`, an event type outside the catalog) returns a `422`. Updating a connector endpoint\ndoes not contact its platform. `next` suggests [testing the endpoint](/docs/api/reference/test-webhook),\nwhich checks its fields with the platform.\n","tags":["webhooks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-snippet-key":"webhooks.update","x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointUpdate"},"example":{"url":"https://example.com/webhook","description":"Updated webhook endpoint","events":["email.delivered","email.bounced","email.complained"],"status":"active"}}}},"responses":{"200":{"description":"Webhook endpoint after the update.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"delete":{"operationId":"deleteWebhook","summary":"Delete a webhook endpoint","description":"Permanently removes the webhook endpoint and stops all deliveries to it, including retries of earlier failed deliveries. This cannot be undone: recreating an endpoint later mints a new `id` and signing secret. To stop deliveries temporarily instead, set `status` to `paused` with [Update a webhook endpoint](/docs/api/reference/update-webhook).\n","tags":["webhooks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-snippet-key":"webhooks.delete","x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Webhook endpoint deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/webhooks/{webhook_id}/rotate-secret":{"parameters":[{"name":"webhook_id","in":"path","required":true,"description":"ID of the webhook endpoint (`whk_` prefix), as returned when it was created.","schema":{"$ref":"#/components/schemas/WebhookEndpointID"},"example":"whk_01krdgeqcxet5s7t44vh8rt9mg"}],"post":{"operationId":"rotateWebhookSecret","summary":"Rotate webhook signing secret","description":"Generates a new signing secret for the endpoint and returns it exactly once: store it\nimmediately, it cannot be retrieved after this response. For 24 hours every delivery\nis signed with both the old and the new secret, so a receiver verifying with either\nkeeps working while you roll the new one out. After the window the old secret stops\nsigning. Verification details are in the [webhooks guide](/docs/guides/webhooks).\n\nAn endpoint holds at most 5 concurrently valid secrets, so rotating repeatedly within\nthe overlap window fails with `WebhookTooManySecrets` until an older secret expires.\n","tags":["webhooks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-snippet-key":"webhooks.rotate_secret","x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"New signing secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRotateSecretResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/webhooks/{webhook_id}/test":{"parameters":[{"name":"webhook_id","in":"path","required":true,"description":"ID of the webhook endpoint (`whk_` prefix), as returned when it was created.","schema":{"$ref":"#/components/schemas/WebhookEndpointID"},"example":"whk_01krdgeqcxet5s7t44vh8rt9mg"}],"post":{"operationId":"testWebhook","summary":"Test a webhook with a sample event","description":"Sends a signed synthetic event and returns whether your endpoint accepted it, its HTTP status, and the round-trip latency. An unreachable endpoint returns `status: failed` in the response body. The endpoint has 10 seconds to respond.\n\nThe body is a minimal JSON object with the event `type` and `test: true`, signed like a real delivery. When the endpoint has a filter, `data` contains its configured equality values. It does not mirror that event's payload. Tests work on paused endpoints and do not appear in [List delivery attempts](/docs/api/reference/list-webhook-attempts). When a test event is delivered, a `degraded` endpoint returns to `active` and its failure count resets, as after a successful live delivery; the test changes nothing else.\n\nFor a connector endpoint, the test checks the endpoint's fields with the connected platform. Where the platform can be read without starting anything, as with Claude Managed Agents, Bird reads it instead of sending an event and returns `kind: probe`. The status, body and latency are then the platform's answer, and `delivered` means it accepted the fields, not that an event was delivered. When the platform's answer identifies a wrong field, `field` names it.\n\nThe operation returns `412` if, when `event_type` is omitted, the endpoint has no subscribed event type to use, or, for a test that sends an event, the endpoint lacks a valid signing secret; a `probe` needs no signing secret.\n","tags":["webhooks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-snippet-key":"webhooks.test","x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestRequest"}}}},"responses":{"200":{"description":"The test result, including whether your endpoint accepted the event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/webhooks/{webhook_id}/replay":{"parameters":[{"name":"webhook_id","in":"path","required":true,"description":"ID of the webhook endpoint (`whk_` prefix), as returned when it was created.","schema":{"$ref":"#/components/schemas/WebhookEndpointID"},"example":"whk_01krdgeqcxet5s7t44vh8rt9mg"}],"post":{"operationId":"createWebhookReplay","summary":"Replay failed deliveries","description":"Queues redelivery of deliveries that failed. The window runs from `since`\n(default: the last 24 hours) to `until`, and events the endpoint already received\nsuccessfully are skipped, so a replay never double-delivers.\n\nOnly failed attempts are replayed, and the window selects on attempt time rather than\non when the event occurred. An event the endpoint was never sent, such as one that\narrived while it was paused, has no failed attempt to replay, so a replay does not\nrecover it. Replay reads the delivery-attempt log, which retains three days, so that\nis the oldest history it reaches: an earlier `since` widens the window without\nrecovering anything older. A paused endpoint redelivers nothing at all:\nre-enable it with [Update a webhook endpoint](/docs/api/reference/update-webhook)\nfirst.\n\nThe `202` response means the replay is queued. Each redelivery then takes a single\nattempt rather than the retry schedule a live delivery follows, so a replay into an\nendpoint that is still broken costs one request per event; fix the endpoint and replay\nagain. No count or task ID is returned, so track results with\n[List delivery attempts](/docs/api/reference/list-webhook-attempts).\n\nOne replay redelivers at most the oldest 10,000 events in the window, and replays are\nlimited to 20 per organization per UTC day; beyond that the request returns a `429`\n`WebhookReplayQuotaExceeded`.\n","tags":["webhooks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-snippet-key":"webhooks.replay","x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookReplayRequest"}}}},"responses":{"202":{"description":"Replay queued. Events are redelivered asynchronously; no count or task ID is returned."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/webhooks/{webhook_id}/attempts":{"parameters":[{"name":"webhook_id","in":"path","required":true,"description":"ID of the webhook endpoint (`whk_` prefix), as returned when it was created.","schema":{"$ref":"#/components/schemas/WebhookEndpointID"},"example":"whk_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"listWebhookAttempts","summary":"List delivery attempts","description":"Returns the endpoint's recent delivery attempts, newest first. Each entry is one HTTP\nrequest, so a retried event appears once per try; use it to see what failed and why\nbefore requesting redelivery with\n[Replay failed deliveries](/docs/api/reference/create-webhook-replay).\n\nCap the page with `limit`, and pass `next_cursor` from the response as `starting_after` to\nget the next, older page. Narrow the time window with the `before`/`after` timestamps;\nthey combine with a cursor. Send only one of `starting_after` and `ending_before`; passing\nboth returns 422.\n","tags":["webhooks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-snippet-key":"webhooks.attempts","x-audiences":["public","command"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Maximum number of attempts to return. Defaults to 50, capped at 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"before","in":"query","required":false,"description":"Only return attempts strictly before this timestamp.","schema":{"type":"string","format":"date-time","minLength":1}},{"name":"after","in":"query","required":false,"description":"Only return attempts strictly after this timestamp.","schema":{"type":"string","format":"date-time","minLength":1}},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Recent delivery attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookAttemptList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/workspace/webhook-client-certificate":{"get":{"operationId":"getWorkspaceWebhookClientCertificate","summary":"Get the webhook client certificate","description":"Returns the client certificate that we present on webhook deliveries of your workspace, its state and any waiting signing request. Realtime delivers `realtime.*` events without the certificate. Connector endpoints and MCP Events subscriptions never present it.\n","tags":["webhooks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","responses":{"200":{"description":"The webhook client certificate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookClientCertificate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp"]},"patch":{"operationId":"updateWorkspaceWebhookClientCertificate","summary":"Update the webhook client certificate settings","description":"Changes when we present the client certificate on webhook deliveries, and the CRL check of the receiver's server certificate. Omit a field to keep its value. Test sends apply a change at once. Deliveries can take up to a few minutes to apply it. Setting `evaluating`, `enforced` or a `crl_check` of `full_chain` requires webhook mTLS to be enabled for this workspace. Without it, this returns 422. With it, setting `evaluating` or `enforced` without an uploaded certificate returns 409.\n","tags":["webhooks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookClientCertificateUpdate"}}}},"responses":{"200":{"description":"The updated webhook client certificate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookClientCertificate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp"]}},"/v1/workspace/webhook-client-certificate/signing-request":{"post":{"operationId":"createWorkspaceWebhookClientCertificateSigningRequest","summary":"Create a webhook client certificate signing request","description":"Generates a new key pair and returns its certificate signing request (CSR). The private key stays with us. Get the CSR signed by your certificate authority, then upload the certificate. A new request replaces a waiting one. The certificate in use stays in use until you upload the new one. If webhook mTLS is not enabled for this workspace, this returns 422.\n","tags":["webhooks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"201":{"description":"The webhook client certificate with the new signing request.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookClientCertificate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp"]}},"/v1/workspace/webhook-client-certificate/certificate":{"post":{"operationId":"submitWorkspaceWebhookClientCertificate","summary":"Upload the webhook client certificate","description":"Uploads the certificate that your certificate authority signed for the waiting signing request. It replaces the certificate in use. Test sends use the new certificate at once. Deliveries can keep presenting the previous one for up to a few minutes, so keep accepting both until then. Without a waiting signing request, this returns 409. A certificate that does not match the key of the signing request, has no `clientAuth` extended key usage or is outside its validity period returns an error. So does an intermediate certificate that is not a CA certificate in its validity period that signed the certificate before it. If webhook mTLS is not enabled for this workspace, this returns 422.\n","tags":["webhooks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookClientCertificateUpload"}}}},"responses":{"200":{"description":"The webhook client certificate with the uploaded certificate in use.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookClientCertificate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp"]}},"/v1/webhook-callbacks/rotate-signing-secret":{"post":{"operationId":"rotateWebhookCallbackSigningSecret","summary":"Rotate callback signing secret","description":"Generates a new signing secret for the workspace's SMS callback URLs and voice sequence webhook\nrequests, and returns it exactly once: store it immediately, it cannot be retrieved after this\nresponse. The secret is shared by every callback URL and sequence webhook in the workspace.\nFor 24 hours outbound callbacks and sequence webhook requests are signed with both the old and\nthe new secret, then the old one stops signing.\n\nA workspace holds at most 5 concurrently valid secrets, so rotating repeatedly within the\noverlap window fails with `WebhookTooManySecrets` until an older secret expires.\n","tags":["webhooks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"New signing secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRotateSecretResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp"]}},"/v1/webhook-callbacks/attempts":{"get":{"operationId":"listWebhookCallbackAttempts","summary":"List callback delivery attempts","description":"Returns the workspace's recent delivery attempts to SMS callback URLs, newest first. Each\nentry is one HTTP request, so a retried event appears once per try. The `url` is the\ncallback URL the request was sent to. Use this list to see what failed and why before\nrequesting redelivery with the callback replay operation.\n\nCap the page with `limit`, and pass `next_cursor` from the response as `starting_after` to\nget the next, older page. Narrow the time window with the `before`/`after` timestamps;\nthey combine with a cursor. Send only one of `starting_after` and `ending_before`; passing\nboth returns 422.\n\nAttempts to webhook endpoints are not included; list them with\n[List delivery attempts](/docs/api/reference/list-webhook-attempts).\n","tags":["webhooks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Maximum number of attempts to return. Defaults to 50, capped at 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"before","in":"query","required":false,"description":"Only return attempts strictly before this timestamp.","schema":{"type":"string","format":"date-time","minLength":1}},{"name":"after","in":"query","required":false,"description":"Only return attempts strictly after this timestamp.","schema":{"type":"string","format":"date-time","minLength":1}},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Recent callback delivery attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookAttemptList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp"]}},"/v1/webhook-callbacks/replay":{"post":{"operationId":"createWebhookCallbackReplay","summary":"Replay failed callback deliveries","description":"Queues redelivery of SMS callbacks that failed. The window runs from `since`\n(default: the last 24 hours) to `until`, and events whose callback was already received\nsuccessfully within that window are skipped. An event can still arrive more than once: a\nfailure inside the window followed by a success outside it is replayed, and a live\ndelivery can overlap a replay. Your receiver must deduplicate on the `webhook-id` header.\nEach event goes to the callback URL its original attempts used.\n\nOnly failed attempts are replayed, and the window selects on attempt time rather than\non when the event occurred. Replay reads the delivery-attempt log, which retains three\ndays, so that is the oldest history it reaches: an earlier `since` widens the window\nwithout recovering anything older.\n\nThe `202` response means the replay is queued. Each redelivery then takes a single\nattempt rather than the retry schedule a live delivery follows, so a replay into a\ncallback URL that is still failing costs one request per event; fix the receiver and\nreplay again. No count or task ID is returned, so track results with\nthe callback delivery attempts list.\n\nOne replay redelivers at most the oldest 10,000 events in the window. Callback replays\ncount toward the same limit of 20 replays per organization per UTC day as\n[Replay failed deliveries](/docs/api/reference/create-webhook-replay); beyond that the\nrequest returns a `429` `WebhookReplayQuotaExceeded`.\n","tags":["webhooks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookReplayRequest"}}}},"responses":{"202":{"description":"Replay queued. Events are redelivered asynchronously; no count or task ID is returned."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp"]}},"/v1/workspace/mtls-settings":{"get":{"operationId":"getWorkspaceMTLSSettings","summary":"Get the mTLS settings","description":"Returns the client certificate (mTLS) settings for API requests to your workspace.\n","tags":["access-restrictions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","responses":{"200":{"description":"The mTLS settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMTLSSettings"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp"]},"patch":{"operationId":"updateWorkspaceMTLSSettings","summary":"Update the mTLS settings","description":"Changes the client certificate (mTLS) settings for API requests to your workspace. Omit a field to keep its value. Setting `state` to `evaluating` or `enforced` returns 422 if mTLS is not enabled for this workspace, and otherwise 409 without a certificate authority. Other changes do not need mTLS to be enabled. A change can take up to 15 minutes to apply to every request.\n","tags":["access-restrictions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMTLSSettingsUpdate"}}}},"responses":{"200":{"description":"The updated mTLS settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMTLSSettings"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp"]}},"/v1/workspace/mtls-certificate-authorities":{"get":{"operationId":"listWorkspaceMTLSCertificateAuthorities","summary":"List mTLS certificate authorities","description":"Returns the certificate authorities that issue the client certificates of your workspace. A workspace has at most two.\n","tags":["access-restrictions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","responses":{"200":{"description":"The certificate authorities.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MTLSCertificateAuthorityList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp"]},"post":{"operationId":"createWorkspaceMTLSCertificateAuthority","summary":"Add an mTLS certificate authority","description":"Adds a certificate authority that issues client certificates for your workspace. The mTLS endpoint accepts a client certificate that chains to one of these certificate authorities. Your quota sets how many certificate authorities a workspace can have, at most two, so you can add a new one before you remove the old one. Adding one past the quota, or one that is already registered, returns 409. The certificate authority must issue certificates only to you. If it also issues them to others, set `expected_san` in the mTLS settings. If mTLS is not enabled for this workspace, this returns 422.\n","tags":["access-restrictions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MTLSCertificateAuthorityCreate"}}}},"responses":{"201":{"description":"The added certificate authority.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MTLSCertificateAuthority"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp"]}},"/v1/workspace/mtls-certificate-authorities/{certificate_authority_id}":{"parameters":[{"name":"certificate_authority_id","in":"path","required":true,"description":"ID of the certificate authority.","schema":{"$ref":"#/components/schemas/MTLSCertificateAuthorityID"}}],"get":{"operationId":"getWorkspaceMTLSCertificateAuthority","summary":"Get an mTLS certificate authority","description":"Returns one certificate authority of your workspace.\n","tags":["access-restrictions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","responses":{"200":{"description":"The certificate authority.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MTLSCertificateAuthority"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp"]},"delete":{"operationId":"deleteWorkspaceMTLSCertificateAuthority","summary":"Remove an mTLS certificate authority","description":"Removes a certificate authority. Client certificates that it issued can still pass for up to 15 minutes. Removing the last certificate authority while the state is `evaluating` or `enforced` returns 409.\n","tags":["access-restrictions"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The certificate authority was removed."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp"]}},"/v1/numbers":{"get":{"operationId":"listWorkspaceNumbers","x-snippet-key":"numbers.list","summary":"List your allocated numbers","description":"Returns a paginated list of the phone numbers currently allocated to your workspace, newest first. Each entry is either a dedicated number you bought or a shared number managed for you, as its `kind` field indicates. Pass `number` to look one up, or narrow the list with `country_code`, `number_type`, `prefix`, and `capabilities`. Use `search` to find a number by its name or reference, or `reference` for an exact match. An allocated number is not always enough to send from it: some countries also require an approved registration for the sender.","tags":["numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"search","in":"query","required":false,"description":"Matches part of the number, name, or reference, ignoring case. Number matching also ignores phone formatting such as spaces, parentheses, and hyphens. Name and reference matching preserves punctuation. Characters such as percent and underscore match literally.","schema":{"type":"string","maxLength":200}},{"name":"reference","in":"query","required":false,"description":"Return numbers with this exact reference. Matching is case-sensitive.","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"number","in":"query","required":false,"description":"Return only the number matching these digits. Give a full number with its country code, however your own records spell it: `+12025550188`, `12025550188`, `0012025550188`, and `+1 202 555 0188` all resolve to the same number. Spacing and punctuation are fine once a leading `+` or `00` marks the country code, or when `country_code` names the country; a grouped spelling without either is refused rather than guessed at, and a national spelling (bare digits without the country code) matches only when `country_code` names the country. A short code is matched on its bare digits instead, and since the same short code can be allocated in more than one country, pass `country_code` alongside it to name which one. This filter narrows the list like the others rather than replacing them, so a country or capability filter still applies. To match a range of numbers rather than one, use `prefix`.","schema":{"type":"string","minLength":1,"maxLength":24,"pattern":"^[0-9+()\\-. ]+$"}},{"name":"country_code","in":"query","required":false,"description":"Filter by the country a number belongs to, as an ISO 3166-1 alpha-2 code.","schema":{"type":"string","minLength":2,"maxLength":2}},{"name":"number_type","in":"query","required":false,"description":"Return only allocated numbers of this physical type after applying the country and prefix filters.","schema":{"$ref":"#/components/schemas/NumberType"}},{"name":"prefix","in":"query","required":false,"description":"Return only numbers that start with these digits. With `country_code`, the digits are national ones, matched right after the country dial code: with `country_code=US`, `prefix=212` returns the +1 212 area-code numbers allocated to you. Leave out the dial code and any national dialing prefix such as a leading 0; short codes never match a country-anchored prefix search. Without `country_code`, the digits are matched from the start of each stored number, ignoring a leading `+`, so short codes are reachable and a full number in digits finds itself. Digits only: up to 10 of them with `country_code`, 15 without.","schema":{"type":"string","pattern":"^[0-9]{1,15}$"}},{"name":"capabilities","in":"query","required":false,"description":"Filter by capability. Repeat the parameter to require several at once: `capabilities=sms&capabilities=voice` returns only numbers that support both.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","x-extensible-enum":["sms","voice"]}}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"List of the numbers allocated to the workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/numbers/available":{"get":{"operationId":"listAvailableNumbers","x-snippet-key":"numbers.available.list","summary":"List available phone numbers","description":"Returns phone numbers available for purchase in a country. Narrow the search with `number_type`, `capabilities`, and `prefix`. Inventory numbers come first and support pagination. The final page can include a live snapshot of numbers available from suppliers.\n\nInventory results are newest first by default. When you specify `number_type` and the suppliers on sale in the market are ranked into multiple priority tiers, results follow supplier priority, newest first within each tier. These searches reject `ending_before` and return neither `prev_cursor` nor `refresh_cursor`, so backward and refresh paging are unavailable. Country-only searches and markets with a single tier keep newest-first inventory ordering and support backward and refresh paging.\n","tags":["numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"country_code","in":"query","required":true,"description":"ISO 3166-1 alpha-2 country code to search in.","schema":{"type":"string","minLength":2,"maxLength":2}},{"name":"number_type","in":"query","required":false,"description":"Return only numbers of this physical type after applying the country and prefix filters.","schema":{"$ref":"#/components/schemas/NumberType"}},{"name":"prefix","in":"query","required":false,"description":"Return only numbers that start with these digits, matched right after the country dial code: with `country_code=US`, `prefix=212` matches +1 212 area-code numbers and `prefix=833` matches 833 toll-free numbers. Digits only. Leave out the country dial code and any national dialing prefix such as a leading 0. Short codes never match a prefix search.","schema":{"type":"string","pattern":"^[0-9]{1,10}$"}},{"name":"capabilities","in":"query","required":false,"description":"Filter by capability. Repeat the parameter to require several at once: `capabilities=sms&capabilities=voice` returns only numbers that support both.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","x-extensible-enum":["sms","voice"]}}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"List of available phone numbers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableNumberList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/numbers/available/{number}":{"get":{"operationId":"getAvailableNumber","x-snippet-key":"numbers.available.get","summary":"Get an available phone number","description":"Returns a single phone number available for purchase, whether it is already in inventory or can be acquired for you. Numbers supplied through a carrier remain available only while the carrier has them, so a number listed a moment ago may already be gone. A `404` means the number is currently unavailable for sale.","tags":["numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"number","in":"path","required":true,"description":"Phone number in E.164 format. The leading `+` is optional.","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The available phone number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableNumber"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/numbers/orders":{"post":{"operationId":"createNumbersOrder","x-snippet-key":"numbers.orders.create","summary":"Create a number order","description":"Orders a number for your workspace and starts its recurring charge. The available number's\n`pricing` is the current price, not a quote: the order resolves the price again when it\ncharges, so a price published in between applies; a carrier number's setup fee is usually the amount\nheld when the order was placed, or is charged then. Pass a\nnumber from `GET /v1/numbers/available`. Whether the number is already in\ninventory or acquired from a supplier, the response contains an order.\n\nMost orders complete immediately and return `201` with `status` of\n`completed` and `number_id` populated. That ID identifies the associated\nworkspace allocation; multiple orders can refer to it. Read its current holding\nstate with `GET /v1/numbers/{number_id}`, which can return not found after release.\nThe completed order remains in history. An order that cannot complete in the request\nreturns `202`; poll `GET /v1/numbers/orders/{order_id}` until it is\n`completed` or `failed`.\n\nA `412` means required identity verification is incomplete or organization\neligibility prevents the purchase. Follow the error's recovery guidance:\ncomplete missing verification, or contact support about an eligibility review\nor denial. An eligibility assessment still in progress returns `503`; retry later.\n\nSending a `compliance` block uses the order's existing `numbers` scope at write level.\n","tags":["numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumbersOrderCreate"},"example":{"number":"+18005550100","reference":"STORE-042"}}}},"responses":{"201":{"description":"The order completed, with number and number_id identifying its associated allocation. Read the number for its current holding state; the order remains completed after release.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumbersOrder"}}}},"202":{"description":"The order was accepted but could not complete in this request. Poll it for completion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumbersOrder"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"get":{"operationId":"listNumbersOrders","x-snippet-key":"numbers.orders.list","summary":"List your number orders","description":"Returns your workspace's number orders, newest first. Filter by status to find in-progress or failed orders.","tags":["numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"number_id","in":"query","required":false,"description":"Return orders associated with this exact workspace allocation, newest first. Multiple attempts can refer to the same allocation; the newest attempt is not necessarily the order that first assigned it.","schema":{"$ref":"#/components/schemas/AllocatedNumberID"}},{"name":"status","in":"query","required":false,"description":"Return only orders with status `charging`, `ordering`, `pending`, `completed`, or `failed`.","schema":{"$ref":"#/components/schemas/NumbersOrderStatus"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"List of the workspace's number orders.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumbersOrderList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/numbers/orders/{order_id}":{"get":{"operationId":"getNumbersOrder","x-snippet-key":"numbers.orders.get","summary":"Get a number order","description":"Returns a number order by id, including its lifecycle state and, once completed, the associated allocation. The association remains in order history after release; reading the number can then return not found.","tags":["numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/NumbersOrderID"},"description":"Identifier of the order."},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumbersOrder"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/numbers/{number_id}":{"get":{"operationId":"getWorkspaceNumber","x-snippet-key":"numbers.get","summary":"Get an allocated number","description":"Returns a single phone number allocated to your workspace, whether it is a dedicated number you bought or a shared number managed for you. Numbers you have released are no longer returned. An allocated number is not always enough to send from it: some countries also require an approved registration for the sender.","tags":["numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"number_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AllocatedNumberID"},"description":"Identifier of the number, as returned in the id field of GET /v1/numbers."},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Number"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"patch":{"operationId":"updateWorkspaceNumber","x-snippet-key":"numbers.update","summary":"Update an allocated number","description":"Updates the name and reference for a number allocated to your workspace. Omit a field to keep its current value, or send null to clear it. Leading and trailing whitespace is removed. References need not be unique.","tags":["numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"number_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AllocatedNumberID"},"description":"Identifier returned by the allocated-number list."},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberUpdate"}}}},"responses":{"200":{"description":"The updated number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Number"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]},"delete":{"operationId":"cancelWorkspaceNumber","x-snippet-key":"numbers.cancel","summary":"Cancel a dedicated number","description":"Cancels one of your workspace's dedicated numbers at the end of its current billing period. The number is not charged for another period, keeps its current status until the period ends, and is then released. The `202` response returns the number with `releases_at` set to that time, and cancelling a number that is already scheduled returns the same schedule. A number with no subscription behind it, such as one allocated to you without a charge, is released immediately and answers `200` with the number as released. While a renewal payment for the number is overdue, the request answers `409` until it is paid. To release a number now, use `POST /v1/numbers/{number_id}/release`. Shared numbers belong to Bird-managed shared infrastructure and cannot be cancelled from your workspace.","tags":["numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"number_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AllocatedNumberID"},"description":"Identifier of the number to cancel, as returned in the id field of GET /v1/numbers."},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The number had no subscription behind it and was released now. Its `status` is `released` and `released_at` is set.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Number"},"example":{"id":"nda_01krdgeqcxet5s7t44vh8rt9mg","kind":"dedicated","number":"+12025550123","name":"Support line","reference":"CUST-778812","country_code":"US","number_type":"local","capabilities":["sms","voice"],"status":"released","allocated_at":"2026-08-19T10:00:00Z","releases_at":null,"released_at":"2026-10-06T14:02:11Z","ownership":null,"pricing":null}}}},"202":{"description":"Cancellation scheduled. The number stays allocated, with its current status, until `releases_at`.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Number"},"example":{"id":"nda_01krdgeqcxet5s7t44vh8rt9mg","kind":"dedicated","number":"+12025550123","name":"Support line","reference":"CUST-778812","country_code":"US","number_type":"local","capabilities":["sms","voice"],"status":"active","allocated_at":"2026-08-19T10:00:00Z","releases_at":"2026-10-19T10:00:00Z","released_at":null,"ownership":null,"pricing":{"recurring_price":{"amount":"0.00995","currency_code":"USD"},"recurring_period":{"unit":"month","count":1},"intervals_per_charge":12,"error":null}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/numbers/{number_id}/release":{"post":{"operationId":"releaseWorkspaceNumber","x-snippet-key":"numbers.release","summary":"Release a dedicated number","description":"Releases one of your workspace's dedicated numbers now and stops its recurring charge. Your workspace can no longer use the number after release, and the rest of the current billing period is not refunded. This also releases a number already scheduled for cancellation. While a renewal payment for the number is overdue, the request answers `409` until it is paid. To keep the number until the end of the period you paid for, use `DELETE /v1/numbers/{number_id}` instead. Shared numbers belong to Bird-managed shared infrastructure and cannot be released from your workspace.","tags":["numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"number_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AllocatedNumberID"},"description":"Identifier of the number to release, as returned in the id field of GET /v1/numbers."},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Number released.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/organization/billing/prices/resolve":{"get":{"operationId":"getBillingResolvedPrice","x-snippet-key":"billing_prices.resolve","summary":"Get the effective price for a product","description":"Returns the effective unit price, tax, and gross price for a product after organization- and plan-specific pricing. Provide exactly one of `product_id` or `product_slug`. You can also provide pricing dimensions and a currency. Pass `plan_id` to price under a published self-serve plan in place of your current plan; organization-specific rates still take precedence. The currency defaults to the organization's billing currency; if necessary, the price is converted from the product's base currency. Requires a delegated user OAuth token with `org:billing:read`; workspace and organization master API keys are refused with `403`.\n\nWhen `is_priced` is `false`, no published price matched. The `unit_price`, `tax_amount`, and `gross_price` amounts are zero placeholders and must not be used as a quote. An explicitly published zero price returns `is_priced: true`.","tags":["billing"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard"],"parameters":[{"name":"product_id","in":"query","required":false,"description":"Product ID to price. Provide exactly one of `product_id` or `product_slug`.","schema":{"$ref":"#/components/schemas/ProductID"}},{"name":"product_slug","in":"query","required":false,"description":"Product slug to price. Provide exactly one of `product_id` or `product_slug`.","schema":{"type":"string","minLength":1}},{"name":"plan_id","in":"query","required":false,"description":"Published self-serve plan to price under in place of your current plan. Returns `404` if the plan is not an active self-serve plan. The response's `included` flag still reflects your current entitlements, not this plan.","schema":{"$ref":"#/components/schemas/ProductID"}},{"name":"dimensions","in":"query","required":false,"style":"deepObject","explode":true,"description":"Key-value pairs that refine attribute-based pricing, such as destination country or sender type. For example, `dimensions[country_code]=US`.","schema":{"type":"object","additionalProperties":{"type":"string"}}},{"name":"currency","in":"query","required":false,"description":"Three-letter ISO currency code. Defaults to your organization's billing currency.","schema":{"type":"string","minLength":3,"maxLength":3}},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The resolved price.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingResolvedPrice"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["sdk"]}},"/v1/organization/billing/wallets":{"get":{"operationId":"listBillingWallets","x-snippet-key":"billing_wallets.list","summary":"List wallets","description":"Returns all wallets for the organization. A wallet is created automatically with the organization and pays usage charges. Amounts are decimal strings in `currency_code`; `balance` is the amount currently available to spend, excluding additional `credit_limit` headroom. Requires a delegated user OAuth token with `org:billing:read`; workspace and organization master API keys are refused with `403`.\n","tags":["billing"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard"],"responses":{"200":{"description":"The wallets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingWalletList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["sdk"]}},"/v1/voice/trunks":{"get":{"operationId":"listVoiceTrunks","x-snippet-key":"voice.trunks.list","summary":"List SIP trunks","description":"Returns the workspace's SIP trunks as a paginated list, each with its assigned `domain` and access control lists. Create a trunk to provision a new one, or use `voice.trunks.get` to fetch an existing trunk by ID.\n","tags":["voice-trunks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"sort","in":"query","required":false,"description":"Field to sort by.","schema":{"$ref":"#/components/schemas/VoiceTrunkSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of SIP trunks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceTrunkList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createVoiceTrunk","x-snippet-key":"voice.trunks.create","summary":"Create a SIP trunk","description":"Provisions a new SIP trunk for the workspace. Bird assigns a unique domain for the trunk; use this domain as the SIP registrar or proxy address in your PBX or SIP client. Pass `digest_algorithms` when the PBX needs a specific Digest hash, such as MD5-only equipment. Otherwise the trunk offers Bird's default of SHA-256 then MD5.\n","tags":["voice-trunks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceTrunkCreate"},"example":{"digest_algorithms":["MD5"],"name":"Production PBX trunk","sip_trunking_enabled":true}}}},"responses":{"201":{"description":"SIP trunk created.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceTrunk"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/trunks/{trunk_id}":{"parameters":[{"name":"trunk_id","in":"path","required":true,"description":"ID of the SIP trunk to retrieve, update, or delete.","schema":{"$ref":"#/components/schemas/SIPTrunkID"},"example":"spt_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"getVoiceTrunk","x-snippet-key":"voice.trunks.get","summary":"Get a SIP trunk","description":"Returns a single SIP trunk, including its Bird-assigned `domain`, its IP access control lists, and its allowed API keys. Returns a 404 `not_found_error` if the trunk does not exist in the workspace.\n","tags":["voice-trunks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"SIP trunk with its current configuration and status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceTrunk"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateVoiceTrunk","x-snippet-key":"voice.trunks.update","summary":"Update a SIP trunk","description":"Updates a SIP trunk's `name`, access control (`ip_acls`, `allowed_api_key_ids`), and Digest algorithm offer (`digest_algorithms`). Omitted fields stay unchanged; each list, when present, replaces the previous list wholesale. An empty body or invalid list entry returns a 422 `validation_error`; a trunk outside the workspace returns a 404 `not_found_error`. Turning inbound off returns 412 if it would leave a live emergency number without a supported callback route.\n","tags":["voice-trunks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceTrunkUpdate"}}}},"responses":{"200":{"description":"Updated SIP trunk.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceTrunk"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteVoiceTrunk","x-snippet-key":"voice.trunks.delete","summary":"Delete a SIP trunk","description":"Removes the SIP trunk. Calls already in progress on this trunk are not affected. Clear an attached emergency number in the dashboard before deleting the trunk. After deletion, new calls cannot use the trunk. Historical leg records retain the trunk reference. The generated domain is not reused. Deletion returns 412 if it would leave a live emergency number without a supported callback route; configure another route before deleting the trunk.\n","tags":["voice-trunks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"SIP trunk deleted.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/session-credentials":{"post":{"operationId":"createVoiceSessionCredential","x-snippet-key":"voice.session_credentials.create","summary":"Create a SIP session credential","description":"Issues a workspace-scoped SIP digest credential valid for five minutes. The password appears only in this response; create another credential if you lose it. Trunks must allow session credentials to accept it.\n\nThe request has no body. Each successful request creates a fresh credential, including retries. Keep retries bounded: creating more than 20 live credentials for the same caller invalidates the oldest. Treat the password as a bearer secret until expires_at.\n","tags":["voice-trunks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Does not deduplicate this operation. Every successful attempt creates a fresh credential.","schema":{"type":"string","maxLength":255}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"201":{"headers":{"Cache-Control":{"description":"Prevents storage of the credential in HTTP caches.","schema":{"type":"string","enum":["no-store"]}}},"description":"Credential minted. The password appears only in this response.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSessionCredential"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/trunks/{trunk_id}/gateways":{"parameters":[{"name":"trunk_id","in":"path","required":true,"description":"ID of the SIP trunk whose gateways to list or create.","schema":{"$ref":"#/components/schemas/SIPTrunkID"},"example":"spt_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"listVoiceTrunkGateways","x-snippet-key":"voice.trunks.gateways.list","summary":"List a SIP trunk's gateways","description":"Returns the gateway addresses used to forward inbound calls to this trunk, ordered by priority. A trunk with no gateway refuses inbound calls. Returns a `404 Not Found` error if the trunk does not exist in the workspace.\n\nReturns the complete collection without pagination, including any pre-existing gateways above the current limit of 20. Reads are available when inbound calling is disabled.\n","tags":["voice-trunks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The complete gateway list, ordered by priority and then creation time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceTrunkGatewayList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createVoiceTrunkGateway","x-snippet-key":"voice.trunks.gateways.create","summary":"Create a gateway on a SIP trunk","description":"Adds a gateway address for forwarding inbound calls to this trunk.\n\nUnless the trunk's inbound routing in the dashboard sends calls elsewhere,\ncalls hunt the trunk's **All gateways (automatic)** group. It holds every\ngateway and tries them in `priority` order, lowest first, until one\nanswers. Gateways with equal priority share calls evenly.\n\n`sip_uri` identifies the peer host, while `destination_format` and\n`origination_format` control the called and calling number formats. Both\nnumber formats default to E.164.\n\nA SIP URI already registered on this trunk returns `409 Conflict`. An\ninvalid SIP URI, a SIP URI carrying a user part, or a malformed number\nformat returns `422`. A trunk outside the workspace returns `404 Not Found`.\nA trunk without inbound calling enabled returns `412 Precondition Failed`.\n\nA trunk supports at most 20 gateways. Creating another returns 422; delete a gateway before adding its replacement. SIP ports must be between 1 and 65535.\n","tags":["voice-trunks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceTrunkGatewayCreate"},"example":{"sip_uri":"sip:pbx.example.com:5060","priority":0,"destination_format":"1234#{number}"}}}},"responses":{"201":{"description":"Gateway created.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceTrunkGateway"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/trunks/{trunk_id}/gateways/{gateway_id}":{"parameters":[{"name":"trunk_id","in":"path","required":true,"description":"ID of the SIP trunk that owns the gateway.","schema":{"$ref":"#/components/schemas/SIPTrunkID"},"example":"spt_01krdgeqcxet5s7t44vh8rt9mg"},{"name":"gateway_id","in":"path","required":true,"description":"ID of the inbound gateway to retrieve, update, or delete.","schema":{"$ref":"#/components/schemas/VoiceTrunkGatewayID"},"example":"vtg_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"getVoiceTrunkGateway","x-snippet-key":"voice.trunks.gateways.get","summary":"Get a SIP trunk gateway","description":"Returns a single gateway by ID. Returns a 404 `not_found_error` if the trunk or the gateway does not exist in the workspace.\n","tags":["voice-trunks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"Gateway with its current routing and connection settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceTrunkGateway"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateVoiceTrunkGateway","x-snippet-key":"voice.trunks.gateways.update","summary":"Update a SIP trunk gateway","description":"Updates the gateway's `sip_uri`, its `priority`, either number format, or any\ncombination. Omitted fields stay unchanged; sending an empty string for a\nnumber format returns it to E.164.\n\nAn updated SIP URI that collides with another gateway on this trunk returns\n`409 Conflict`. An empty body or invalid field returns `422`. A trunk or\ngateway outside the workspace returns `404 Not Found`. A trunk without\ninbound calling enabled returns `412 Precondition Failed`.\n","tags":["voice-trunks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceTrunkGatewayUpdate"}}}},"responses":{"200":{"description":"Updated gateway.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceTrunkGateway"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteVoiceTrunkGateway","x-snippet-key":"voice.trunks.gateways.delete","summary":"Delete a SIP trunk gateway","description":"Removes the gateway. Calls already ringing this address are not affected. Removing the last gateway leaves inbound calling enabled but removes its delivery targets. New inbound calls to numbers routed to this trunk are refused until a gateway is added back. The trunk must have inbound calling enabled, otherwise this returns `412 Precondition Failed`. If a hunt group you built in the trunk's inbound routing uses the gateway, the delete returns `409 Conflict`: remove the gateway from that group in the dashboard first. The **All gateways (automatic)** group never blocks a delete.\n","tags":["voice-trunks"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Gateway deleted.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/numbers":{"get":{"operationId":"listVoiceNumbers","x-snippet-key":"voice.numbers.list","summary":"List the numbers you can use for voice","description":"Lists the phone numbers your workspace can use for voice: the voice-capable\nnumbers we allocated to you, and the numbers from other carriers you\nregistered and verified. One list, ordered by number.\n\nEach entry is one phone number, and provider says which of the two it is.\n\nThis is one cursor page, not the whole set. It returns 25 numbers unless you\nask for more with limit, so follow the cursor until it stops rather than\ntreating the first page as everything you have.\n","tags":["voice-numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"search","in":"query","required":false,"description":"Matches part of the phone number or name, ignoring case. Characters such as `%` and `_` match literally.","schema":{"type":"string","maxLength":200}},{"name":"provider","in":"query","required":false,"description":"Filter by number source. `allocation` selects numbers we allocated to your workspace. `verified_number` selects numbers from another carrier that you registered for use as caller IDs.","schema":{"$ref":"#/components/schemas/VoiceNumberProviderType"}},{"name":"route","in":"query","required":false,"description":"Filter by the answer incoming calls get. A number without a route of its\nown matches the route of your workspace's default.\n\n- `reject`: rejects incoming calls.\n- `trunk`: delivers calls to a SIP trunk.\n- `forward`: connects calls to the configured forwarding number.\n- `sequence`: runs the selected voice sequence entry.\n- `ring_group`: rings the group's online members.\n\nNumbers with an unsupported route are excluded when this filter is set.\n","schema":{"$ref":"#/components/schemas/VoiceCallRouteType"}},{"name":"sort","in":"query","required":false,"description":"Field to sort by.","schema":{"$ref":"#/components/schemas/VoiceNumberSortField"}},{"$ref":"#/components/parameters/OrderAsc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of the numbers the workspace can use for voice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceNumberList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/numbers/{number_id}":{"parameters":[{"name":"number_id","in":"path","required":true,"description":"ID of the voice number to retrieve or update, as returned by the voice number list.","schema":{"$ref":"#/components/schemas/VoiceNumberID"},"example":"vnu_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"getVoiceNumber","x-snippet-key":"voice.numbers.get","summary":"Get a voice number","description":"Returns one of the numbers your workspace can use for voice.\n\nA number with no route of its own reads back with a null route and follows\nyour workspace's default inbound route, which\n[Get the voice settings](/docs/api/reference/get-voice-settings) returns.\n","tags":["voice-numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceNumber"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateVoiceNumber","x-snippet-key":"voice.numbers.update","summary":"Update a voice number","description":"Changes what you have said about this number: the label you gave it, and what\nhappens when a call arrives for it. Omit a field to leave it as it is.\n\nThe route replaces whatever was set before, because a number has exactly one\nanswer at a time. A null route returns the number to your workspace's\ndefault inbound route, set with\n[Update the voice settings](/docs/api/reference/update-voice-settings).\nType \"reject\" refuses calls whatever the default is.\n\"trunk\" needs a trunk_id: the trunk must be yours and must have inbound\ncalling enabled. \"forward\" needs a forward_to, which has to be one of your\nverified caller IDs. That is checked when you set it, and again on every call\nit forwards, so a caller ID you later remove stops forwarding rather than\ncarrying on. \"ring_group\" needs a ring_group_id: one of your ring groups, or\nthe default group of everyone online, from\n[List ring groups](/docs/api/reference/list-voice-ring-groups), otherwise the\nupdate returns 422.\n\nSequence management remains in the dashboard. A `sequence` route needs\n`sequence_id` and `entry_node_id` from an existing active publication in your\nworkspace. Binding a sequence with recording commands or managed recording\ntransfers requires organization preview access. Sequence management endpoints\nare not available through the public API; see the\n[call sequences guide](https://bird.com/docs/guides/voice/call-sequences).\n\nOnly a number whose calls arrive here can carry a route. A number from\nanother carrier is somewhere calls can be sent to, and that carrier routes\nthe calls made to it, so inbound_configuration is refused on it. The label\ncan be set on either.\n\nA number with a live emergency service must keep an effective route to a\nbrowser ring group or an inbound-enabled SIP trunk. A change that would\nleave another route returns 412.\n","tags":["voice-numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceNumberUpdate"},"example":{"inbound_configuration":{"route":{"type":"trunk","trunk_id":"spt_01krdgeqcxet5s7t44vh8rt9mg"}}}}}},"responses":{"200":{"description":"The number as it now stands.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceNumber"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/settings":{"get":{"operationId":"getVoiceSettings","x-snippet-key":"voice.settings.get","summary":"Get the voice settings","description":"Returns the voice settings for your workspace.\n\n`inbound_configuration.route` is what happens to calls for every Bird number that has no\ninbound route of its own. Verified caller IDs receive no calls, so it never applies to them.\nIt is \"reject\" until you change it.\n\n`daily_spend_limit` is the daily limit outbound calls are admitted against, what has been\nused toward it today including calls in progress, and when it resets at midnight UTC.\n","tags":["voice-numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The workspace's voice settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSettings"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateVoiceSettings","x-snippet-key":"voice.settings.update","summary":"Update the voice settings","description":"Changes your workspace's voice settings. Omit a field to leave it as it is.\n\n`inbound_configuration.route` applies to every Bird number that has no inbound route of its\nown, from the next call it receives. A number with its own route keeps it, and verified\ncaller IDs receive no calls.\nThe route is checked the same way as a number's: a trunk must be yours and\nhave inbound calling enabled, and a forward target must be one of your\nverified caller IDs, otherwise the update returns 412. A trunk_id that is not\none of your trunks returns 404. A ring_group_id that is not one of your ring\ngroups or the default group returns 422. Deleting the trunk, or\nturning off its inbound calling, sets the default back to \"reject\".\nIf a number with a live emergency service follows this default, changing it\nto anything other than a browser ring group or inbound-enabled SIP trunk\nreturns 412.\n\n`daily_spend_limit.workspace_limit` sets your workspace's own daily spend limit. It can be\nabove or below `default_limit`, up to `max_limit`, and must be in your organization's\nwallet currency, otherwise the update returns 422. An organization without a wallet cannot\nset a limit yet and gets 422 until it has one. Null removes it so the default applies.\nCalls already in progress are never ended; the limit applies from the next call.\n","tags":["voice-numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSettingsUpdate"},"example":{"inbound_configuration":{"route":{"type":"trunk","trunk_id":"spt_01krdgeqcxet5s7t44vh8rt9mg"}}}}}},"responses":{"200":{"description":"The workspace's voice settings after the update.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSettings"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/verified-numbers":{"get":{"operationId":"listVoiceVerifiedNumbers","x-snippet-key":"voice.verified_numbers.list","summary":"List verified numbers","description":"Returns a paginated list of the workspace's verified numbers and their verification status.","tags":["voice-verified-numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"sort","in":"query","required":false,"description":"Field to sort by.","schema":{"$ref":"#/components/schemas/VoiceVerifiedNumberSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of verified numbers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceVerifiedNumberList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createVoiceVerifiedNumber","x-snippet-key":"voice.verified_numbers.create","summary":"Create a verified number","description":"Registers a phone number as an outbound caller ID for the workspace and starts\nverification. The API places a verification call to the number that reads out\na code; submit that code to the verify endpoint to prove ownership. The\nverified number is returned in the \"pending\" state until verification completes.\n\nIdempotency is optional. For retry protection, supply an `Idempotency-Key`\non the first attempt and reuse it with the same request. A retained successful\nresponse is replayed for three hours. Without a key, retries are processed\nnormally and can return `409` if the number is already registered. If a\nresponse is lost, list the workspace's verified numbers to check the registration\nbefore trying again.\n\nA `412` means required identity verification is incomplete or organization\neligibility prevents registration. Follow the error's recovery guidance:\ncomplete missing verification, or contact support about an eligibility review\nor denial. An eligibility assessment still in progress returns `503`; retry later.\n","tags":["voice-verified-numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceVerifiedNumberCreate"},"example":{"phone_number":"+14155551234"}}}},"responses":{"201":{"description":"Verified number registered and pending verification.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceVerifiedNumber"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/verified-numbers/{verified_number_id}":{"parameters":[{"name":"verified_number_id","in":"path","required":true,"description":"ID of the verified number to retrieve, update, or delete.","schema":{"$ref":"#/components/schemas/VoiceVerifiedNumberID"},"example":"vvn_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"getVoiceVerifiedNumber","x-snippet-key":"voice.verified_numbers.get","summary":"Get a verified number","description":"Returns the verified number with the given ID, including its verification status.","tags":["voice-verified-numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"Verified number with its current verification status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceVerifiedNumber"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateVoiceVerifiedNumber","x-snippet-key":"voice.verified_numbers.update","summary":"Update a verified number","description":"Sets the verified number's label. Send `name` as null to clear the label. The number itself cannot be changed: register the number you want and verify it separately. Renaming leaves the verification state untouched, so a verified number stays usable and a pending one keeps the code it is waiting for.\n","tags":["voice-verified-numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceVerifiedNumberUpdate"},"example":{"name":"Support line"}}}},"responses":{"200":{"description":"Updated verified number.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceVerifiedNumber"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteVoiceVerifiedNumber","x-snippet-key":"voice.verified_numbers.delete","summary":"Delete a verified number","description":"Removes the verified number. After deletion the number can no longer be presented as the outbound caller ID; register and verify it again to reuse it.\n","tags":["voice-verified-numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Verified number deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/verified-numbers/{verified_number_id}/verify":{"parameters":[{"name":"verified_number_id","in":"path","required":true,"description":"ID of the verified number registration whose ownership challenge to complete.","schema":{"$ref":"#/components/schemas/VoiceVerifiedNumberID"},"example":"vvn_01krdgeqcxet5s7t44vh8rt9mg"}],"post":{"operationId":"verifyVoiceVerifiedNumber","x-snippet-key":"voice.verified_numbers.verify","summary":"Verify number ownership","description":"Completes the number ownership verification challenge that registering the number\nstarted. Submit the code delivered by the verification call. An incorrect code is\nrejected.\n\nIf the verification call could not be started previously, this request can\nretry it and place another call to the same number. Your organization must\nstill meet the identity-verification requirements for registering verified numbers;\notherwise the request returns `412`. For an expired or exhausted challenge,\ndelete the verified number and register it again, which places a new\nverification call, and submit the new code against the ID the registration\nreturns.\n\nA successful ownership check is retained even when organization eligibility\nprevents outbound activation. If the verified number's `status` is `verified` after\na `412` or `503`, complete the missing steps or contact support, then\nresubmit an empty object (`{}`). The saved proof is reused without checking\na code again. While proof is still pending, include the code; an empty\nobject is rejected. A `412` means missing verification steps or an\neligibility decision requiring support; a `503` means assessment is pending\nor unavailable. `outbound_enabled` indicates whether activation has\ncompleted. Outbound calls remain subject to routing and number ownership\nrequirements.\n\nActivation attempts to enable the number's country as a Voice destination.\nAn unavailable country or a failed settings update can leave it disabled.\nCheck **Voice** > **Destinations** before calling; see the\n[verified number guide](https://bird.com/docs/guides/voice/caller-ids).\n","tags":["voice-verified-numbers"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceVerifiedNumberVerifyRequest"},"example":{"code":"123456"}}}},"responses":{"200":{"description":"Number ownership verified.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceVerifiedNumber"},"example":{"id":"vvn_01krdgeqcxet5s7t44vh8rt9mg","workspace_id":"ws_01j8z5k2qvfpx9m3n7r4t6y8bc","phone_number":"+14155551234","name":"Support line","status":"verified","outbound_enabled":true,"verified_at":"2026-09-23T10:15:00Z","created_at":"2026-09-23T10:00:00Z","updated_at":"2026-09-23T10:15:00Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/ring-groups":{"get":{"operationId":"listVoiceRingGroups","x-snippet-key":"voice.ring_groups.list","summary":"List ring groups","description":"Returns the workspace's ring groups. The first is always the default\ngroup, which is not stored: it rings the users who are online in the\nbrowser phone. The others follow, oldest first.\n","tags":["voice-ring-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The workspace's ring groups.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceRingGroupList"},"example":{"data":[{"id":"vrg_01j8z5k2qvfpx9m3n7r4t6y8bc","name":"Everyone","is_default":true,"online_member_count":5,"created_at":null,"updated_at":null},{"id":"vrg_01krdgeqcxet5s7t44vh8rt9mg","name":"Support","is_default":false,"online_member_count":3,"created_at":"2026-10-01T12:00:00Z","updated_at":"2026-10-01T12:00:00Z"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createVoiceRingGroup","x-snippet-key":"voice.ring_groups.create","summary":"Create a ring group","description":"Creates a ring group with no members. Add members with\n`POST /v1/voice/ring-groups/{ring_group_id}/members`.\n\nA workspace can have at most 50 ring groups besides its default group.\nCreating another returns `422`.\n","tags":["voice-ring-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceRingGroupCreate"},"example":{"name":"Support"}}}},"responses":{"201":{"description":"Ring group created.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceRingGroup"},"example":{"id":"vrg_01krdgeqcxet5s7t44vh8rt9mg","name":"Support","is_default":false,"online_member_count":0,"created_at":"2026-10-01T12:00:00Z","updated_at":"2026-10-01T12:00:00Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/ring-groups/{ring_group_id}":{"parameters":[{"name":"ring_group_id","in":"path","required":true,"description":"ID of the ring group.","schema":{"$ref":"#/components/schemas/VoiceRingGroupID"},"example":"vrg_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"getVoiceRingGroup","x-snippet-key":"voice.ring_groups.get","summary":"Get a ring group","description":"Returns one ring group. The default group's ID is `vrg_` followed by the\nworkspace ID's suffix.\n","tags":["voice-ring-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The ring group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceRingGroup"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateVoiceRingGroup","x-snippet-key":"voice.ring_groups.update","summary":"Update a ring group","description":"Renames the ring group. Renaming the default group returns\n`409 Conflict`.\n","tags":["voice-ring-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceRingGroupUpdate"},"example":{"name":"Tier 2 support"}}}},"responses":{"200":{"description":"The renamed ring group.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceRingGroup"},"example":{"id":"vrg_01krdgeqcxet5s7t44vh8rt9mg","name":"Tier 2 support","is_default":false,"online_member_count":3,"created_at":"2026-10-01T12:00:00Z","updated_at":"2026-10-02T09:30:00Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteVoiceRingGroup","x-snippet-key":"voice.ring_groups.delete","summary":"Delete a ring group","description":"Deletes the ring group and its member list. Calls already ringing its\nmembers are not affected.\n\nDeleting a ring group that a number, the workspace default route or a\npublished sequence still rings, or deleting the default group, returns\n`409 Conflict`.\n","tags":["voice-ring-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Ring group deleted.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/ring-groups/{ring_group_id}/members":{"parameters":[{"name":"ring_group_id","in":"path","required":true,"description":"ID of the ring group whose members to list or add to.","schema":{"$ref":"#/components/schemas/VoiceRingGroupID"},"example":"vrg_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"listVoiceRingGroupMembers","x-snippet-key":"voice.ring_groups.members.list","summary":"List a ring group's members","description":"Returns the ring group's members, in the order they joined. The default\ngroup's members are the users who are online in the browser phone now.\n","tags":["voice-ring-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The ring group's members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceRingGroupMemberList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createVoiceRingGroupMember","x-snippet-key":"voice.ring_groups.members.create","summary":"Add a member to a ring group","description":"Adds a workspace user to the ring group. The group rings the user only\nwhile they are online in the browser phone.\n\nA user without access to the workspace returns `422`, as does adding a\nmember to a group that already has 200. Adding a user who is already a\nmember, or adding to the default group, returns `409 Conflict`.\n","tags":["voice-ring-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceRingGroupMemberCreate"},"example":{"user_id":"usr_01krdgeqcxet5s7t44vh8rt9mg"}}}},"responses":{"201":{"description":"Member added.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceRingGroupMember"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/ring-groups/{ring_group_id}/members/{user_id}":{"parameters":[{"name":"ring_group_id","in":"path","required":true,"description":"ID of the ring group.","schema":{"$ref":"#/components/schemas/VoiceRingGroupID"},"example":"vrg_01krdgeqcxet5s7t44vh8rt9mg"},{"name":"user_id","in":"path","required":true,"description":"ID of the member to remove.","schema":{"$ref":"#/components/schemas/UserID"},"example":"usr_01krdgeqcxet5s7t44vh8rt9mg"}],"delete":{"operationId":"deleteVoiceRingGroupMember","x-snippet-key":"voice.ring_groups.members.delete","summary":"Remove a member from a ring group","description":"Removes the user from the ring group. A call already ringing the user is\nnot affected. Removing a member of the default group returns\n`409 Conflict`.\n","tags":["voice-ring-groups"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"Member removed.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/legs":{"get":{"operationId":"listVoiceLegs","x-snippet-key":"voice.list","summary":"List legs","description":"Returns a paginated list of the workspace's legs, ordered by start time\ndescending.\n\nThe `status` filter selects where in the lifecycle you look, and any\ncombination is a single page: in-flight statuses (`ringing`,\n`in_progress`), final ones, or both together. Omit it and you get\ncompleted legs, which is what this list has always returned.\n\nA leg in flight carries no economics yet: `duration_ms`, `billable_ms`,\n`ended_at`, and `cost` are null until it ends. It keeps the same `id`\nthroughout, so the same leg answers under one identity from the first\nring to settlement.\n","tags":["voice-legs"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"parameters":[{"name":"direction","in":"query","required":false,"description":"Return only legs in this direction.","schema":{"$ref":"#/components/schemas/VoiceCallDirection"}},{"name":"status","in":"query","required":false,"description":"Return only legs with one of these statuses, comma-separated.\nIn-flight and final statuses may be combined freely.\n","style":"form","explode":false,"schema":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/components/schemas/VoiceCallStatus"}}},{"name":"call_id","in":"query","required":false,"description":"Return only legs belonging to this call, which is how the legs of one multi-party or transferred call are correlated.","schema":{"$ref":"#/components/schemas/VoiceSessionID"}},{"name":"sip_trunk_id","in":"query","required":false,"description":"Return only legs carried by this SIP trunk.","schema":{"$ref":"#/components/schemas/SIPTrunkID"}},{"name":"from","in":"query","required":false,"description":"Return only legs placed from this calling party, matched exactly. Give a number in international form: `+14155551234`, `14155551234`, and `0014155551234` all select the same legs. A number given without a country code is read as an international one, so give the country code to be sure of what you are matching. A `usr_` ID matches the recorded calling party exactly as given; it does not establish who placed the call. Use `number` instead to match part of a number, or either side of the leg.\n","schema":{"type":"string","minLength":1,"maxLength":32,"example":"+14155551234"}},{"name":"to","in":"query","required":false,"description":"Return only legs placed to this called party number, matched as a whole number rather than as a fragment. Give it in international form: `+16505559876`, `16505559876`, and `0016505559876` all select the same legs. A number given without a country code is read as an international one, so give the country code to be sure of what you are matching. A `usr_`, `vrg_` or `vsq_` ID matches a browser's call to that workspace user, ring group or sequence, exactly as given. Use `number` instead to match part of a number, or either side of the leg.\n","schema":{"type":"string","minLength":1,"maxLength":32,"example":"+16505559876"}},{"name":"number","in":"query","required":false,"description":"Return only legs where the calling or called number contains this value. Matches a partial number, so a country or area-code prefix returns every leg to or from it. Combines with `from`/`to`, which match one side exactly.","schema":{"type":"string","minLength":1,"maxLength":32}},{"$ref":"#/components/parameters/TagFilter"},{"name":"started_after","in":"query","required":false,"description":"Return only legs that started at or after this instant, inclusive. RFC 3339 timestamp.","schema":{"type":"string","format":"date-time"}},{"name":"started_before","in":"query","required":false,"description":"Return only legs that started at or before this instant, inclusive. RFC 3339 timestamp.","schema":{"type":"string","format":"date-time"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of leg records.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceLegList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/voice/legs/{leg_id}":{"parameters":[{"name":"leg_id","in":"path","required":true,"description":"ID of the call leg to retrieve, as returned by the leg list or webhook events.","schema":{"$ref":"#/components/schemas/VoiceCallID"},"example":"vcl_01k0p3v9wera3v6q6xw3e9y2mh"}],"get":{"operationId":"getVoiceLeg","x-snippet-key":"voice.get","summary":"Get a leg","description":"Returns a single leg at any point in its lifecycle. A leg that is still ringing or connected answers with its in-flight `status` and no economics: `duration_ms`, `billable_ms`, and `ended_at` fill in once it ends, at this same URL, and `cost` does too unless the leg was never rated, as with a verification call Bird places and answers on your behalf. Returns a 404 `not_found_error` if the leg does not exist in the workspace.\n","tags":["voice-legs"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"responses":{"200":{"description":"The leg's current status, timing, and routing details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceLeg"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","n8n","sdk"]}},"/v1/voice/legs/{leg_id}/recordings/{recording_id}/audio":{"parameters":[{"name":"leg_id","in":"path","required":true,"description":"The leg the recording belongs to.","schema":{"$ref":"#/components/schemas/VoiceCallID"},"example":"vcl_01k0p3v9wera3v6q6xw3e9y2mh"},{"name":"recording_id","in":"path","required":true,"description":"The `id` of an entry in `recordings` from [`listVoiceCallRecordings`](/docs/api/reference/list-voice-call-recordings).","schema":{"$ref":"#/components/schemas/VoiceCallRecordingID"}}],"get":{"operationId":"getVoiceLegRecordingAudio","summary":"Get a leg recording's audio","description":"Redirects to a short-lived URL for this recording's audio.\n\nThe bytes live in object storage and are served straight from there, so\nthey never transit the API and no list response carries a link to them.\nEach request to this operation signs a fresh one.\n\nThe response is a `302` whose `Location` is that pre-authorized storage\nURL, valid for 15 minutes, so your client must follow redirects. The\n`Authorization` header has to be absent from the request that fetches that\nURL. A client that attaches credentials centrally, at its transport,\ninterceptor or middleware layer rather than per request, re-adds the header\non every hop including the redirect, so the storage URL needs a client that\ncarries none. With curl, use version 7.58.0 or later when following the\nredirect: earlier versions forward custom authorization headers to other hosts.\n\nTreat the URL as secret for as long as it lasts. Anyone holding one can\nhear the audio.\n\nAudio download is available for 30 days after the source audio starts.\nThe API returns `404` after that cutoff without issuing a storage URL.\n\nAn in-progress capture can appear in the inventory with its media stream\nlisted as open. This operation answers `425` while its audio is not ready.\nIf capture metadata is delayed, the recording may not appear immediately.\nA recording whose capture failed has no audio to serve and answers `404`.\nIts transcript, if one ran, stays readable.\n\nAnswers `501` where the workspace's region has no voice media store\nconfigured. The audio has nowhere to be read from there.\n","tags":["voice-legs"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"x-snippet-key":"voice.legs.recordings.audio","parameters":[{"name":"disposition","in":"query","required":false,"description":"Whether the signed URL plays the audio or saves it. `inline`, the default, streams it in a browser. `attachment` asks the browser to save it under a filename naming the recording and when it started.\n","schema":{"$ref":"#/components/schemas/VoiceRecordingDisposition"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"302":{"description":"Redirect to a storage URL valid for 15 minutes.","headers":{"Location":{"required":true,"description":"The storage URL to fetch the audio from.","schema":{"type":"string","format":"uri"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"425":{"$ref":"#/components/responses/TooEarly"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/calls":{"post":{"operationId":"createVoiceCall","summary":"Create a call","description":"Accepts a real outbound call that runs a voice sequence after the\nrecipient answers, starting at the selected entry node. Supply exactly one\nof `sequence.id`, to run the active publication of a saved sequence, or\n`sequence.definition`, to run a complete definition once without saving\nit. Production availability rules and normal calling charges apply.\nRequires both voice management write and voice calling write permissions\nand a permitted calling number. Browser users, API keys and OAuth apps\nacting for a member are supported.\nDraft and test selectors are not accepted. See the\n[Create Call guide](https://bird.com/docs/guides/voice/create-calls).\n\nAn inline definition must pass the same checks as publishing a sequence;\nthe first blocking problem returns 422 with its location under\n`/sequence/definition`. Its run executes at most 16 commands, including\ngather prompts; a call that needs a 17th ends with the `call_limit`\ntrace error instead of running it. The accepted call's\n`sequence.id` is `null`, because its run belongs to no saved sequence.\n\nSupply sequence trigger data as an explicit object matching the selected\nentry's configured data schema, or an empty object when no data is needed.\nThe active publication or inline definition, entry node, and trigger data\nare frozen when the call is accepted. The response contains reserved call and initial-leg IDs.\nIts `null` `started_at`, `false` `live`, and empty `parties` describe the\nacceptance snapshot. Acceptance does not guarantee that dialing starts or\nthat call and leg reads become available. A call that fails or is canceled\nbefore registration might never appear in those reads. Read progress\nin the sequence's Runs tab in the dashboard. Once the initial leg is\nregistered, use its `initial_leg_id` with `GET /v1/voice/legs/{leg_id}` to\ninspect the telephone outcome; that read requires voice read permission.\n\nIdempotency is optional. Without an `Idempotency-Key` header, each request\naccepts a new call attempt. To protect retries, supply a key on the first\nattempt and reuse it for the same intended call.\nRequests are limited to 128 KiB. The same idempotency key and exact request\nbytes replay the original acceptance snapshot for three hours. Changed\nrequests return 409. Authorization and calling-number permission are\nchecked on every request, including replays. Replays include the\nIdempotency-Replay header with value true.\n","tags":["voice-calls"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"x-snippet-key":"voice.calls.create","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVoiceCallRequest"},"example":{"from":"+12025550100","to":"+12025550101","sequence":{"id":"vsq_01krdgeqcxet5s7t44vh8rt9mg","entry_node_id":"start","trigger_data":{}}}}}},"responses":{"202":{"description":"Immutable acceptance snapshot for the call.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceCall"},"example":{"id":"vcs_01krdgeqcxet5s7t44vh8rt9mg","workspace_id":"ws_01krdgeqcxet5s7t44vh8rt9mg","initial_leg_id":"vcl_01krdgeqcxet5s7t44vh8rt9mg","direction":"outbound","started_at":null,"ended_at":null,"live":false,"has_recording":false,"has_transcript":false,"parties":[],"sequence":{"id":"vsq_01krdgeqcxet5s7t44vh8rt9mg","run_id":"vsr_01krdgeqcxet5s7t44vh8rt9mg"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/calls/{call_id}/recordings":{"parameters":[{"name":"call_id","in":"path","required":true,"description":"The call to read. Every leg carries its call's ID as `call_id`.","schema":{"$ref":"#/components/schemas/VoiceSessionID"},"example":"vcs_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"listVoiceCallRecordings","summary":"List a call's recordings and transcripts","description":"Returns everything captured across every leg of one call: its stored audio,\neach leg's view of it, and every transcription attempt over it. A stream heard on\nseveral legs appears once in `media`, with one view per leg in\n`recordings`.\n\nAudio streams, their recording views and transcripts leave the API 30 days\nafter the source audio starts. Transcription does not restart that period.\nRead `truncated` before presenting the result as complete.\n\nThe collections arrive independently. A stream can appear before its\nrecording view, or without a view if delivery fails or the view expires.\nDownload audio with [`getVoiceLegRecordingAudio`](/docs/api/reference/get-voice-leg-recording-audio), passing the recording\nview's `leg_id` and `id`. The download requires a recording view ID, so a\nstream cannot be downloaded until its view is available.\n\nA call this workspace never placed, or whose recordings have all expired,\nanswers with empty collections rather than `404`.\n","tags":["voice-calls"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"x-snippet-key":"voice.calls.recordings.list","responses":{"200":{"description":"The call's recordings and transcripts, with whether any collection was cut.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceLegRecordings"},"example":{"media":[{"id":"vcm_01krdgeqcxet5s7t44vh8rt9mg","leg_id":"vcl_01krdgeqcxet5s7t44vh8rt9mg","call_id":"vcs_01krdgeqcxet5s7t44vh8rt9mg","codec":"PCMU","state":"available","offset_ms":0,"audio_ms":1000,"started_at":"2026-11-01T12:00:00Z","ended_at":"2026-11-01T12:00:01Z","source_party":{"endpoint":{"type":"pstn"},"address":"+14155551234"}}],"recordings":[{"id":"vrc_01krdgeqcxet5s7t44vh8rt9mg","leg_id":"vcl_01krdgeqcxet5s7t44vh8rt9mg","call_id":"vcs_01krdgeqcxet5s7t44vh8rt9mg","number":"+12025550100","channel":"rx","media_id":"vcm_01krdgeqcxet5s7t44vh8rt9mg","media_started_at":"2026-11-01T12:00:00Z","started_at":"2026-11-01T12:00:00Z","ended_at":"2026-11-01T12:00:01Z"}],"transcripts":[],"truncated":false,"evaluated_at":"2026-11-01T12:01:00Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/calls/{call_id}/transcript":{"parameters":[{"name":"call_id","in":"path","required":true,"description":"The call to read. Every leg carries its call's ID as `call_id`.","schema":{"$ref":"#/components/schemas/VoiceSessionID"},"example":"vcs_01krdgeqcxet5s7t44vh8rt9mg"}],"get":{"operationId":"getVoiceCallTranscript","summary":"Get a call's transcript","description":"Returns one transcript for the whole call: the cues of every party's\nstream in spoken order, each pointing into `parties` at the party its\nstream was captured from.\n\nIt is assembled on each read from the call's stored transcripts, one per\nstream: the latest whose every cue is timed, otherwise the latest that\nsucceeded. When a live transcript exists, its cues take precedence; the\nselected transcript adds only timed cues that do not overlap them. Timed\ncues are placed by `start_at`. A transcript that timed\nnothing has `null` times, and its cues are placed at the start of their\nstream. A stream whose every transcription failed contributes nothing and\nsets `complete` to `false`. A stream where nothing was heard, one that was\nnever transcribed, or one whose transcript has not arrived yet contributes\nno cues and leaves `complete` as it is.\n\nTranscripts leave the API 30 days after the source audio starts. A call this\nworkspace never placed, or whose\ntranscripts have all expired, answers with no cues rather than `404`.\n","tags":["voice-calls"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","dashboard","command"],"x-snippet-key":"voice.calls.transcript","responses":{"200":{"description":"The call's cues in spoken order, untimed ones included, and whether a stream's every transcription failed or the read was cut.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceCallTranscript"},"example":{"call_id":"vcs_01krdgeqcxet5s7t44vh8rt9mg","parties":[{"endpoint":{"type":"pstn"},"address":"+14155551234"}],"cues":[{"party":0,"start_at":"2026-11-01T12:00:00Z","end_at":"2026-11-01T12:00:01Z","text":"Hello."}],"complete":true,"evaluated_at":"2026-11-01T12:01:00Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/voice/destinations":{"get":{"operationId":"listVoiceDestinations","x-snippet-key":"voice.destinations.list","summary":"List Voice destination countries","description":"Returns every country the Voice service supports, each annotated with whether your workspace has enabled calling to it, whether the platform supports calling it (`status`), and any daily spend limit you set for it with today's usage. A supported, enabled country still refuses calls once its `daily_spend_limit.remaining` reaches zero. Use this to render and manage your destination allowlist.\n","tags":["voice-destinations"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"responses":{"200":{"description":"The Voice destination countries with your workspace's enabled settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceDestinationList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateVoiceDestinations","x-snippet-key":"voice.destinations.update","summary":"Update enabled Voice destination countries","description":"Enables or disables specific destination countries for your workspace, and sets or removes their daily spend limits. Only the countries listed in the request change; any country you do not list keeps its current setting. Each code must be a country the Voice service supports, or the request is rejected and nothing changes; removing a daily spend limit is the exception and accepts any country code. A daily spend limit caps what your workspace spends on calls to a country each day, whether or not it is enabled.\n","tags":["voice-destinations"],"x-audiences":["public","command"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceDestinationsUpdate"},"example":{"destinations":[{"country_code":"NL","enabled":true},{"country_code":"GB","enabled":false}]}}}},"responses":{"200":{"description":"The updated Voice destination countries with your workspace's enabled settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceDestinationList"}}},"headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/zones":{"get":{"operationId":"listEsimZones","summary":"List eSIM coverage zones","description":"Returns the coverage zones behind the offer catalog as a cursor-paginated list. A zone's `countries` list is authoritative for every offer that references it. Filter by `country` to find zones covering a destination.\n","tags":["esim-zones"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"sort","in":"query","required":false,"description":"Field to sort by. Possible values: created_at.","schema":{"$ref":"#/components/schemas/EsimZoneSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"name":"country","in":"query","required":false,"description":"Keep only zones that include this country (ISO 3166-1 alpha-2).","schema":{"$ref":"#/components/schemas/CountryCode"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of zones.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimZoneList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/zones/{zone_id}":{"get":{"operationId":"getEsimZone","summary":"Get an eSIM coverage zone","description":"Returns one coverage zone with its authoritative country list.","tags":["esim-zones"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"zone_id","in":"path","required":true,"description":"Zone ID.","schema":{"$ref":"#/components/schemas/EsimZoneID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The zone.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimZone"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/offers":{"get":{"operationId":"listEsimOffers","summary":"List eSIM offers","description":"Returns the eSIM offers your workspace can order as a cursor-paginated list. Filter by `country` to find offers covering a destination (the zone's country list is the guarantee), or by `zone_id` for one coverage footprint. Retired offers are excluded unless requested via `status`.\n","tags":["esim-offers"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"sort","in":"query","required":false,"description":"Field to sort by. Possible values: created_at.","schema":{"$ref":"#/components/schemas/EsimOfferSortField"}},{"$ref":"#/components/parameters/OrderDesc"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/IncludeTotal"},{"name":"country","in":"query","required":false,"description":"Keep only offers whose coverage zone includes this country (ISO 3166-1 alpha-2).","schema":{"$ref":"#/components/schemas/CountryCode"}},{"name":"zone_id","in":"query","required":false,"description":"Keep only offers selling this coverage zone.","schema":{"$ref":"#/components/schemas/EsimZoneID"}},{"name":"status","in":"query","required":false,"description":"Filter by offer availability. Omitted, only active offers are returned.","schema":{"$ref":"#/components/schemas/EsimOfferStatus"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of offers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimOfferList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/offers/{offer_id}":{"get":{"operationId":"getEsimOffer","summary":"Get an eSIM offer","description":"Returns one eSIM offer with its pricing and embedded coverage zone.","tags":["esim-offers"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"offer_id","in":"path","required":true,"description":"Offer ID.","schema":{"$ref":"#/components/schemas/EsimOfferID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The offer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimOffer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/offers/{offer_id}/requirements":{"get":{"operationId":"getEsimOfferRequirements","summary":"Get country identification requirements for an eSIM offer","description":"Returns identification guidance as a JSON Schema for each country in the offer's coverage zone. The schemas require `first_name`, `last_name`, and `email`, including countries with no additional requirements. Enable format assertions in your validator for email addresses and dates.\n\nYou collect and validate the information. Bird does not receive or verify the answers, and fetching or satisfying these schemas does not authorize a purchase or assignment.\n","tags":["esim-offers"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"offer_id","in":"path","required":true,"description":"Offer ID.","schema":{"$ref":"#/components/schemas/EsimOfferID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Requirements for the offer coverage countries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimOfferRequirements"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/orders":{"post":{"operationId":"createEsimOrder","summary":"Order a data package","description":"Purchases a data package at the quoted price. Omit `esim_id` to create an eSIM, or provide it to add a compatible package to an existing eSIM. Use [List compatible offers](/docs/api/reference/list-esim-compatible-offers) before ordering a top-up. After purchase, use [Send install credentials](/docs/api/reference/deliver-esim-credentials) to deliver installation details separately.\n\nInspect `status` even when the response is `201`: the order can be `completed` or `failed`. A `202` response means processing continues; use [Get an order](/docs/api/reference/get-esim-order) to follow the outcome. Failed orders receive an automatic credit for any charge; `refund_transaction_id` identifies the credit once issued.\n\nAn order awaiting funds stays in `charging`. For a one-time purchase, funding retries automatically; for an initial recurring purchase, retry the same create request with the same `Idempotency-Key` after adding funds. For one-time purchases, pass `offer_revision` and `expected_price` to reject changed terms with `409`. Recurring purchases accept their quote through `recurrence`. An incompatible top-up or shortened package validity returns `409`; use `acknowledge_shortened_validity` to accept the latter. After a `503` or a lost response, retry the same request with the same `Idempotency-Key`.\n","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimOrderCreate"},"example":{"offer_id":"eof_01krdgeqcxet5s7t44vh8rt9mg","display_name":"Amsterdam trip, order 8812"}}}},"responses":{"201":{"description":"The order finished within the request, either completed (esim_id and package_id are set) or failed (failure_code is set and the charge is credited back automatically; refund_transaction_id records the credit once it lands).","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimOrder"}}}},"202":{"description":"The order was accepted and is completing asynchronously; poll it until completed or failed.","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimOrder"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"get":{"operationId":"listEsimOrders","summary":"List orders","description":"Returns the workspace's orders as a cursor-paginated list, newest first. Filter by `status` to find in-flight or failed purchases, by `esim_id` for one eSIM's purchase history, or by `mode` to separate test purchases from real ones. Test orders are listed alongside real ones by default, each carrying its own `mode`.\n","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/CreatedAfter"},{"$ref":"#/components/parameters/CreatedBefore"},{"name":"status","in":"query","required":false,"description":"Keep only orders whose `status` matches; repeat the parameter to match any of several.","schema":{"type":"array","items":{"$ref":"#/components/schemas/EsimOrderStatus"}}},{"name":"esim_id","in":"query","required":false,"description":"Keep only orders for this eSIM.","schema":{"$ref":"#/components/schemas/EsimID"}},{"name":"mode","in":"query","required":false,"description":"Keep only orders created in this mode. Without it, both live and test orders are returned.","schema":{"$ref":"#/components/schemas/EsimMode"}},{"name":"completed_after","in":"query","required":false,"description":"Keep only orders completed at or after this timestamp. Combine it with `completed_before` to select a completion window, which is what the analytics spend and completion figures are counted by; `created_after` selects when an order was placed instead. Orders that never completed are excluded. Use an RFC 3339 timestamp with a timezone offset.","schema":{"type":"string","format":"date-time","example":"2026-05-01T00:00:00Z"}},{"name":"completed_before","in":"query","required":false,"description":"Keep only orders completed before this timestamp. Combine it with `completed_after` to select a completion window. Orders that never completed are excluded. Use an RFC 3339 timestamp with a timezone offset.","schema":{"type":"string","format":"date-time","example":"2026-06-01T00:00:00Z"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of orders.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimOrderList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/orders/{order_id}":{"get":{"operationId":"getEsimOrder","summary":"Get an order","description":"Returns one order. Poll until `status` is `completed` or `failed`; a completed order names the eSIM and package it produced.\n","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"description":"Order ID.","schema":{"$ref":"#/components/schemas/EsimOrderID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimOrder"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/orders/{order_id}/cancel":{"post":{"operationId":"cancelEsimOrder","summary":"Cancel an unfunded order","description":"Cancels an order waiting for funds in `charging`. A canceled unfunded order returns `status: failed` with `failure_code: canceled`. If a charge is confirmed after cancellation, it is credited back automatically.\n\nFor a one-time order, payment confirmed before cancellation returns `409`, and the purchase continues. For an initial recurring purchase, payment recovered during cancellation instead stops future renewal and returns the current order successfully. The paid package continues to delivery without an automatic refund. Inspect the returned order and its subscription to determine the outcome.\n\nOrders already completed, failed, or past the funding stage cannot be canceled through this operation and return `409`.\n","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"order_id","in":"path","required":true,"description":"Order ID.","schema":{"$ref":"#/components/schemas/EsimOrderID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The order after cancellation. An unfunded order is failed with `failure_code: canceled`. For an initial recurring purchase whose payment was recovered, the paid order continues and future renewal is stopped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimOrder"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/offers/{offer_id}/checkout":{"parameters":[{"name":"offer_id","in":"path","required":true,"description":"The offer.","schema":{"$ref":"#/components/schemas/EsimOfferID"}}],"get":{"operationId":"getEsimOfferCheckoutOptions","summary":"Get eSIM checkout options","description":"Returns published one-time terms and automatic renewal availability for a new eSIM, including tax-inclusive totals and current funding shortfalls. Automatic renewal includes its own price and cadence when an eligible mobile network is available. Availability and funding are checked again when purchasing; this read reserves no funds or package.","tags":["esims"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","x-data-region":"regional","parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimCheckoutOptions"},"example":{"offer_id":"eof_01krdgeqcxet5s7t44vh8rt9mg","one_time":{"offer_revision":1,"price":{"amount":"1.00","currency_code":"EUR"},"funding":{"tax_amount":{"amount":"0.21","currency_code":"EUR"},"total":{"amount":"1.21","currency_code":"EUR"},"covered":true,"shortfall":{"amount":"0","currency_code":"EUR"}}},"recurrence":{"available":true,"quote":{"delivery_mode":"exact_period","offer_revision":1,"recurrence_revision":2,"price":{"amount":"2.00","currency_code":"EUR"},"model":"calendar_month","interval_count":1,"funding":{"tax_amount":{"amount":"0.42","currency_code":"EUR"},"total":{"amount":"2.42","currency_code":"EUR"},"covered":false,"shortfall":{"amount":"1.21","currency_code":"EUR"}}},"unavailable_reason":null}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/offers/{offer_id}/recurrence":{"parameters":[{"name":"offer_id","in":"path","required":true,"description":"The offer.","schema":{"$ref":"#/components/schemas/EsimOfferID"}}],"get":{"operationId":"getEsimOfferRecurrence","summary":"Get recurring eSIM offer terms","description":"Returns the published whole-package recurring price and calendar-month or fixed-day cadence. Enrollment additionally checks that the assigned eSIM mobile network supports these terms.","tags":["esims"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","x-data-region":"regional","parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimRecurringOffer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/subscriptions":{"post":{"operationId":"createEsimRecurringSubscription","summary":"Create a recurring eSIM subscription","description":"Starts a recurring package on an assigned eSIM and purchases the first period. Each accepted period is funded from your organization's wallet. A changed price requires new acceptance; an unfunded renewal or confirmed delivery failure stops future renewal.\n\nAn `Idempotency-Key` is required. Reuse the same key and request to recover the enrollment, including after the original response is no longer retained. Reusing the key with different enrollment details returns `409`. Read the subscription and its period history to check payment and package delivery separately.\n","tags":["esims"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","x-data-region":"regional","parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/RequiredIdempotencyKey"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimRecurringSubscription"}}},"headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimRecurringSubscriptionCreate"}}}},"x-surfaces":["cli","mcp","sdk"]},"get":{"operationId":"listEsimRecurringSubscriptions","summary":"List recurring eSIM subscriptions","description":"Returns recurring services for assigned eSIMs in this workspace.","tags":["esims"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","x-data-region":"regional","parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/EsimSubscriberFilter"},{"name":"esim_id","in":"query","required":false,"description":"Filter by esim id.","schema":{"$ref":"#/components/schemas/EsimID"}},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimRecurringSubscriptionList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/subscriptions/{subscription_id}":{"parameters":[{"name":"subscription_id","in":"path","required":true,"description":"The recurring eSIM service.","schema":{"$ref":"#/components/schemas/EsimRecurringSubscriptionID"}}],"get":{"operationId":"getEsimRecurringSubscription","summary":"Get a recurring eSIM subscription","description":"Returns the current paid period separately from package delivery and cancellation state.","tags":["esims"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","x-data-region":"regional","parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimRecurringSubscription"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/subscriptions/{subscription_id}/periods":{"parameters":[{"name":"subscription_id","in":"path","required":true,"description":"The recurring eSIM service.","schema":{"$ref":"#/components/schemas/EsimRecurringSubscriptionID"}}],"get":{"operationId":"listEsimRecurringPeriods","summary":"List recurring eSIM periods","description":"Returns funded periods with their original charges, confirmed credits, and delivery orders. Unfunded renewals do not create a paid period.","tags":["esims"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","x-data-region":"regional","parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimRecurringPeriodList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/subscriptions/{subscription_id}/cancel":{"parameters":[{"name":"subscription_id","in":"path","required":true,"description":"The recurring eSIM service.","schema":{"$ref":"#/components/schemas/EsimRecurringSubscriptionID"}}],"post":{"operationId":"cancelEsimRecurringSubscription","summary":"Cancel recurring eSIM renewal","description":"Stops future package renewal at the current paid boundary. A period already committed remains payable. The installed profile and separately purchased packages are preserved.","tags":["esims"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","x-data-region":"regional","parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimRecurringSubscription"}}},"headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/subscribers":{"post":{"operationId":"createEsimSubscriber","summary":"Create an eSIM subscriber","description":"Creates or returns the subscriber associated with a contact in this workspace. A subscriber identifies the person using the service. This request does not buy an eSIM, assign a profile, or grant workspace access. It requires `email_marketing:read` and `esim:write`.\n\nCreating this association prevents deletion of the contact, including after the assigned eSIM ends. Subscriber associations cannot currently be removed, detached, or anonymized. Releasing an eSIM does not restore contact deletion.\n","tags":["esims"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","x-data-region":"regional","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimSubscriber"}}},"headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimSubscriberCreate"}}}},"x-surfaces":["cli","mcp","sdk"]},"get":{"operationId":"listEsimSubscribers","summary":"List eSIM subscribers","description":"Returns person references in this workspace, newest first. Filter by contact_id to find an existing subscriber.","tags":["esims"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","x-data-region":"regional","parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"name":"contact_id","in":"query","required":false,"description":"The contact id.","schema":{"$ref":"#/components/schemas/ContactID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimSubscriberList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/subscribers/{subscriber_id}":{"parameters":[{"name":"subscriber_id","in":"path","required":true,"description":"The subscriber id.","schema":{"$ref":"#/components/schemas/EsimSubscriberID"}}],"get":{"operationId":"getEsimSubscriber","summary":"Get an eSIM subscriber","description":"Returns the contact reference for a subscriber in this workspace. Contact details remain available through Contacts with its separate permissions.","tags":["esims"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","x-data-region":"regional","responses":{"200":{"description":"The requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimSubscriber"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/sims/{esim_id}/assignment":{"parameters":[{"name":"esim_id","in":"path","required":true,"description":"The esim id.","schema":{"$ref":"#/components/schemas/EsimID"}}],"get":{"operationId":"getEsimAssignment","summary":"Get an eSIM assignment","description":"Returns the assigned person. An unassigned eSIM or a resource outside this workspace returns 404.","tags":["esims"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","x-data-region":"regional","responses":{"200":{"description":"The requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimAssignment"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"post":{"operationId":"createEsimAssignment","summary":"Assign an eSIM to a person","description":"Assigns an existing, allocated eSIM to a subscriber in the same workspace. Unavailable profile states return 409. Identification guidance does not gate assignment; customers handle identification collection and compliance. Repeating the same assignment returns its existing record; assigning a different person returns 409. This does not change paid packages, deliver credentials, or grant access to them.","tags":["esims"],"security":[{"BearerAuth":[]},{"CookieAuth":[]}],"x-audiences":["public","command"],"x-snippet-key":"none","x-data-region":"regional","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimAssignment"}}},"headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimAssignmentCreate"}}}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/sims":{"get":{"operationId":"listEsims","summary":"List eSIMs","description":"Returns your workspace's eSIMs as a cursor-paginated list, newest first.\nFilter by lifecycle `status`, recurring subscription (`renewal`), exact `iccid`, tag, or\ncreation time;\npass the response's `next_cursor` back as `starting_after` to fetch the\nnext page.\n\nTo find an eSIM you cannot name by its full ICCID, search on\n`iccid_prefix`, `display_name`, or `phone_number`. Each searches a\ndifferent identifier and each combines with the filters above, narrowing\nthe list rather than widening it. Searching never reaches outside the\nworkspace the request is scoped to, so an eSIM belonging to another\nworkspace is absent from the results rather than reported as forbidden.\n","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/StartingAfter"},{"$ref":"#/components/parameters/EndingBefore"},{"$ref":"#/components/parameters/EsimSubscriberFilter"},{"$ref":"#/components/parameters/CreatedAfter"},{"$ref":"#/components/parameters/CreatedBefore"},{"name":"status","in":"query","required":false,"description":"Keep only eSIMs whose current `status` matches; repeat the parameter to match any of several.","schema":{"type":"array","items":{"$ref":"#/components/schemas/EsimStatus"}}},{"name":"iccid","in":"query","required":false,"description":"Filter by ICCID (exact match).","schema":{"type":"string","minLength":1}},{"name":"mode","in":"query","required":false,"description":"Keep only eSIMs created in this mode. Without it, both live and test eSIMs are returned.","schema":{"$ref":"#/components/schemas/EsimMode"}},{"name":"renewal","in":"query","required":false,"description":"Keep only eSIMs whose recurring subscription that has not ended is in this status, or that have none (`none`); repeat the parameter to match any of several.","schema":{"type":"array","items":{"$ref":"#/components/schemas/EsimRenewalState"}}},{"$ref":"#/components/parameters/EsimTagFilter"},{"$ref":"#/components/parameters/EsimIccidPrefixFilter"},{"name":"display_name","in":"query","required":false,"description":"Keep only eSIMs whose `display_name` contains this text, ignoring case. An eSIM you have not named has no `display_name`, so it never matches.","schema":{"type":"string","minLength":1,"maxLength":120,"example":"field team"}},{"name":"phone_number","in":"query","required":false,"description":"Keep only eSIMs whose mobile network has reported this phone number, matched as a whole number rather than as a fragment. Give it in international form, with or without the leading `+`: `+31612345678` and `31612345678` select the same eSIMs. An eSIM matches on any number its mobile network has ever reported for the profile, so a number that has since moved on still finds the eSIM that held it. An eSIM whose number no network has reported yet never matches.","schema":{"type":"string","minLength":1,"maxLength":32,"example":"+31612345678"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Paginated list of eSIMs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/sims/{esim_id}":{"parameters":[{"name":"esim_id","in":"path","required":true,"description":"eSIM ID.","schema":{"$ref":"#/components/schemas/EsimID"}}],"get":{"operationId":"getEsim","summary":"Get an eSIM","description":"Returns one eSIM: lifecycle status, device installation state, current data packages with balances, service-period timestamps, and the most recent network attachment. Balances update as mobile networks report usage: each package's `balance.as_of` tells you how fresh they are.\n","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"responses":{"200":{"description":"The eSIM.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Esim"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateEsim","summary":"Update an eSIM","description":"Updates the eSIM's display name, tags, or metadata. Lifecycle and connectivity are managed through the dedicated endpoints.","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimUpdate"}}}},"responses":{"200":{"description":"The updated eSIM.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Esim"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"releaseEsim","summary":"Release an eSIM","description":"Permanently releases an eSIM. This is irreversible: the eSIM can never be\ninstalled or used again, any remaining package data balance is forfeited,\nand release never credits anything back. Use release when responding to\nfraud or closing out a trip; to pause service temporarily, use\n[Suspend an eSIM](/docs/api/reference/suspend-esim) instead.\n\nRelease completes asynchronously: the `202` response returns the eSIM in\n`releasing`, and the `esim.released` webhook event confirms completion.\nAn eSIM with an order still in flight cannot be released: wait for the\norder to reach a terminal status first. When unexpired balance remains,\nthe request fails with a conflict unless `acknowledge_balance_forfeit=true`.\n","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"acknowledge_balance_forfeit","in":"query","required":false,"description":"Confirms you accept that remaining package balances are forfeited. Omitted or false while unexpired balance remains, the request fails with a conflict error.\n","schema":{"type":"boolean"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"202":{"description":"Release in progress. The eSIM is in releasing and transitions to released when complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Esim"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/sims/{esim_id}/credentials":{"get":{"operationId":"getEsimCredentials","summary":"Get eSIM install credentials","description":"Returns installation details for an eSIM, including an iOS installation link, an activation code, and manual setup components. Android installation links and hosted QR image URLs are currently unavailable and return null. Read `instructions` for device-specific steps in the returned language.\n\nKeep installation details private: they can grant access to the profile. A null `apn`, `confirmation_code`, or `data_roaming_required` means the requirement is unknown; it does not mean the setting is unnecessary. Returns `409` when the profile cannot be installed and `503` when credentials are temporarily unavailable.\n","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"Accept-Language","in":"header","required":false,"description":"Preferred languages for the instructions field, as a standard weighted Accept-Language list. Bird serves the first one it stocks, then a variant sharing a requested base language, then English.\n","schema":{"type":"string","minLength":1}},{"name":"esim_id","in":"path","required":true,"description":"eSIM ID.","schema":{"$ref":"#/components/schemas/EsimID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"The install credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimCredentials"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/sims/{esim_id}/credentials/deliver":{"post":{"operationId":"deliverEsimCredentials","summary":"Send install credentials to the traveler","description":"Sends a hosted installation link by email or SMS. The eSIM must be installable. Email includes the link expiry time; SMS includes the link. The recipient opens the page to view the QR code and manual installation details. Links expire after seven days; resending leaves earlier links valid until expiry or explicit revocation.\n\nA `202` response confirms acceptance for sending. Check [List credential deliveries](/docs/api/reference/list-esim-deliveries) for the delivery outcome and any failure code. Reuse the same `Idempotency-Key` to recover an accepted send while its response is retained.\n\nReturns `409` with `E26012` when the selected channel is unavailable; choose another configured channel. New deliveries return `501` while hosted links are unavailable. A retained successful response can still be replayed during that time.\n","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"esim_id","in":"path","required":true,"description":"eSIM ID.","schema":{"$ref":"#/components/schemas/EsimID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimDelivery"},"example":{"to":"+31612345678","channel":"sms","locale":"nl"}}}},"responses":{"202":{"description":"The delivery was accepted. The returned id reappears on the `esim.credentials.delivered` or `esim.credentials.delivery_failed` event that settles this delivery.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimCredentialsDelivery"}}},"headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/sims/{esim_id}/deliveries":{"parameters":[{"name":"esim_id","in":"path","required":true,"description":"Identifier of the eSIM.","schema":{"$ref":"#/components/schemas/EsimID"}}],"get":{"operationId":"listEsimDeliveries","summary":"List an eSIM's credential deliveries","description":"Returns the credential deliveries sent for this eSIM, newest first (the most recent 50), each with its outcome. A delivery settles to `delivered` or `failed` and is also reported by the `esim.credentials.delivered` and `esim.credentials.delivery_failed` events carrying the same delivery id.\n","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"responses":{"200":{"description":"The eSIM's deliveries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimDeliveryList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/sims/{esim_id}/install-links":{"post":{"operationId":"createEsimInstallLink","summary":"Create a hosted install link","description":"Creates a link to a hosted installation page for one eSIM. The recipient can open the page without a Bird account. The returned `url` grants access to installation details: share it privately and retain it securely if needed, because later reads do not return it.\n\nThe link expires after seven days. Creating another link leaves earlier links valid. Use [Revoke a hosted install link](/docs/api/reference/delete-esim-install-link) to disable a link before expiry. A matching retry with the same `Idempotency-Key` returns the original response while it is retained; after that, a retry creates a new link.\n\nThe eSIM must be installable. Returns `409` when the profile cannot be installed, `503` when credentials are temporarily unavailable, or `501` when new hosted links are unavailable. A retained successful response can still be replayed while new links are unavailable.\n","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"esim_id","in":"path","required":true,"description":"eSIM ID.","schema":{"$ref":"#/components/schemas/EsimID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"201":{"description":"The link was minted. Its url appears here and in no later read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimInstallLink"}}},"headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/sims/{esim_id}/install-links/{install_link_id}":{"parameters":[{"name":"esim_id","in":"path","required":true,"description":"eSIM ID.","schema":{"$ref":"#/components/schemas/EsimID"}},{"name":"install_link_id","in":"path","required":true,"description":"Hosted install link ID.","schema":{"$ref":"#/components/schemas/EsimInstallLinkID"}}],"delete":{"operationId":"deleteEsimInstallLink","summary":"Revoke a hosted install link","description":"Revokes a hosted installation link so it no longer grants access to installation details. Revoking an expired or already revoked link also succeeds.\n\nRevocation does not remove an installed profile or stop its service. Use [Suspend an eSIM](/docs/api/reference/suspend-esim) to pause data service. A link belonging to another eSIM returns `404`. Returns `501` when hosted installation is unavailable in the region.\n","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"204":{"description":"The link no longer installs the eSIM."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/sims/{esim_id}/packages":{"parameters":[{"name":"esim_id","in":"path","required":true,"description":"eSIM ID.","schema":{"$ref":"#/components/schemas/EsimID"}}],"get":{"operationId":"listEsimPackages","summary":"List an eSIM's data packages","description":"Returns the eSIM's data packages with per-zone balances, validity, and status, newest first and in full: an eSIM holds at most package_limit concurrent packages. Balances update as mobile networks report usage; `balance.as_of` tells you how fresh they are.\n","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"responses":{"200":{"description":"The eSIM's packages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimPackageList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/sims/{esim_id}/packages/{package_id}":{"parameters":[{"name":"esim_id","in":"path","required":true,"description":"eSIM ID.","schema":{"$ref":"#/components/schemas/EsimID"}},{"name":"package_id","in":"path","required":true,"description":"Data package ID.","schema":{"$ref":"#/components/schemas/EsimPackageID"}}],"get":{"operationId":"getEsimPackage","summary":"Get a data package","description":"Returns one data package with its balance, validity, speed class, and status.","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"responses":{"200":{"description":"The package.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimPackage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"delete":{"operationId":"deleteEsimPackage","summary":"Remove a data package","description":"Removes a data package and frees capacity under the eSIM's `package_limit`. Remaining data is forfeited without a refund. If usable balance remains, the request returns `409` unless `acknowledge_balance_forfeit=true`.\n\nA `202` response returns the package in `removing`. Use [Get a data package](/docs/api/reference/get-esim-package) to confirm `removed`. If the network rejects removal, the package returns to its previous status.\n","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"acknowledge_balance_forfeit","in":"query","required":false,"description":"Confirms you accept that the package's remaining balance is forfeited. Omitted or false while balance remains, the request fails with a conflict error.\n","schema":{"type":"boolean","default":false}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"202":{"description":"Removal in progress. The returned package is in `removing`; it reaches `removed` once complete, confirmed by the esim.package.removed event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimPackage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/sims/{esim_id}/compatible-offers":{"parameters":[{"name":"esim_id","in":"path","required":true,"description":"Identifier of the eSIM.","schema":{"$ref":"#/components/schemas/EsimID"}}],"get":{"operationId":"listEsimCompatibleOffers","summary":"List offers an eSIM can take","description":"Returns offers currently compatible with this eSIM’s network, package capacity, and existing packages. Use these offers for top-ups. Availability can change before purchase; refresh the list before ordering. An incompatible top-up returns `409`.","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"name":"recurring_only","in":"query","required":false,"description":"Keep only offers with recurring service configured. Enrollment still checks supplier support and the published recurring price.","schema":{"type":"boolean","default":false}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"200":{"description":"Offers orderable as top-ups for this eSIM.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimCompatibleOfferList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/sims/{esim_id}/suspend":{"post":{"operationId":"suspendEsim","summary":"Suspend an eSIM","description":"Suspends the eSIM's data service, for example during a payment dispute or a suspected-fraud hold. Suspension is reversible: use [Resume an eSIM](/docs/api/reference/resume-esim) to restore service. The suspension does not pause validity: package expiry and the eSIM's service period keep running while suspended. Completes asynchronously; the `esim.suspended` webhook event confirms it.\n","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"esim_id","in":"path","required":true,"description":"eSIM ID.","schema":{"$ref":"#/components/schemas/EsimID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"202":{"description":"Suspension in progress. The returned eSIM is in `suspending`; confirmed by the esim.suspended event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Esim"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/sims/{esim_id}/resume":{"post":{"operationId":"resumeEsim","summary":"Resume an eSIM","description":"Resumes a suspended eSIM so it can use data again. Completes asynchronously; the `esim.resumed` webhook event confirms it. Resuming an eSIM that is not suspended returns a conflict.\n","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"esim_id","in":"path","required":true,"description":"eSIM ID.","schema":{"$ref":"#/components/schemas/EsimID"}},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"responses":{"202":{"description":"Resume in progress. The returned eSIM is in `resuming`; confirmed by the esim.resumed event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Esim"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}},"/v1/esim/settings":{"get":{"operationId":"getEsimSettings","summary":"Get the eSIM settings","description":"Returns your workspace’s eSIM settings, including defaults for fields you have not changed. Use the update operation to change them.","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"responses":{"200":{"description":"The workspace's eSIM settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimSettings"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"parameters":[{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"x-surfaces":["cli","mcp","sdk"]},"patch":{"operationId":"updateEsimSettings","summary":"Update the eSIM settings","description":"Applies partial changes to your workspace's eSIM settings and returns the effective result. Omit a field to leave it as it is. Automatic delivery is disabled initially. Enabling it applies to new eSIM purchases; disabling it also stops queued automatic sends. Manual sends are independent of this setting.\n","tags":["esims"],"x-audiences":["public","command"],"x-snippet-key":"none","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/XWorkspaceId"},{"$ref":"#/components/parameters/XOrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimSettingsUpdate"},"example":{"credential_delivery_enabled":false}}}},"responses":{"200":{"description":"The workspace's eSIM settings after the update.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsimSettings"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-surfaces":["cli","mcp","sdk"]}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Pass the API key as a bearer token in the `Authorization` header. Workspace\nkeys use `bk_{region}_*`; organization master keys use `bm_{region}_*`.\nThe prefix identifies the region and selects the\nAPI endpoint. Official Bird SDKs and the CLI derive the region from the key.\n"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"bird_session","description":"Session cookie set after signing in to the Bird dashboard. The cookie\nvalue is an opaque session token; no session data is stored in the cookie\nitself.\n"},"RealtimeKey":{"type":"apiKey","in":"header","name":"X-Realtime-Key","description":"The Realtime app key. Together with `X-Realtime-Secret`, it authenticates a\nrequest to the Realtime API in addition to the workspace credential. Both\nvalues come from the app's credentials and must belong to the calling\nworkspace. Official Bird SDKs accept the pair as client configuration.\n"},"RealtimeSecret":{"type":"apiKey","in":"header","name":"X-Realtime-Secret","description":"The Realtime app secret paired with `X-Realtime-Key`. The API returns the\nsecret only when the key is created and does not store it. Create a new key\nand revoke the current key if you lose the secret. Official Bird SDKs accept\nthe pair as client configuration.\n"}},"schemas":{"WebhookEvent":{"description":"Webhook delivery body. `type` identifies the event variant, `timestamp` is when the event occurred, and `data` contains the event-specific payload. See the [webhooks guide](/docs/guides/webhooks) for signature verification.\n","oneOf":[{"$ref":"#/components/schemas/EventAMBAccepted"},{"$ref":"#/components/schemas/EventAMBAuthenticationUpdated"},{"$ref":"#/components/schemas/EventAMBConversationClosed"},{"$ref":"#/components/schemas/EventAMBConversationReopened"},{"$ref":"#/components/schemas/EventAMBConversationStarted"},{"$ref":"#/components/schemas/EventAMBReceived"},{"$ref":"#/components/schemas/EventAMBRejected"},{"$ref":"#/components/schemas/EventAMBSendFailed"},{"$ref":"#/components/schemas/EventAMBSent"},{"$ref":"#/components/schemas/EventAMBSuppressionCreated"},{"$ref":"#/components/schemas/EventDomainFailed"},{"$ref":"#/components/schemas/EventDomainVerified"},{"$ref":"#/components/schemas/EventEmailAccepted"},{"$ref":"#/components/schemas/EventEmailBounced"},{"$ref":"#/components/schemas/EventEmailCanceled"},{"$ref":"#/components/schemas/EventEmailClicked"},{"$ref":"#/components/schemas/EventEmailComplained"},{"$ref":"#/components/schemas/EventEmailDeferred"},{"$ref":"#/components/schemas/EventEmailDelivered"},{"$ref":"#/components/schemas/EventEmailListUnsubscribed"},{"$ref":"#/components/schemas/EventEmailOpened"},{"$ref":"#/components/schemas/EventEmailOutOfBandBounce"},{"$ref":"#/components/schemas/EventEmailProcessed"},{"$ref":"#/components/schemas/EventEmailReceived"},{"$ref":"#/components/schemas/EventEmailRejected"},{"$ref":"#/components/schemas/EventEmailScheduled"},{"$ref":"#/components/schemas/EventEmailUnsubscribed"},{"$ref":"#/components/schemas/EventEmailMailboxMessageDelivered"},{"$ref":"#/components/schemas/EventEmailMailboxMessageFailed"},{"$ref":"#/components/schemas/EventEmailMailboxMessageReceived"},{"$ref":"#/components/schemas/EventEmailMailboxMessageSent"},{"$ref":"#/components/schemas/EventEmailMailboxSuspended"},{"$ref":"#/components/schemas/EventEmailMailboxThreadCreated"},{"$ref":"#/components/schemas/EventEmailSuppressionCreated"},{"$ref":"#/components/schemas/EventPreferenceDeleted"},{"$ref":"#/components/schemas/EventPreferenceGranted"},{"$ref":"#/components/schemas/EventPreferenceRevoked"},{"$ref":"#/components/schemas/EventSMSAccepted"},{"$ref":"#/components/schemas/EventSMSDelivered"},{"$ref":"#/components/schemas/EventSMSExpired"},{"$ref":"#/components/schemas/EventSMSFailed"},{"$ref":"#/components/schemas/EventSMSReceived"},{"$ref":"#/components/schemas/EventSMSRejected"},{"$ref":"#/components/schemas/EventSMSSent"},{"$ref":"#/components/schemas/EventSMSUndelivered"},{"$ref":"#/components/schemas/EventSMSSuppressionCreated"},{"$ref":"#/components/schemas/EventVerifyAttemptDelivered"},{"$ref":"#/components/schemas/EventVerifyAttemptSent"},{"$ref":"#/components/schemas/EventVerifyAttemptUndelivered"},{"$ref":"#/components/schemas/EventVerifyVerificationCreated"},{"$ref":"#/components/schemas/EventVerifyVerificationFailed"},{"$ref":"#/components/schemas/EventVerifyVerificationVerified"},{"$ref":"#/components/schemas/EventVoiceCallAnswered"},{"$ref":"#/components/schemas/EventVoiceCallEnded"},{"$ref":"#/components/schemas/EventVoiceCallInitiated"},{"$ref":"#/components/schemas/EventWhatsAppAccepted"},{"$ref":"#/components/schemas/EventWhatsAppDelivered"},{"$ref":"#/components/schemas/EventWhatsAppFailed"},{"$ref":"#/components/schemas/EventWhatsAppGroupJoinRequestCreated"},{"$ref":"#/components/schemas/EventWhatsAppGroupJoinRequestRevoked"},{"$ref":"#/components/schemas/EventWhatsAppReacted"},{"$ref":"#/components/schemas/EventWhatsAppRead"},{"$ref":"#/components/schemas/EventWhatsAppReceived"},{"$ref":"#/components/schemas/EventWhatsAppRejected"},{"$ref":"#/components/schemas/EventWhatsAppSent"},{"$ref":"#/components/schemas/EventWhatsAppSuppressionCreated"}],"discriminator":{"propertyName":"type","mapping":{"amb.accepted":"#/components/schemas/EventAMBAccepted","amb.authentication.updated":"#/components/schemas/EventAMBAuthenticationUpdated","amb.conversation_closed":"#/components/schemas/EventAMBConversationClosed","amb.conversation_reopened":"#/components/schemas/EventAMBConversationReopened","amb.conversation_started":"#/components/schemas/EventAMBConversationStarted","amb.received":"#/components/schemas/EventAMBReceived","amb.rejected":"#/components/schemas/EventAMBRejected","amb.send_failed":"#/components/schemas/EventAMBSendFailed","amb.sent":"#/components/schemas/EventAMBSent","amb_suppression.created":"#/components/schemas/EventAMBSuppressionCreated","domain.failed":"#/components/schemas/EventDomainFailed","domain.verified":"#/components/schemas/EventDomainVerified","email.accepted":"#/components/schemas/EventEmailAccepted","email.bounced":"#/components/schemas/EventEmailBounced","email.canceled":"#/components/schemas/EventEmailCanceled","email.clicked":"#/components/schemas/EventEmailClicked","email.complained":"#/components/schemas/EventEmailComplained","email.deferred":"#/components/schemas/EventEmailDeferred","email.delivered":"#/components/schemas/EventEmailDelivered","email.list_unsubscribed":"#/components/schemas/EventEmailListUnsubscribed","email.opened":"#/components/schemas/EventEmailOpened","email.out_of_band_bounce":"#/components/schemas/EventEmailOutOfBandBounce","email.processed":"#/components/schemas/EventEmailProcessed","email.received":"#/components/schemas/EventEmailReceived","email.rejected":"#/components/schemas/EventEmailRejected","email.scheduled":"#/components/schemas/EventEmailScheduled","email.unsubscribed":"#/components/schemas/EventEmailUnsubscribed","email_mailbox.message_delivered":"#/components/schemas/EventEmailMailboxMessageDelivered","email_mailbox.message_failed":"#/components/schemas/EventEmailMailboxMessageFailed","email_mailbox.message_received":"#/components/schemas/EventEmailMailboxMessageReceived","email_mailbox.message_sent":"#/components/schemas/EventEmailMailboxMessageSent","email_mailbox.suspended":"#/components/schemas/EventEmailMailboxSuspended","email_mailbox.thread_created":"#/components/schemas/EventEmailMailboxThreadCreated","email_suppression.created":"#/components/schemas/EventEmailSuppressionCreated","preference.deleted":"#/components/schemas/EventPreferenceDeleted","preference.granted":"#/components/schemas/EventPreferenceGranted","preference.revoked":"#/components/schemas/EventPreferenceRevoked","sms.accepted":"#/components/schemas/EventSMSAccepted","sms.delivered":"#/components/schemas/EventSMSDelivered","sms.expired":"#/components/schemas/EventSMSExpired","sms.failed":"#/components/schemas/EventSMSFailed","sms.received":"#/components/schemas/EventSMSReceived","sms.rejected":"#/components/schemas/EventSMSRejected","sms.sent":"#/components/schemas/EventSMSSent","sms.undelivered":"#/components/schemas/EventSMSUndelivered","sms_suppression.created":"#/components/schemas/EventSMSSuppressionCreated","verify.attempt.delivered":"#/components/schemas/EventVerifyAttemptDelivered","verify.attempt.sent":"#/components/schemas/EventVerifyAttemptSent","verify.attempt.undelivered":"#/components/schemas/EventVerifyAttemptUndelivered","verify.verification.created":"#/components/schemas/EventVerifyVerificationCreated","verify.verification.failed":"#/components/schemas/EventVerifyVerificationFailed","verify.verification.verified":"#/components/schemas/EventVerifyVerificationVerified","voice_call.answered":"#/components/schemas/EventVoiceCallAnswered","voice_call.ended":"#/components/schemas/EventVoiceCallEnded","voice_call.initiated":"#/components/schemas/EventVoiceCallInitiated","whatsapp.accepted":"#/components/schemas/EventWhatsAppAccepted","whatsapp.delivered":"#/components/schemas/EventWhatsAppDelivered","whatsapp.failed":"#/components/schemas/EventWhatsAppFailed","whatsapp.group.join_request_created":"#/components/schemas/EventWhatsAppGroupJoinRequestCreated","whatsapp.group.join_request_revoked":"#/components/schemas/EventWhatsAppGroupJoinRequestRevoked","whatsapp.reacted":"#/components/schemas/EventWhatsAppReacted","whatsapp.read":"#/components/schemas/EventWhatsAppRead","whatsapp.received":"#/components/schemas/EventWhatsAppReceived","whatsapp.rejected":"#/components/schemas/EventWhatsAppRejected","whatsapp.sent":"#/components/schemas/EventWhatsAppSent","whatsapp_suppression.created":"#/components/schemas/EventWhatsAppSuppressionCreated"}}},"_ListEnvelope":{"type":"object","required":["next_cursor","prev_cursor","refresh_cursor"],"properties":{"next_cursor":{"type":["string","null"],"description":"Cursor for the next page. Pass back as `starting_after` to advance forward. `null` when no next page exists.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"},"prev_cursor":{"type":["string","null"],"description":"Cursor for the previous page. Pass back as `ending_before` to step backward. `null` when no previous page exists.","example":null},"refresh_cursor":{"type":["string","null"],"description":"Refresh anchor, the first row of this response. Pass back as `ending_before` to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-`null` whenever `data` is non-empty; `null` only on an empty page. Distinct from `prev_cursor`.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"}}},"Timestamps":{"type":"object","required":["created_at","updated_at"],"properties":{"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"example":"2026-05-20T09:14:52Z"},"updated_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"example":"2026-05-25T16:42:01Z"}}},"ErrorDetail":{"type":"object","additionalProperties":false,"required":["param","message"],"properties":{"param":{"type":"string","minLength":1,"description":"Dotted field path, such as `to[0].email`, `subject`, or `.`. When the request was rejected for a query parameter the endpoint does not declare, this carries that parameter's name instead of a field path.\n"},"message":{"type":"string","minLength":1,"description":"What is wrong with this field."}}},"NextAction":{"type":"object","additionalProperties":false,"required":["kind","description"],"properties":{"kind":{"type":"string","minLength":1,"x-extensible-enum":["operation","external","wait","terminal"],"description":"What you do about this step.\n\n- `operation`: call the operation named in `operation`, then\n  read again.\n- `external`: act somewhere this API does not reach, then read\n  again.\n- `wait`: nothing is asked of you, so read again later.\n- `terminal`: nothing you do resolves this, so stop retrying.\n\nTolerate a value you do not recognize: show the `description` and\noffer no action.\n"},"description":{"type":"string","minLength":1,"description":"A short, human-readable label for the step, suitable for display."},"operation":{"type":"string","minLength":1,"description":"The operationId to call. Present only when `kind` is `operation`. The operation's own schema says how to call it; this says only which one, and what to address it with.\n"},"params":{"type":"object","additionalProperties":{"type":"string","minLength":1},"description":"The parameters that address the operation, by name: `{\"sender_id\": \"…\"}` for an operation on `/v1/sms/senders/{sender_id}/requirements`. A parameter the operation takes in its query string is given the same way, so an operation addressed as `?subject_id=` carries `{\"subject_id\": \"…\"}`. Every parameter the call needs is here, whether its value came from the thing you were acting on or is fixed for this step, so you can make the call from this object alone. Present only when `kind` is `operation` and the operation names a subject. A request body, when the operation takes one, is described by the operation's own schema and never appears here.\n"},"url":{"type":"string","format":"uri","description":"A URL to open. Present only when `kind` is `external`, and only when the step has one. An external step whose `description` says to go and do something with no URL to open is normal.\n"}}},"RateLimitScope":{"type":"string","minLength":1,"enum":["organization","workspace"],"description":"Which limit refused the request.\n\n- `organization`: the limit shared by every workspace in the organization.\n- `workspace`: the limit set for this workspace.\n"},"RateLimitErrorContext":{"type":"object","additionalProperties":false,"description":"The rate-limit policy that refused the request. Present only on `rate_limit_error` responses from a rate-limit policy. A workspace-targeted request is checked against its organization's limit and any limit set for its workspace; the organization limit is reported when both are exhausted.\n","required":["policy_key","scope","window_seconds","limit"],"properties":{"policy_key":{"type":"string","minLength":1,"example":"email_send","description":"Stable key of the rate-limit policy that refused the request."},"scope":{"$ref":"#/components/schemas/RateLimitScope"},"window_seconds":{"type":"integer","minimum":1,"description":"The rolling window length in seconds."},"limit":{"type":"integer","minimum":1,"description":"Maximum policy units per rolling window under the limit that refused the request."}}},"QuotaScope":{"type":"string","minLength":1,"enum":["organization","workspace"],"description":"Which limit refused the request.\n\n- `organization`: the limit shared by every workspace in the organization.\n- `workspace`: the limit set for this workspace.\n"},"QuotaErrorContext":{"type":"object","additionalProperties":false,"description":"The quota limit that refused a resource change. A change in a workspace is checked against its organization's limit and its workspace's limit, whether set manually or derived from the organization's automatic allocation; the organization limit is reported when both refuse. When scope is workspace, follow the response remediation instead of the error code's organization-wide recovery guidance. An organization administrator can adjust the workspace limit or the automatic allocation; the shared organization limit still applies. Bird sets the mTLS limits, so for those, contact your Bird representative.\n","required":["quota_key","scope"],"properties":{"quota_key":{"type":"string","minLength":1,"example":"email_mailboxes_max","description":"Stable key of the quota that refused the change."},"scope":{"$ref":"#/components/schemas/QuotaScope"}}},"ErrorBody":{"type":"object","additionalProperties":false,"required":["type","code","name","message","doc_url","request_id"],"properties":{"type":{"type":"string","minLength":1,"description":"Broad category for coarse client branching.","enum":["auth_error","bad_request_error","billing_error","client_closed_request_error","conflict_error","gone_error","internal_error","misdirected_error","not_found_error","not_implemented_error","payload_too_large_error","permission_error","precondition_error","rate_limit_error","service_unavailable_error","too_early_error","validation_error"]},"code":{"type":"string","minLength":1,"pattern":"^E\\d{5}$","description":"Opaque, stable, unique error identifier. Never reused."},"name":{"type":"string","minLength":1,"description":"Human-readable slug for log readability. Paired with code, never replaces it."},"message":{"type":"string","minLength":1,"description":"Human-readable description. Not stable; clients must not parse it."},"param":{"type":"string","minLength":1,"description":"Identifies the offending field. Omitted when not applicable."},"doc_url":{"type":"string","minLength":1,"format":"uri","description":"Stable link to the docs page for this error code."},"request_id":{"type":"string","minLength":1,"description":"Request correlation ID for support and troubleshooting. Also returned in the `X-Request-Id` response header."},"vendor_code":{"type":"string","minLength":1,"description":"Verbatim error code from an external system, such as an SMTP response code or a payment decline code. Present only when the code may help you resolve the error.\n"},"details":{"type":"array","description":"Per-field validation errors. Present only on validation_error responses.","items":{"$ref":"#/components/schemas/ErrorDetail"}},"remediation":{"type":"string","minLength":1,"description":"A human-readable next step to resolve this error. Present when a recovery is known."},"next":{"type":"array","description":"The steps that resolve this error. Perform them in order, re-reading after each; a `wait` or `terminal` step is always last. Present for errors with a well-defined recovery, such as unmet preconditions and conflicts.\n","items":{"$ref":"#/components/schemas/NextAction"}},"rate_limit":{"$ref":"#/components/schemas/RateLimitErrorContext"},"quota":{"$ref":"#/components/schemas/QuotaErrorContext"}}},"Error":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}}},"SortOrder":{"type":"string","enum":["asc","desc"],"description":"Sort direction, ascending or descending."},"BrandID":{"type":"string","minLength":1,"pattern":"^bnd_[0-9a-hjkmnp-tv-z]{26}$","example":"bnd_01krdgeqcxet5s7t44vh8rt9mg"},"TemplateSlug":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$","description":"A template's slug: what you send it by, for example `welcome-email`. Email and SMS slugs stay fixed after creation. WhatsApp slugs can change only before the first submission. A slug can contain lowercase letters, numbers, hyphens, and underscores, has to start and end with a letter or a number, and can be up to 63 characters long.\n","example":"welcome-email"},"UserID":{"type":"string","minLength":1,"pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","example":"usr_01krdgeqcxet5s7t44vh8rt9mg"},"_ListEnvelopeWithTotal":{"allOf":[{"$ref":"#/components/schemas/_ListEnvelope"},{"type":"object","properties":{"total":{"type":["integer","null"],"format":"int64","minimum":0,"description":"Total number of items matching the request's filters across all pages. Present only when `include_total=true` was passed, and omitted otherwise."}}}]},"APIKeyID":{"type":"string","minLength":1,"pattern":"^key_[0-9a-hjkmnp-tv-z]{26}$","example":"key_01krdgeqcxet5s7t44vh8rt9mg"},"WorkspaceID":{"type":"string","minLength":1,"pattern":"^ws_[0-9a-hjkmnp-tv-z]{26}$","example":"ws_01krdgeqcxet5s7t44vh8rt9mg"},"TenantName":{"type":"string","minLength":3,"maxLength":100,"description":"Must include at least one letter or number.","example":"Acme Corp"},"Region":{"type":"string","minLength":1,"enum":["us1","eu1"],"description":"Deployment region identifier.","example":"us1"},"ProductID":{"type":"string","minLength":1,"pattern":"^prd_[0-9a-hjkmnp-tv-z]{26}$","example":"prd_01krdgeqcxet5s7t44vh8rt9mg"},"OrganizationID":{"type":"string","minLength":1,"pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","example":"org_01krdgeqcxet5s7t44vh8rt9mg"},"Timezone":{"type":"string","minLength":1,"description":"IANA timezone identifier, such as `America/New_York`, `Europe/Amsterdam`, or `UTC`.","example":"America/New_York"},"QuotaUnit":{"type":["string","null"],"minLength":1,"x-extensible-enum":["count","bytes","days","microunits"],"example":"count","description":"What the quota's limit is measured in. `null` for a quota whose `type` is `boolean`, because its limit is a switch rather than an amount. `label` names what is counted.\n\n- `count`: a plain number: a count of things, such as domains or mailboxes, or a ratio such as a percentage or multiple.\n- `bytes`: stored data, in bytes.\n- `days`: a period, in days.\n- `microunits`: an amount of money in millionths of the billing currency's main unit.\n"},"QuotaType":{"type":"string","minLength":1,"x-extensible-enum":["integer","boolean"],"description":"How to read the quota's limit.\n\n- `integer`: a count or amount, measured in `unit`.\n- `boolean`: a feature switch. A limit of `1` turns the feature on and `0` turns it off.\n"},"DocsSearchResult":{"type":"object","additionalProperties":false,"required":["title","section","slug","url","doc_url","markdown_url","token_estimate","score"],"properties":{"title":{"type":"string","minLength":1,"readOnly":true,"description":"Title of the documentation page this result belongs to."},"section":{"type":"string","minLength":1,"readOnly":true,"description":"Heading of the matching section within the page."},"slug":{"type":"string","minLength":1,"readOnly":true,"description":"Stable identifier of the page. Pass it as the `slug` parameter of `GET /v1/docs/pages` to read the whole page as Markdown."},"url":{"type":"string","minLength":1,"readOnly":true,"description":"Absolute URL of the matching section, including the heading anchor."},"doc_url":{"type":"string","minLength":1,"readOnly":true,"description":"Absolute URL of the page, without the section anchor. Results from the same page share it, so it can be used to group them."},"markdown_url":{"type":"string","minLength":1,"readOnly":true,"description":"Absolute URL that returns the page's full content as Markdown; also the page's canonical source URL."},"snippet":{"type":"string","readOnly":true,"description":"Short excerpt of the matching content, with the query terms in context. Always returned."},"highlights":{"type":"array","readOnly":true,"description":"The passages of the section that match the query, longer than the snippet. Returned only when `contents` is `highlights`.","items":{"type":"string"}},"token_estimate":{"type":"integer","readOnly":true,"description":"Approximate token count of the full page returned by `markdown_url`, to budget reading it. Results from the same page share it."},"score":{"type":"number","readOnly":true,"description":"Relevance score. Higher is more relevant; results are ordered by descending score."}}},"DocsSearchResponse":{"type":"object","additionalProperties":false,"required":["query","locale","results"],"properties":{"query":{"type":"string","minLength":1,"readOnly":true,"description":"The search query that produced these results."},"locale":{"type":"string","minLength":1,"readOnly":true,"description":"The documentation locale the results were drawn from."},"results":{"type":"array","readOnly":true,"description":"Matching documentation sections, ordered by descending relevance.","items":{"$ref":"#/components/schemas/DocsSearchResult"}}}},"DocsPage":{"type":"object","additionalProperties":false,"required":["slug","locale","url","markdown"],"properties":{"slug":{"type":"string","minLength":1,"readOnly":true,"description":"Slug of the page, echoing the requested slug."},"locale":{"type":"string","minLength":1,"readOnly":true,"description":"Documentation locale the page was drawn from."},"url":{"type":"string","minLength":1,"readOnly":true,"description":"Absolute URL of the page, suitable to cite as the source of an answer."},"markdown":{"type":"string","minLength":1,"readOnly":true,"description":"The requested page content as Markdown, limited to the selected view for API references."}}},"CurrencyCode":{"type":"string","minLength":3,"maxLength":3,"pattern":"^[A-Z]{3}$","description":"ISO 4217 three-letter currency code.","example":"EUR"},"DestinationRegion":{"type":["string","null"],"minLength":1,"x-extensible-enum":["western_europe","nordics_baltics","southern_europe","central_eastern_europe","north_america","latin_america_caribbean","middle_east_north_africa","sub_saharan_africa","central_asia_caucasus","south_asia","south_east_asia","east_asia","oceania"],"example":"western_europe","description":"The commercial region this country belongs to, for grouping a destination list the way it is bought rather than alphabetically. `null` for a country we have not assigned yet. Bird defines these regions independently of ISO and UN M49. A country can move between them, so treat the set as open.\n"},"SMSRegistrationMode":{"type":"string","minLength":1,"enum":["none","optional","required"],"description":"Whether the sender type has a registration path for this destination.\n\n- `none`: no country registration is needed. Where sender IDs are overwritten, registration is unavailable.\n- `optional`: registration is available, but unregistered sending remains possible.\n- `required`: registration must be approved before sending.\n"},"SMSSenderIDBehavior":{"type":"string","minLength":1,"enum":["unknown","preserved","overwritten"],"description":"What carriers do with the sender ID for this destination.\n\n- `unknown`: the outcome has not been confirmed.\n- `preserved`: the submitted sender ID reaches the recipient unchanged.\n- `overwritten`: the submitted sender ID is overwritten before delivery.\n"},"SMSRegistrationProgram":{"type":"string","minLength":1,"x-extensible-enum":["10dlc","tfn","alpha","numeric","short_code"],"description":"The registration program a country runs for a sender type.\n\n- `10dlc`: US A2P brand and campaign registration.\n- `tfn`: US toll-free verification.\n- `alpha`: registers an alphanumeric sender.\n- `numeric`: registers a long code.\n- `short_code`: a short-code application, filed and maintained by Bird.\n"},"CountryCode":{"type":"string","minLength":2,"maxLength":2,"pattern":"^[A-Za-z]{2}$","description":"ISO 3166-1 alpha-2 country code.","example":"US"},"WorkspaceNotificationEmails":{"type":"object","additionalProperties":false,"properties":{"operational":{"type":"array","items":{"type":"string","format":"email"},"example":["alerts@example.com"],"description":"Addresses for operational notifications about this workspace (sending domain authentication failures, webhook endpoint degradation). When empty, these notifications go to the organization owners. Maximum 10 addresses."}}},"Workspace":{"allOf":[{"type":"object","required":["id","organization_id","name","notification_emails","created_at","updated_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/WorkspaceID"},"organization_id":{"$ref":"#/components/schemas/OrganizationID"},"name":{"type":"string","minLength":1,"example":"Production"},"notification_emails":{"$ref":"#/components/schemas/WorkspaceNotificationEmails"},"logo_url":{"type":["string","null"],"format":"uri","readOnly":true,"description":"HTTPS URL to the current workspace logo. `null` when unset."},"suspended_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When Bird suspended the workspace. `null` while the workspace is active. A suspended workspace cannot send messages, place calls other than emergency calls, or buy numbers or eSIMs. Its members can still sign in, read it and change its configuration.\n","example":null}}},{"$ref":"#/components/schemas/Timestamps"}]},"WorkspaceRateLimitCapStatus":{"type":"string","minLength":1,"enum":["active","expired"],"description":"Whether the workspace limit applies.\n\n- `active`: the limit is enforced alongside the organization limit.\n- `expired`: the limit passed its expiry and no longer applies. It stays visible until it is replaced or removed.\n"},"WorkspaceRateLimitCap":{"type":"object","readOnly":true,"additionalProperties":false,"description":"A workspace's own limit for a policy. It is not reserved capacity; the organization limit still applies.","required":["value","status","expires_at","updated_at"],"properties":{"value":{"type":"integer","minimum":1,"description":"Maximum policy units this workspace can use per rolling window. It can exceed the organization limit."},"status":{"$ref":"#/components/schemas/WorkspaceRateLimitCapStatus"},"expires_at":{"type":["string","null"],"format":"date-time","description":"When the workspace limit stops applying. `null` means it has no expiry."},"updated_at":{"type":"string","minLength":1,"format":"date-time","description":"When the workspace limit was last set."}}},"WorkspaceRateLimitLimitSource":{"type":"string","minLength":1,"x-extensible-enum":["manual","automatic","organization"],"description":"Which limit bounds the workspace's own usage.\n\n- `manual`: the workspace's own active limit.\n- `automatic`: the workspace's share of the organization limit under its automatic allocation.\n- `organization`: no workspace limit applies; only the shared organization limit does.\n"},"WorkspaceRateLimitAttributionStatus":{"type":"string","minLength":1,"enum":["unavailable","warming","ready"],"description":"Whether workspace usage has been measured for long enough to set a new workspace limit.\n\n- `unavailable`: workspace limits cannot be set in this region yet.\n- `warming`: workspace usage is being measured; a limit can be set from `ready_at`.\n- `ready`: a workspace limit can be set.\n\nExisting workspace limits are enforced in every state and can be removed while the workspace can be managed.\n"},"WorkspaceRateLimitAttribution":{"type":"object","additionalProperties":false,"description":"When workspace usage has been measured for long enough to set a new workspace limit for this policy. Readiness covers timing only; a new limit also needs an organization with several workspaces, and with one workspace only an existing unexpired limit can be changed.","required":["status","ready_at"],"properties":{"status":{"$ref":"#/components/schemas/WorkspaceRateLimitAttributionStatus"},"ready_at":{"type":["string","null"],"format":"date-time","description":"When workspace usage has been measured for long enough, from which a workspace limit can be set if the organization's other conditions allow it. `null` while workspace limits are unavailable in this region."}}},"WorkspaceRateLimitUsageStatus":{"type":"string","minLength":1,"enum":["available","unavailable"],"description":"Whether current usage could be read.\n\n- `available`: the remaining counts reflect usage at `observed_at`.\n- `unavailable`: usage could not be read. Remaining counts are unknown, not zero.\n"},"WorkspaceRateLimitUsage":{"type":"object","additionalProperties":false,"description":"Remaining capacity in the current rolling window. Taking the observation consumes no capacity, but the request that reads it counts against its own policy, `api_list`, like any other read. It is measured against the limits that requests were checked against when it was read, which can briefly differ from the configured top-level `organization_limit` and `workspace_limit` after a limit changes.","required":["status","observed_at","organization_limit","organization_remaining","workspace_limit","workspace_remaining","resets_in_seconds"],"properties":{"status":{"$ref":"#/components/schemas/WorkspaceRateLimitUsageStatus"},"observed_at":{"type":"string","minLength":1,"format":"date-time","description":"When usage was read."},"organization_limit":{"type":["integer","null"],"minimum":1,"description":"The organization limit requests were checked against when usage was read. `null` when usage is unavailable."},"organization_remaining":{"type":["integer","null"],"minimum":0,"description":"Units the whole organization can still use in this window, shared by all its workspaces. `null` when usage is unavailable."},"workspace_limit":{"type":["integer","null"],"minimum":1,"description":"The workspace's own limit or automatic share requests were checked against when usage was read. `null` when no workspace limit applied or usage is unavailable."},"workspace_remaining":{"type":["integer","null"],"minimum":0,"description":"Units this workspace can still use under its own limit or automatic share. `null` when no workspace limit applied, usage is unavailable, or workspace usage is not yet measured for long enough."},"resets_in_seconds":{"type":["integer","null"],"minimum":0,"description":"Seconds until the current window ends. `null` when usage is unavailable."}}},"WorkspaceRateLimit":{"type":"object","readOnly":true,"additionalProperties":false,"description":"A rate-limit policy as it applies to one workspace.","required":["key","name","description","unit","window_seconds","organization_limit","workspace_limit","limit","limit_source","automatic_limit","allocation_enabled","attribution","usage"],"properties":{"key":{"type":"string","minLength":1,"example":"email_send","description":"Stable key of the rate-limit policy."},"name":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"unit":{"type":"string","minLength":1,"description":"What the policy counts, such as `request` or `message`."},"window_seconds":{"type":"integer","minimum":1,"description":"The rolling window length in seconds."},"organization_limit":{"type":"integer","minimum":1,"description":"Maximum policy units per rolling window for the whole organization, shared by all its workspaces."},"workspace_limit":{"description":"The workspace's own saved limit. `null` when none is saved; `limit_source` and `automatic_limit` then show whether an automatic share applies.","oneOf":[{"$ref":"#/components/schemas/WorkspaceRateLimitCap"},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"description":"The lower of the organization limit and the workspace's active limit or automatic share. Requests can still be refused below it when other workspaces use the shared organization limit."},"limit_source":{"$ref":"#/components/schemas/WorkspaceRateLimitLimitSource"},"automatic_limit":{"type":["integer","null"],"minimum":1,"description":"The workspace's share under the organization's automatic allocation, at least 1 per window. Set only when `limit_source` is `automatic`; it is never saved as a workspace limit."},"allocation_enabled":{"type":"boolean","description":"Whether the organization has an automatic allocation of this policy. It can be `true` while `limit_source` is `manual`. When `true`, changing or removing this workspace's limit can change other workspaces' automatic shares."},"attribution":{"$ref":"#/components/schemas/WorkspaceRateLimitAttribution"},"usage":{"$ref":"#/components/schemas/WorkspaceRateLimitUsage"}}},"WorkspaceRateLimitList":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceRateLimit"}}}},"WorkspaceQuotaKind":{"type":"string","minLength":1,"enum":["counted","value"],"description":"What the quota limits.\n\n- `counted`: an amount the workspace accumulates, such as mailboxes or stored bytes. Usage is reported.\n- `value`: the largest setting a resource may be given, such as a retention period. No usage is counted.\n"},"WorkspaceQuotaEnforcement":{"type":"string","minLength":1,"enum":["create","outbound_send","value"],"description":"When the limits are applied.\n\n- `create`: a request that would add more than the limits allow is refused, and nothing is created.\n- `outbound_send`: sending is refused once the bytes already stored reach a limit. The size of the message being sent is not counted in advance, and incoming mail is still accepted.\n- `value`: a setting above the limit is refused when it is chosen. Existing resources keep their settings.\n"},"QuotaSource":{"type":"string","minLength":1,"x-extensible-enum":["default","plan","override"],"description":"Where the organization limit comes from.\n\n- `default`: Bird's standard limit.\n- `plan`: the organization's plan.\n- `override`: a limit Bird set for the organization.\n"},"WorkspaceQuotaCeilingStatus":{"type":"string","minLength":1,"enum":["active","expired"],"description":"Whether the workspace limit applies.\n\n- `active`: the limit applies alongside the organization limit.\n- `expired`: the limit passed its expiry and no longer applies. It stays visible until it is replaced or removed.\n"},"WorkspaceQuotaCeiling":{"type":"object","readOnly":true,"additionalProperties":false,"description":"A workspace's own limit for a quota. It is a ceiling, not reserved capacity; the organization limit still applies.","required":["value","status","expires_at","updated_at"],"properties":{"value":{"type":"integer","format":"int64","minimum":0,"description":"The workspace limit, in the quota's unit. It can exceed the organization limit. Zero allows nothing more."},"status":{"$ref":"#/components/schemas/WorkspaceQuotaCeilingStatus"},"expires_at":{"type":["string","null"],"format":"date-time","description":"When the workspace limit stops applying. `null` means it has no expiry."},"updated_at":{"type":"string","minLength":1,"format":"date-time","description":"When the workspace limit was last set."}}},"WorkspaceQuotaLimitSource":{"type":"string","minLength":1,"x-extensible-enum":["manual","automatic","organization"],"description":"Which limit bounds the workspace's own usage.\n\n- `manual`: the workspace's own active limit.\n- `automatic`: the workspace's share of the organization limit under its automatic allocation.\n- `organization`: no workspace limit applies; only the shared organization limit does. This includes an automatic allocation of an unlimited organization limit.\n"},"WorkspaceQuotaUsageStatus":{"type":"string","minLength":1,"enum":["available","unavailable"],"description":"Whether current usage could be read.\n\n- `available`: the counts reflect usage at `observed_at`.\n- `unavailable`: usage could not be read. The counts are unknown, not zero.\n"},"WorkspaceQuotaUsage":{"type":"object","readOnly":true,"additionalProperties":false,"description":"Current usage, measured against the organization limit that requests were checked against when it was read. That limit can briefly differ from the configured `organization_limit` after it changes.","required":["status","observed_at","organization_limit","organization_used","workspace_used","organization_remaining","workspace_remaining","remaining"],"properties":{"status":{"$ref":"#/components/schemas/WorkspaceQuotaUsageStatus"},"observed_at":{"type":"string","minLength":1,"format":"date-time","description":"When usage was read."},"organization_limit":{"type":"integer","format":"int64","minimum":0,"description":"The organization limit requests were checked against when usage was read. The value `9223372036854775807` represents no limit."},"organization_used":{"type":["integer","null"],"format":"int64","minimum":0,"description":"The organization's total usage across all its workspaces. `null` on the current-workspace endpoint or when usage is unavailable."},"workspace_used":{"type":["integer","null"],"format":"int64","minimum":0,"description":"This workspace's usage. `null` when usage is unavailable."},"organization_remaining":{"type":["integer","null"],"format":"int64","minimum":0,"description":"How much more the whole organization can add, shared by all its workspaces. `null` on the current-workspace endpoint or when usage is unavailable."},"workspace_remaining":{"type":["integer","null"],"format":"int64","minimum":0,"description":"How much more this workspace can add under its own limit. `null` when no workspace limit applies or usage is unavailable."},"remaining":{"type":["integer","null"],"format":"int64","minimum":0,"description":"How much more this workspace can add now, the lower of `organization_remaining` and any `workspace_remaining`. `null` on the current-workspace endpoint or when usage is unavailable."}}},"WorkspaceQuota":{"type":"object","readOnly":true,"additionalProperties":false,"description":"A resource or value quota as it applies to one workspace.","required":["key","name","description","unit","label","type","kind","enforcement","maximum_value","organization_limit","organization_source","workspace_limit","limit","limit_source","automatic_limit","allocation_enabled","usage"],"properties":{"key":{"type":"string","minLength":1,"example":"email_mailboxes_max","description":"Stable key of the quota."},"name":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"unit":{"$ref":"#/components/schemas/QuotaUnit"},"label":{"type":"string","minLength":1,"example":"mailboxes","description":"What the product calls the thing the limit applies to, such as `domains` or `seed tests`, for display next to the limit."},"type":{"$ref":"#/components/schemas/QuotaType"},"kind":{"$ref":"#/components/schemas/WorkspaceQuotaKind"},"enforcement":{"$ref":"#/components/schemas/WorkspaceQuotaEnforcement"},"maximum_value":{"type":"integer","format":"int64","minimum":0,"description":"The largest workspace limit this quota accepts, in its unit."},"organization_limit":{"type":"integer","format":"int64","minimum":0,"description":"The organization's limit, shared by all its workspaces. The value `9223372036854775807` represents no limit."},"organization_source":{"$ref":"#/components/schemas/QuotaSource"},"workspace_limit":{"description":"The workspace's own saved limit. `null` when none is saved; `limit_source` and `automatic_limit` then show whether an automatic share applies.","oneOf":[{"$ref":"#/components/schemas/WorkspaceQuotaCeiling"},{"type":"null"}]},"limit":{"type":"integer","format":"int64","minimum":0,"description":"The lower of the organization limit currently applied to requests and the workspace's active limit or automatic share. The applied organization limit can briefly differ from the configured `organization_limit` after a change. A request can still be refused below this value when other workspaces use the shared organization limit. The value `9223372036854775807` represents no limit."},"limit_source":{"$ref":"#/components/schemas/WorkspaceQuotaLimitSource"},"automatic_limit":{"type":["integer","null"],"format":"int64","minimum":0,"description":"The workspace's share under the organization's automatic allocation. Set only when `limit_source` is `automatic`; it is never saved as a workspace limit."},"allocation_enabled":{"type":"boolean","description":"Whether the organization has an automatic allocation of this quota. It can be `true` while `limit_source` is `manual`, or `organization` when the organization limit is unlimited. When `true`, changing or removing this workspace's limit can change other workspaces' automatic shares."},"usage":{"description":"Current usage. `null` for a `value` quota, which counts nothing.","oneOf":[{"$ref":"#/components/schemas/WorkspaceQuotaUsage"},{"type":"null"}]}}},"WorkspaceQuotaConfigurationStatus":{"type":"string","minLength":1,"enum":["available","unavailable"],"description":"Whether workspace limits can be set.\n\n- `available`: workspace limits can be set and changed.\n- `unavailable`: new workspace limits cannot be set in this region yet. Existing workspace limits still apply and can be removed.\n"},"WorkspaceQuotaList":{"type":"object","additionalProperties":false,"required":["data","configuration"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceQuota"}},"configuration":{"$ref":"#/components/schemas/WorkspaceQuotaConfigurationStatus"}}},"ComplianceIdentityID":{"type":"string","minLength":1,"pattern":"^cid_[0-9a-hjkmnp-tv-z]{26}$","example":"cid_01krdgeqcxet5s7t44vh8rt9mg"},"StatsComparePeriod":{"type":"string","description":"Set to `previous_period` to also return the same figures for the immediately preceding window of equal length, plus the change between the two, so you can show \"+X% vs last period\" without a second request.\n","enum":["previous_period"]},"EmailStatsSummaryPeriod":{"type":"object","additionalProperties":false,"description":"The window this response was actually computed against. The summary serves two window grains: calendar days (bounds are YYYY-MM-DD) and hours (bounds are RFC 3339 instants). The grain of `from` and `to` mirrors the grain of the request's bounds. Days and hour boundaries follow the requested `timezone` (UTC when omitted).\n","required":["from","to"],"properties":{"from":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive start of the window the response covers. A calendar day (YYYY-MM-DD, in the requested `timezone`) for day windows. For hour windows, an RFC 3339 UTC instant marking the start of the first hour, which falls on a local hour boundary when `timezone` is set.","example":"2026-05-01"},"to":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive end of the window the response covers. A calendar day (YYYY-MM-DD, in the requested `timezone`) for day windows. For hour windows, an RFC 3339 UTC instant marking the start of the last hour, which falls on a local hour boundary when `timezone` is set.","example":"2026-05-25"},"data_as_of":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"The best-effort refresh time of the statistics in this response; when they come from several rollups, it is the oldest of their latest refreshes. Events recorded before roughly this time are usually reflected, while more recent events may not be yet. Statistics are served from rolling aggregations that usually refresh within a minute, so a response can trail the latest events by a minute or more. Use this field to label data freshness (for example \"as of 14:03\") rather than assuming the numbers are up to the second. Null when the freshness boundary is not being reported.\n","example":"2026-05-25T14:03:10Z"}}},"EmailBounceStatsWithRates":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Breakdown of `bounced` by failure type, with each rate as a fraction of `bounced`. Counts are distinct bounced recipients of that type; the five types approximately partition `bounced`, so the five rates sum to roughly 1.0 when `bounced` is non-zero.\n","required":["hard","soft","admin","block","undetermined","hard_rate","soft_rate","admin_rate","block_rate","undetermined_rate"],"properties":{"hard":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients with a permanent delivery failure (invalid address or non-existent domain).","example":12410},"soft":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients with a transient delivery failure (mailbox full or server temporarily unavailable).","example":14290},"admin":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients refused by a policy at the receiving end, such as relaying denied or a blocklisted domain.","example":410},"block":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients bounced because the receiving mail server blocked the sending IP for reputation reasons.","example":920},"undetermined":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients bounced where the receiving server's response did not allow precise classification.","example":80},"hard_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Fraction of bounced recipients that hard bounced, computed as `hard / bounced`. Null when `bounced` is zero.\n","example":0.454},"soft_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Fraction of bounced recipients that soft bounced, computed as `soft / bounced`. Null when `bounced` is zero.\n","example":0.523},"admin_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Fraction of bounced recipients that admin bounced, computed as `admin / bounced`. Null when `bounced` is zero.\n","example":0.015},"block_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Fraction of bounced recipients that block bounced, computed as `block / bounced`. Null when `bounced` is zero.\n","example":0.0337},"undetermined_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Fraction of bounced recipients with undetermined classification, computed as `undetermined / bounced`. Null when `bounced` is zero.\n","example":0.0029}}},"EmailDeliveryStats":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Delivery counts and rates for the scope of the containing row (a time bucket, a breakdown dimension, or the whole period). Lifecycle counts identify distinct recipients that reached the named stage in scope; `oob_bounces` counts distinct failure events. Period summaries count each identity once per metric across the whole window, so adding time-bucket distinct counts can overstate the summary. Event time determines attribution; send time does not. A recipient delivered on Monday counts in Monday's row. A recipient who bounced and then succeeded on a retry can appear in both `bounced` and `delivered`. Very large counts are close estimates rather than exact tallies.\n\nThese counts are successive lifecycle stages, so a recipient can appear in more than one:\n\n- `rejected`: Happens before any send attempt, from suppression, policy, or a generation failure.\n- `deferred`: A temporary in-flight delay that is still being retried.\n- `bounced`: A delivery failure, with its own hard, soft, admin, block, and undetermined sub-types.\n- `complained`: Post-delivery spam feedback.\n\nEach rate is a fraction and is null when its denominator is zero. `delivery_rate` and `bounce_rate` fall in the range 0 to 1, while event-time `complaint_rate` and `oob_rate` can exceed 1 when late signals outnumber attempts in a narrow window. `accepted` is reported only where it can be attributed (time buckets and the period summary). Breakdown rows omit it.\n","required":["processed","delivered","bounced","complained","deferred","rejected","oob_bounces","effective_delivered","all_bounces","oob_rate","bounces","delivery_rate","bounce_rate","complaint_rate"],"properties":{"accepted":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients accepted for delivery after suppression filtering. Reported on time buckets and the period summary. Breakdown rows leave it out, because their rollups do not have it.","example":14820},"processed":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients whose message was processed and handed off for delivery.","example":14810},"delivered":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients whose message the receiving mail server accepted.","example":14720},"bounced":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients whose delivery failed. This is approximately the sum of the five `bounces.*` sub-counts (hard, soft, admin, block, undetermined). The two totals are worked out independently, so they can differ slightly.\n","example":90},"bounces":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailBounceStatsWithRates"}]},"complained":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients who reported the message as spam via a feedback loop.","example":3},"deferred":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients whose delivery the receiving server temporarily delayed and is still being retried.\n","example":14},"rejected":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients rejected before any delivery attempt. Includes recipients on the workspace suppression list, transmissions that could not be completed, message-generation failures, and recipients refused by sending policy. The per-recipient `rejection_reason` field on `GET /v1/email/messages/{message_id}/recipients` surfaces the specific cause.\n","example":10},"oob_bounces":{"type":"integer","minimum":0,"readOnly":true,"description":"Out-of-band bounce events: distinct failure notifications received after the receiving server had initially confirmed delivery. The count represents deduplicated events rather than unique recipients.\n","example":2},"effective_delivered":{"type":"integer","minimum":0,"readOnly":true,"description":"Recipients who remain delivered after all bounce signals resolve, computed as `delivered - oob_bounces`. Use this as the base for engagement-rate denominators. Clamped to 0 when `oob_bounces` exceeds `delivered`.","example":14718},"all_bounces":{"type":"integer","minimum":0,"readOnly":true,"description":"Total recipients in this scope who did not receive the message, computed as `bounced + oob_bounces`.","example":92},"oob_rate":{"type":["number","null"],"minimum":0,"readOnly":true,"description":"Out-of-band bounce events in this scope relative to delivery attempts, computed as `oob_bounces / (delivered + bounced)`. Because out-of-band bounces are attributed by event time as distinct events, a scope can record more of them than it attempted, pushing the rate above 1. Null when there were no attempts.\n","example":0.00014},"delivery_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Share of this scope's delivery attempts that remained delivered after all bounce signals, computed as `effective_delivered / (delivered + bounced)`. Null when there were no attempts.\n","example":0.9939},"bounce_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Share of this scope's delivery attempts that ultimately failed (inband or out-of-band), computed as `all_bounces / (delivered + bounced)`. Because `oob_bounces` counts events rather than recipients, `all_bounces` can exceed the attempt count. The rate is clamped to 1. Null when there were no attempts.\n","example":0.0061},"complaint_rate":{"type":["number","null"],"minimum":0,"readOnly":true,"description":"Spam complaints in this scope relative to effectively delivered recipients, computed as `complained / effective_delivered`. Complaints are attributed by event time, so a scope can record more of them than it effectively delivered, pushing the rate above 1. Null when `effective_delivered` is zero.\n","example":0.0002}}},"EmailEngagementStats":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Engagement counts and rates for the scope of the containing row (a time bucket, a breakdown dimension, or the whole period). `opens`, `opens_non_prefetched` and `clicks` count distinct engagement events (deduplicated occurrences). The `unique_*` fields count distinct recipients. `unsubscribes` counts distinct unsubscribe events. An event counts in the time bucket when it occurs, even if the message was sent in an earlier bucket. Counts are deduplicated with a scalable approximate counting method, so very large counts are close estimates rather than exact tallies. Each rate divides the counts in this scope and is null when its denominator is zero.\n","required":["opens","opens_non_prefetched","unique_opens","unique_opens_non_prefetched","clicks","unique_clicks","unsubscribes","open_rate","click_rate","unsubscribe_rate"],"properties":{"opens":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct open events, counting repeat opens from the same recipient and opens auto-fetched by inbox privacy features (such as Apple Mail Privacy Protection and the Gmail image proxy).\n","example":5420},"opens_non_prefetched":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct open events excluding those auto-fetched by inbox privacy features. Same event-counting semantics as `opens` (repeat opens from the same recipient count separately), with prefetched opens removed.\n","example":3210},"unique_opens":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients who opened at least once, including opens auto-fetched by inbox privacy features.","example":3640},"unique_opens_non_prefetched":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients who opened at least once, excluding opens auto-fetched by inbox privacy features. This is the numerator used for open rate, so iOS-heavy audiences (Apple Mail Privacy Protection and similar) do not inflate it.\n","example":2480},"clicks":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct click events, counting repeat clicks from the same recipient.","example":924},"unique_clicks":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients who clicked at least once.","example":621},"unsubscribes":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct unsubscribe events, recorded via the list-unsubscribe header or the footer link.","example":12},"open_rate":{"type":["number","null"],"minimum":0,"readOnly":true,"description":"Distinct non-prefetched openers relative to effectively delivered recipients in the same scope, computed as `unique_opens_non_prefetched / delivery.effective_delivered`; on rows without an `effective_delivered` field (the mailbox-provider breakdowns) the denominator equals `delivery.delivered`. The numerator excludes opens auto-fetched by inbox privacy features. Opens are attributed by event time, so engagement earned by earlier deliveries can push the rate above 1. Null when the denominator is zero.\n","example":0.1683},"click_rate":{"type":["number","null"],"minimum":0,"readOnly":true,"description":"Distinct clickers relative to effectively delivered recipients in the same scope, computed as `unique_clicks / delivery.effective_delivered` (`delivery.delivered` on rows without an `effective_delivered` field). Clicks are attributed by event time, so engagement earned by earlier deliveries can push the rate above 1. Null when the denominator is zero.\n","example":0.0422},"unsubscribe_rate":{"type":["number","null"],"minimum":0,"readOnly":true,"description":"Unsubscribe events relative to effectively delivered recipients in the same scope, computed as `unsubscribes / delivery.effective_delivered` (`delivery.delivered` on rows without an `effective_delivered` field). Unsubscribes are attributed by event time, so the rate can exceed 1. Null when the denominator is zero.\n","example":0.0009}}},"EmailLatencyQuantiles":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Approximate p50, p95, and p99 latency percentiles in milliseconds for one latency family over the bucket. All three are null when no qualifying event contributed a measurement.\n","required":["p50_ms","p95_ms","p99_ms"],"properties":{"p50_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.","example":420},"p95_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.","example":1820},"p99_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.","example":4920}}},"EmailLatencyStats":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Latency percentiles (p50, p95, p99) in milliseconds for the bucket. On the summary endpoint these are computed across the whole period rather than per bucket. Three families are reported:\n\n- `processing`: Time from accepting the send to handing the message off for delivery. Measured per processed recipient; null when no recipient in the bucket has reached the processed stage.\n- `delivery`: Time from handoff to the receiving mail server accepting the message, dominated by recipient-side delivery behavior. Measured per delivered recipient; null when no deliveries occurred in the bucket.\n- `total`: End-to-end time from accepting the send to delivery, and the number most worth watching against your own delivery targets. Measured per delivered recipient; null when no deliveries occurred in the bucket.\n\nEach family is reported independently. A family is omitted when no qualifying\nevent contributed a latency measurement in the bucket. This also applies when\nthe workspace has not recorded latency for that stage yet. The `processing`\nfamily can therefore be present while `delivery` and `total` are absent. A\nclient must handle a missing family, and a null p50/p95/p99 within a present\nfamily, by rendering a placeholder rather than assuming a number.\n","properties":{"processing":{"$ref":"#/components/schemas/EmailLatencyQuantiles"},"delivery":{"$ref":"#/components/schemas/EmailLatencyQuantiles"},"total":{"$ref":"#/components/schemas/EmailLatencyQuantiles"}}},"EmailStatsComparisonDelta":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The change in each headline metric from the preceding period to the requested one. A `*_pct_change` field is a signed relative change in a count, computed as `(current - previous) / previous`, so `0.5` means 50% higher and `-0.2` means 20% lower. It is null when the previous period's count was zero because a relative change cannot be computed. A `*_rate_pp` field is the signed difference between the two periods' rate values. Each value is expressed as a fraction. A value of `0.012` means the rate rose by 1.2 percentage points. A value of `-0.003` means it fell by 0.3 points. The field is null when either period's rate is undefined, because its denominator was zero. `delivery_rate_pp` and `bounce_rate_pp` range from `-1` to `1`, because the rates behind them cannot exceed 1. The engagement deltas have no fixed bound, because events are counted when they arrive rather than when the message was sent, which can push their rate above 1.\n","required":["sends_accepted_pct_change","delivered_pct_change","bounced_pct_change","complained_pct_change","opened_pct_change","delivery_rate_pp","open_rate_pp","click_rate_pp","bounce_rate_pp","complaint_rate_pp","unsubscribe_rate_pp"],"properties":{"sends_accepted_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in accepted messages (the `sends_accepted` count) versus the previous period, as a signed fraction. Null when the previous period accepted none.","example":0.508},"delivered_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in effectively delivered recipients (`delivery.effective_delivered`, the delivery-rate numerator) versus the previous period, as a signed fraction. Null when the previous period effectively delivered none.","example":0.122},"bounced_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in total bounces including out-of-band (`delivery.all_bounces`, the bounce-rate numerator) versus the previous period, as a signed fraction. Null when the previous period had none.","example":-0.031},"complained_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in spam complaints (`delivery.complained`) versus the previous period, as a signed fraction. Null when the previous period had none.","example":0.018},"opened_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in unique non-prefetched opens (`engagement.unique_opens_non_prefetched`, the same count the open rate uses) versus the previous period, as a signed fraction. Null when the previous period had none.","example":-0.046},"delivery_rate_pp":{"type":["number","null"],"minimum":-1,"maximum":1,"readOnly":true,"description":"Signed difference between this period's and the previous period's delivery rate, both fractions in [0,1] (multiply by 100 for percentage points). Null when either period's delivery rate is undefined.","example":0.004},"open_rate_pp":{"type":["number","null"],"readOnly":true,"description":"Signed difference between this period's and the previous period's open rate, both fractions (multiply by 100 for percentage points). Null when either period's open rate is undefined.","example":0.005},"click_rate_pp":{"type":["number","null"],"readOnly":true,"description":"Signed difference between this period's and the previous period's click rate, both fractions (multiply by 100 for percentage points). Null when either period's click rate is undefined.","example":0.002},"bounce_rate_pp":{"type":["number","null"],"minimum":-1,"maximum":1,"readOnly":true,"description":"Signed difference between this period's and the previous period's bounce rate, both fractions in [0,1] (multiply by 100 for percentage points). Null when either period's bounce rate is undefined.","example":-0.0008},"complaint_rate_pp":{"type":["number","null"],"readOnly":true,"description":"Signed difference between this period's and the previous period's complaint rate, both fractions (multiply by 100 for percentage points). Null when either period's complaint rate is undefined.","example":0.0001},"unsubscribe_rate_pp":{"type":["number","null"],"readOnly":true,"description":"Signed difference between this period's and the previous period's unsubscribe rate, both fractions (multiply by 100 for percentage points). Null when either period's unsubscribe rate is undefined.","example":-0.0001}}},"EmailStatsComparison":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The same statistics for the equal-length, inclusive period ending the day immediately before the requested start, together with the change between the two periods. Present only when `compare=previous_period` is requested. The change is already computed, so a percentage difference needs no second request.\n","required":["period","sends_accepted","delivery","engagement","latency","delta"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsSummaryPeriod","description":"The preceding window these comparison figures cover, the equal-length window ending immediately before the requested start (the prior day for day windows, the prior hour for hour windows). For a request covering 2026-05-01 to 2026-05-31, this is 2026-03-31 to 2026-04-30, both inclusive."},"sends_accepted":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct email messages accepted in the preceding period, counted at the message level.","example":8230},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailLatencyStats"}]},"delta":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailStatsComparisonDelta"}]}}},"EmailStatsSummary":{"type":"object","additionalProperties":false,"description":"A single row that aggregates delivery and engagement counts, plus derived\nrates, across the whole requested period. Use this endpoint for KPI\ntiles, campaign reporting, and anywhere you need a rate with a meaningful\ndenominator. The daily and hourly endpoints report the same rates, but\nper bucket, each one dividing that bucket's own counts.\n\nDistinct message, recipient, and event counts are computed across the whole\nrequested period. An identity present in more than one time bucket counts\nonce for that metric in the period summary, so adding daily or hourly\ndistinct counts can overstate the summary. Very large counts are close\nestimates rather than exact tallies. Latency percentiles are also computed\nacross the whole period. A rate is null when its denominator is zero.\n","required":["period","sends_accepted","delivery","engagement","latency"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsSummaryPeriod","description":"The window the response covers (echoed back from the request, day or hour grain), plus `data_as_of`, the freshness boundary the data is current to."},"sends_accepted":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct email messages accepted, counted at the message level (one per accepted send regardless of recipient count) across the whole requested period. This field counts messages. `delivery.accepted` counts recipients, so the two values are not comparable (a single message to 500 recipients is 1 here and up to 500 there).","example":12410},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailLatencyStats"}]},"comparison":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailStatsComparison"}]}}},"EmailStatsPoint":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Aggregate stats for one time bucket (a calendar day or hour, per the requested grain, in the requested `timezone` or UTC by default), bucketed by event time. Buckets with no activity are included with zero counts and null latency percentiles, so the series charts continuously without client-side gap handling.\n","required":["bucket","sends_accepted","delivery","engagement","latency"],"properties":{"bucket":{"type":"string","minLength":1,"readOnly":true,"description":"The day (YYYY-MM-DD, in the requested `timezone`) or hour this point covers, matching the period's grain. An hour bucket is an RFC 3339 UTC instant marking the start of the hour. It falls on a local hour boundary when `timezone` is set, which is on the UTC hour only for whole-hour offsets.","example":"2026-05-25"},"sends_accepted":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct email messages accepted in this bucket, counted at the message level (one per accepted send regardless of how many recipients it addresses). Every other metric in `delivery` and `engagement` is recipient-level or event-level.\n","example":412},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailLatencyStats"}]}}},"EmailStatsSortMetric":{"type":"string","default":"processed","description":"Metric to rank breakdown rows by, applied descending. Shared by the breakdowns whose rows have the full delivery, engagement, and latency block: tags, sending domains, categories, recipient domains, templates, and broadcasts. Any count or rate can be used. A row whose rate is undefined, because its denominator was zero, sorts last. A bounce sub-type is nested under `bounces` in each row, so its sort name reflects that, for example `bounces.hard` and `bounces.hard_rate`. `oob_bounces` is distinct from `bounced`: it counts out-of-band bounces, failure notifications that arrive after delivery was already confirmed.\n","enum":["processed","delivered","bounced","complained","deferred","rejected","oob_bounces","bounces.hard","bounces.soft","bounces.admin","bounces.block","bounces.undetermined","opens","opens_non_prefetched","unique_opens","unique_opens_non_prefetched","clicks","unique_clicks","unsubscribes","delivery_rate","bounce_rate","complaint_rate","open_rate","click_rate","unsubscribe_rate","bounces.hard_rate","bounces.soft_rate","bounces.admin_rate","bounces.block_rate","bounces.undetermined_rate"]},"EmailStatsPeriod":{"type":"object","additionalProperties":false,"description":"The date range this response was actually computed against. Echoed back so clients can render the period without tracking it themselves and so cached responses can be keyed by what was queried.\n","required":["from","to"],"properties":{"from":{"type":"string","format":"date","minLength":1,"readOnly":true,"description":"Inclusive start date the response covers (YYYY-MM-DD).","example":"2026-05-01"},"to":{"type":"string","format":"date","minLength":1,"readOnly":true,"description":"Inclusive end date the response covers (YYYY-MM-DD).","example":"2026-05-25"},"data_as_of":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"The best-effort refresh time of the statistics in this response; when they come from several rollups, it is the oldest of their latest refreshes. Events recorded before roughly this time are usually reflected, while more recent events may not be yet. Statistics are served from rolling aggregations that usually refresh within a minute, so a response can trail the latest events by a minute or more. Use this field to label data freshness (for example \"as of 14:03\") rather than assuming the numbers are up to the second. Null when the freshness boundary is not being reported.\n","example":"2026-05-25T14:03:10Z"}}},"IPPoolID":{"type":"string","minLength":1,"pattern":"^ipp_[0-9a-hjkmnp-tv-z]{26}$","example":"ipp_01krdgeqcxet5s7t44vh8rt9mg"},"EmailSendingIpDeliveryStats":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Delivery counts and rates for messages attributed to a single sending IP. Per-IP results omit `accepted` and `processed` counts. The sending IP becomes known only after a message is delivered, bounced, deferred, or bounced late. Those earlier lifecycle states cannot be attributed to a specific IP. Spam complaints and out-of-band bounce notifications also lack per-IP attribution on this breakdown. The `complained` and `oob_bounces` fields therefore read 0. Their rates read 0 when the denominator is non-zero and null when it is zero. The `effective_delivered` field equals `delivered`, and `all_bounces` equals `bounced`.\n","required":["delivered","bounced","complained","deferred","oob_bounces","effective_delivered","all_bounces","oob_rate","bounces","delivery_rate","bounce_rate","complaint_rate"],"properties":{"delivered":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients whose message the receiving mail server accepted.","example":8290},"bounced":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients whose delivery failed. This is approximately the sum of the five `bounces.*` sub-counts (hard, soft, admin, block, undetermined). The two are computed independently, so they can differ slightly.","example":131},"complained":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients who reported the message as spam. Complaints are not attributed to a sending IP, so this reads 0 on this breakdown. Read complaint counts from the summary or time-series statistics instead.","example":8},"deferred":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients in transient delivery deferral that is still being retried.","example":4},"oob_bounces":{"type":"integer","minimum":0,"readOnly":true,"description":"Out-of-band bounce events: failure notifications received after the receiving server had initially confirmed delivery. Not attributed to a sending IP on this breakdown, so this reads 0. Workspace-wide out-of-band counts are on the summary and time-series statistics.\n","example":3},"effective_delivered":{"type":"integer","minimum":0,"readOnly":true,"description":"Recipients on this IP who remain delivered after all bounce signals resolve, computed as `delivered - oob_bounces`. Clamped to 0 when `oob_bounces` exceeds `delivered`.","example":8287},"all_bounces":{"type":"integer","minimum":0,"readOnly":true,"description":"Total recipients on this IP who did not receive the message, computed as `bounced + oob_bounces`.","example":134},"oob_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Share of this IP's delivery attempts that resulted in an out-of-band bounce, computed as `oob_bounces / (delivered + bounced)`. Null when `delivered + bounced` is zero (no attempts).","example":0.00036},"bounces":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailBounceStatsWithRates"}]},"delivery_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Share of this IP's delivery attempts that remained delivered after all bounce signals, computed as `effective_delivered / (delivered + bounced)`. Null when `delivered + bounced` is zero.\n","example":0.9844},"bounce_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Share of this IP's delivery attempts that ultimately failed (inband or out-of-band), computed as `all_bounces / (delivered + bounced)`. Null when `delivered + bounced` is zero (no attempts).\n","example":0.0156},"complaint_rate":{"type":["number","null"],"minimum":0,"readOnly":true,"description":"Share of effectively delivered recipients on this IP who reported the message as spam, computed as `complained / effective_delivered`. Null when `effective_delivered` is zero.\n","example":0.00096}}},"EmailDeliveryLatencyStats":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Latency percentiles (p50, p95, p99) in milliseconds for the messages in this breakdown row, for breakdowns whose dimension is known only from delivery onward (sending IP, mailbox provider).\n\n- `delivery`: Time from handing the message off to the receiving mail server accepting it. Null when no deliveries occurred for this row in the period.\n- `total`: End-to-end time from accepting the send to delivery. Null when no deliveries occurred for this row in the period.\n\nThese breakdowns have no `processing` latency family. A message's row identifies which sending IP carried it or which mailbox provider received it. This becomes known only after the receiving mail server reports a delivery, bounce, deferral, or late bounce. The accept-to-processed phase ends before that attribution is known, preventing row-level processing latency. Use `GET /v1/email/stats/daily` for processing-latency percentiles across the whole workspace.\n","required":["delivery","total"],"properties":{"delivery":{"$ref":"#/components/schemas/EmailLatencyQuantiles"},"total":{"$ref":"#/components/schemas/EmailLatencyQuantiles"}}},"EmailStatsSeriesPoint":{"type":"object","additionalProperties":false,"readOnly":true,"description":"One point in a breakdown row's trend series: the headline delivery and engagement rates for that row's dimension value over a single day or hour. Returned only when `include_trend=true`. The bucket grain (day or hour) follows the `trend_grain` parameter. Counts and rates are approximate at scale.\n","required":["bucket","delivered","bounced","delivery_rate","bounce_rate","complaint_rate","open_rate","click_rate"],"properties":{"bucket":{"type":"string","minLength":1,"readOnly":true,"description":"The day (YYYY-MM-DD) or hour (ISO 8601, on the hour) this point covers, matching the requested `trend_grain`.","example":"2026-05-12"},"delivered":{"type":"integer","minimum":0,"readOnly":true,"description":"Delivered recipients in this bucket."},"bounced":{"type":"integer","minimum":0,"readOnly":true,"description":"Bounced recipients in this bucket."},"delivery_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Delivery rate for this bucket, as a fraction. Null when nothing was delivered or bounced."},"bounce_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Bounce rate for this bucket, as a fraction. Null when nothing was delivered or bounced."},"complaint_rate":{"type":["number","null"],"minimum":0,"readOnly":true,"description":"Complaint rate for this bucket, as a fraction. Event-time attribution can push it above 1 when complaints outrun the bucket's deliveries. Null when nothing was delivered in the bucket. On a sending-IP row complaints are not attributed to the IP, so this reads 0 in buckets that had deliveries and null in buckets that had none."},"open_rate":{"type":["number","null"],"minimum":0,"readOnly":true,"description":"Open rate for this bucket, as a fraction. Event-time attribution can push it above 1 when opens outrun the bucket's deliveries. Null when nothing was delivered in the bucket. On a sending-IP row engagement is not attributed to the IP, so this reads 0 in buckets that had deliveries and null in buckets that had none."},"click_rate":{"type":["number","null"],"minimum":0,"readOnly":true,"description":"Click rate for this bucket, as a fraction. Event-time attribution can push it above 1 when clicks outrun the bucket's deliveries. Null when nothing was delivered in the bucket. On a sending-IP row engagement is not attributed to the IP, so this reads 0 in buckets that had deliveries and null in buckets that had none."}}},"EmailTagStatsPoint":{"type":"object","additionalProperties":false,"description":"Aggregate delivery and engagement stats for a single tag name-and-value pair over the requested period.","required":["tag","delivery","engagement","latency"],"properties":{"tag":{"type":"string","minLength":1,"readOnly":true,"description":"The tag this row aggregates, formatted as `name:value` from the tag set at send time (for example `campaign:welcome-series`). Each distinct name-and-value pair is its own row.\n","example":"campaign:welcome-series"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailLatencyStats"}]},"trend":{"type":"array","readOnly":true,"description":"Per-bucket rate series for this tag over the window. Present only when `include_trend=true`.","items":{"$ref":"#/components/schemas/EmailStatsSeriesPoint"}}}},"EmailStatsTagsResponse":{"type":"object","additionalProperties":false,"description":"Per-tag breakdown for the requested period, ranked by the `sort` metric (default `processed`) descending and paginated with the requested `limit` (default 50, max 200).","required":["period","data","total","next_cursor","prev_cursor","refresh_cursor"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Tag breakdown rows, ranked by the `sort` metric (default `processed`) descending. Empty when no tagged sends occurred in the period.","items":{"$ref":"#/components/schemas/EmailTagStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct tags (name and value pairs) with activity in the period, regardless of `limit`. Pass `next_cursor` as `starting_after` to request the next page.\n","example":173},"next_cursor":{"type":["string","null"],"description":"Cursor for the next page. Pass back as `starting_after` to advance forward. `null` when no next page exists.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"},"prev_cursor":{"type":["string","null"],"description":"Cursor for the previous page. Pass back as `ending_before` to step backward. `null` when no previous page exists.","example":null},"refresh_cursor":{"type":["string","null"],"description":"Refresh anchor, the first row of this response. Pass back as `ending_before` to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-`null` whenever `data` is non-empty; `null` only on an empty page. Distinct from `prev_cursor`.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"}}},"EmailBroadcastID":{"type":"string","minLength":1,"pattern":"^eb_[0-9a-hjkmnp-tv-z]{26}$","example":"eb_01krdgeqcxet5s7t44vh8rt9mg"},"EmailTemplateID":{"type":"string","minLength":1,"pattern":"^emt_[0-9a-hjkmnp-tv-z]{26}$","example":"emt_01krdgeqcxet5s7t44vh8rt9mg"},"EmailMailboxProviderSortMetric":{"type":"string","default":"delivered","description":"Metric to rank rows by, applied descending. Shared by every breakdown whose attribution begins at delivery, so `processed`, `rejected`, and `oob_bounces` are not part of those rows and are not sortable. Any count or rate on the row can be used; rows whose rate is undefined (zero denominator) sort last. Bounce sub-types use their nested location in each row, for example `bounces.hard` and `bounces.hard_rate`.\n","enum":["delivered","bounced","complained","deferred","bounces.hard","bounces.soft","bounces.admin","bounces.block","bounces.undetermined","opens","opens_non_prefetched","unique_opens","unique_opens_non_prefetched","clicks","unique_clicks","unsubscribes","delivery_rate","bounce_rate","complaint_rate","open_rate","click_rate","unsubscribe_rate","bounces.hard_rate","bounces.soft_rate","bounces.admin_rate","bounces.block_rate","bounces.undetermined_rate"]},"EmailMailboxProviderDeliveryStats":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Delivery counts and rates for messages attributed to a single recipient mailbox provider. Per-provider results do not include `accepted` or `processed` counts, because we only learn the recipient's mailbox provider once the receiving mail server reports delivery, a bounce, a deferral, or a late bounce. Earlier lifecycle states (accepted, processed) cannot be attributed to a specific provider.\n","required":["delivered","bounced","complained","deferred","bounces","delivery_rate","bounce_rate","complaint_rate"],"properties":{"delivered":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients whose message the receiving mail server accepted.","example":8290},"bounced":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients whose delivery failed. Approximately the sum of the five `bounces.*` sub-counts (hard, soft, admin, block, undetermined); the totals are computed independently so they may differ slightly at the approximation error.","example":131},"complained":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients who reported the message as spam.","example":8},"deferred":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients in transient delivery deferral that is still being retried.","example":4},"bounces":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailBounceStatsWithRates"}]},"delivery_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Share of attempted recipients on this mailbox provider that were delivered, computed as `delivered / (delivered + bounced)`. Null when `delivered + bounced` is zero (no attempts).\n","example":0.9844},"bounce_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Share of attempted recipients on this mailbox provider that bounced, computed as `bounced / (delivered + bounced)`. Null when `delivered + bounced` is zero (no attempts).\n","example":0.0156},"complaint_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Share of delivered recipients on this mailbox provider who reported the message as spam, computed as `complained / delivered`. Null when `delivered` is zero.\n","example":0.00096}}},"EmailMailboxProviderStatsPoint":{"type":"object","additionalProperties":false,"description":"Delivery, engagement, and deliverability stats for messages grouped by a single recipient mailbox provider (`gmail`, `microsoft`, `yahoo`, `apple`, ...) over the requested period. We learn a recipient's mailbox provider from the receiving mail server. Per-provider rows therefore cover the delivery stage onward. They omit the `accepted` and `processed` counts and the `processing` latency family. These fields are absent rather than null. Engagement (opens and clicks, and their rates) is included because those events happen after delivery, once the mailbox provider is already known.\n","required":["mailbox_provider","delivery","engagement","latency"],"properties":{"mailbox_provider":{"type":"string","minLength":1,"readOnly":true,"description":"The recipient mailbox provider this row aggregates, as a lowercase classifier such as `gmail`, `yahoo`, `microsoft`, or `apple`. New classifiers may be added over time.","example":"gmail"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailMailboxProviderDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailDeliveryLatencyStats"}]},"trend":{"type":"array","readOnly":true,"description":"Per-bucket rate series for this mailbox provider over the window. Present only when `include_trend=true`.","items":{"$ref":"#/components/schemas/EmailStatsSeriesPoint"}}}},"EmailStatsByMailboxProviderResponse":{"type":"object","additionalProperties":false,"description":"Per-mailbox-provider breakdown for the requested period, ranked by the `sort` metric (default `delivered`) descending and paginated with the requested `limit` (default 50, max 200).","required":["period","data","total","next_cursor","prev_cursor","refresh_cursor"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Mailbox-provider breakdown rows, ranked by the `sort` metric (default `delivered`) descending. Empty when no eligible activity occurred in the period.","items":{"$ref":"#/components/schemas/EmailMailboxProviderStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct mailbox providers with activity in the period, regardless of `limit`. Pass `next_cursor` as `starting_after` to request the next page.\n","example":14},"next_cursor":{"type":["string","null"],"description":"Cursor for the next page. Pass back as `starting_after` to advance forward. `null` when no next page exists.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"},"prev_cursor":{"type":["string","null"],"description":"Cursor for the previous page. Pass back as `ending_before` to step backward. `null` when no previous page exists.","example":null},"refresh_cursor":{"type":["string","null"],"description":"Refresh anchor, the first row of this response. Pass back as `ending_before` to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-`null` whenever `data` is non-empty; `null` only on an empty page. Distinct from `prev_cursor`.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"}}},"EmailRecipientDomainStatsPoint":{"type":"object","additionalProperties":false,"description":"Aggregate delivery, engagement, and latency stats for messages sent to a single recipient mailbox domain over the requested period.","required":["recipient_domain","delivery","engagement","latency"],"properties":{"recipient_domain":{"type":"string","minLength":1,"readOnly":true,"description":"The recipient mailbox domain this row aggregates (the part of the recipient address after the `@`), normalized to lowercase.","example":"gmail.com"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailLatencyStats"}]},"trend":{"type":"array","readOnly":true,"description":"Per-bucket rate series for this recipient domain over the window. Present only when `include_trend=true`.","items":{"$ref":"#/components/schemas/EmailStatsSeriesPoint"}}}},"EmailStatsByRecipientDomainResponse":{"type":"object","additionalProperties":false,"description":"Per-recipient-domain breakdown for the requested period, ranked by the `sort` metric (default `processed`) descending and paginated with the requested `limit` (default 50, max 200).","required":["period","data","total","next_cursor","prev_cursor","refresh_cursor"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Recipient-domain breakdown rows, ranked by the `sort` metric (default `processed`) descending. Empty when no eligible activity occurred in the period.","items":{"$ref":"#/components/schemas/EmailRecipientDomainStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct recipient domains with activity in the period, regardless of `limit`. Pass `next_cursor` as `starting_after` to request the next page.\n","example":412},"next_cursor":{"type":["string","null"],"description":"Cursor for the next page. Pass back as `starting_after` to advance forward. `null` when no next page exists.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"},"prev_cursor":{"type":["string","null"],"description":"Cursor for the previous page. Pass back as `ending_before` to step backward. `null` when no previous page exists.","example":null},"refresh_cursor":{"type":["string","null"],"description":"Refresh anchor, the first row of this response. Pass back as `ending_before` to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-`null` whenever `data` is non-empty; `null` only on an empty page. Distinct from `prev_cursor`.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"}}},"EmailBounceStats":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Breakdown of `bounced` by failure type. Each field counts distinct bounced recipients of that type in this row's scope; the five types approximately partition `bounced`.\n","required":["hard","soft","admin","block","undetermined"],"properties":{"hard":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients with a permanent delivery failure (invalid address or non-existent domain). The address is automatically added to the suppression list.\n","example":42},"soft":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients with a transient delivery failure (mailbox full or server temporarily unavailable). Delivery was retried.\n","example":48},"admin":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients refused by a policy at the receiving end, such as relaying denied or a blocklisted domain. Fix these by changing your content or sender configuration. Cleaning the recipient list does not usually help.\n","example":4},"block":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients bounced because the receiving mail server blocked the sending IP for reputation reasons (mail block, spam block, spam content). Triage usually focuses on IP reputation and sending volume.\n","example":6},"undetermined":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients bounced where the receiving server's response did not allow precise classification.\n","example":1}}},"EmailBounceCodeStatsPoint":{"type":"object","additionalProperties":false,"description":"Bounce counts for a single SMTP status code over the requested period, with the per-type breakdown. This is a deliverability-debugging view keyed on what the receiving mail server returned, so it only reports the failure side: bounced recipients, and their `hard`, `soft`, `admin`, `block`, and `undetermined` split. It has no delivered, open, or rate fields.\n","required":["smtp_error_code","bounced","bounces"],"properties":{"smtp_error_code":{"type":"string","minLength":1,"readOnly":true,"description":"The SMTP error code the receiving mail server returned for these bounces, as reported by that server (for example `5.1.1` for an unknown recipient, `4.2.2` for a full mailbox). The form varies by server, and the set of codes is open.","example":"5.1.1"},"bounced":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients whose delivery failed with this SMTP status code, approximately equal to the sum of the five `bounces.*` sub-counts. The two are computed independently, so they can differ slightly because of approximation.","example":1240},"bounces":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailBounceStats"}]}}},"EmailStatsByBounceCodeResponse":{"type":"object","additionalProperties":false,"description":"Per-SMTP-code bounce breakdown for the requested period, ranked by the `sort` metric (default `bounced`) descending and paginated with the requested `limit` (default 50, max 200).","required":["period","data","total","next_cursor","prev_cursor","refresh_cursor"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Bounce-code breakdown rows, ranked by the `sort` metric (default `bounced`) descending. Empty when no bounces occurred in the period.","items":{"$ref":"#/components/schemas/EmailBounceCodeStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct SMTP error codes with activity in the period, regardless of `limit`. Pass `next_cursor` as `starting_after` to request the next page.\n","example":17},"next_cursor":{"type":["string","null"],"description":"Cursor for the next page. Pass back as `starting_after` to advance forward. `null` when no next page exists.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"},"prev_cursor":{"type":["string","null"],"description":"Cursor for the previous page. Pass back as `ending_before` to step backward. `null` when no previous page exists.","example":null},"refresh_cursor":{"type":["string","null"],"description":"Refresh anchor, the first row of this response. Pass back as `ending_before` to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-`null` whenever `data` is non-empty; `null` only on an empty page. Distinct from `prev_cursor`.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"}}},"EmailComplaintTypeStatsPoint":{"type":"object","additionalProperties":false,"description":"Complaint counts for a single feedback-loop complaint type over the requested period. A complaint type is recorded only on spam-complaint events, so this breakdown reports the complained count for each type and nothing else. A complaint event has no delivery or engagement information attached to it, so no other count applies.\n","required":["feedback_type","complained"],"properties":{"feedback_type":{"type":"string","minLength":1,"readOnly":true,"description":"The complaint classification reported by the mailbox provider's feedback loop, in the abuse-reporting-format vocabulary (for example `abuse`, `fraud`, `virus`, `other`). The set is open.","example":"abuse"},"complained":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients who reported a message as spam with this complaint type at any point in the period.","example":47}}},"EmailStatsByComplaintTypeResponse":{"type":"object","additionalProperties":false,"description":"Per-complaint-type breakdown for the requested period, ranked by `complained` descending and paginated with the requested `limit` (default 50, max 200).","required":["period","data","total","next_cursor","prev_cursor","refresh_cursor"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Complaint-type breakdown rows, ranked by `complained` descending. Empty when no complaints occurred in the period.","items":{"$ref":"#/components/schemas/EmailComplaintTypeStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct feedback types with activity in the period, regardless of `limit`. Pass `next_cursor` as `starting_after` to request the next page.\n","example":4},"next_cursor":{"type":["string","null"],"description":"Cursor for the next page. Pass back as `starting_after` to advance forward. `null` when no next page exists.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"},"prev_cursor":{"type":["string","null"],"description":"Cursor for the previous page. Pass back as `ending_before` to step backward. `null` when no previous page exists.","example":null},"refresh_cursor":{"type":["string","null"],"description":"Refresh anchor, the first row of this response. Pass back as `ending_before` to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-`null` whenever `data` is non-empty; `null` only on an empty page. Distinct from `prev_cursor`.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"}}},"SMSContentType":{"type":"string","enum":["sms","mms"],"description":"Message content type. A nonempty subject or media list selects MMS."},"SMSStatsSummaryPeriod":{"type":"object","additionalProperties":false,"description":"The window the server actually computed against. The summary serves two window grains: calendar days (bounds are YYYY-MM-DD) and hours (bounds are RFC 3339 instants on the hour). The grain of `from` and `to` mirrors the grain of the request's bounds.\n","required":["from","to"],"properties":{"from":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive start of the window, as a calendar day (`YYYY-MM-DD`) or an RFC 3339 hour boundary.","example":"2026-05-01"},"to":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive end of the window, as a calendar day (`YYYY-MM-DD`) or an RFC 3339 hour boundary.","example":"2026-05-25"},"data_as_of":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"Latest time reflected in the statistics. More recent events might not be included yet. Null when the freshness boundary is unavailable.\n","example":"2026-05-25T14:03:10Z"}}},"SMSDeliveryStats":{"type":"object","additionalProperties":false,"readOnly":true,"description":"SMS lifecycle counts and rates for a whole period or breakdown. Counts use the message send time, so a later delivery stays attributed to the bucket in which the message was sent. Rates are null when their denominator is zero.\n","required":["accepted","sent","delivered","undelivered","failed","rejected","expired","delivery_rate","failure_rate"],"properties":{"accepted":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages accepted for sending after admission checks. This is the denominator for `delivery_rate` and `failure_rate`.","example":14820},"sent":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages handed off to the carrier for delivery.","example":14810},"delivered":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages the carrier confirmed as delivered to the handset.","example":14720},"undelivered":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages the carrier reported as not delivered.","example":60},"failed":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages that failed during sending.","example":25},"rejected":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages rejected before any send attempt, for example by sending policy or a message-generation failure.","example":10},"expired":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages that could not be delivered within their validity window and expired.","example":5},"delivery_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Share of accepted messages that were delivered, computed as `delivered / accepted`. Null when no messages were accepted in scope.\n","example":0.9932},"failure_rate":{"type":["number","null"],"minimum":0,"readOnly":true,"description":"Share of accepted messages that ultimately failed, computed as `(undelivered + failed + expired) / accepted`. Null when no messages were accepted in scope.\n","example":0.0061}}},"SMSLatencyQuantiles":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Approximate p50, p95, and p99 latency percentiles in milliseconds for one latency family. All three are null when no qualifying event contributed a measurement.\n","required":["p50_ms","p95_ms","p99_ms"],"properties":{"p50_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.","example":420},"p95_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.","example":1820},"p99_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.","example":4920}}},"SMSLatencyStats":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Latency percentiles in milliseconds for the requested scope:\n\n- `processing`: From acceptance to carrier handoff.\n- `delivery`: From carrier handoff to delivery confirmation.\n- `total`: From acceptance to delivery confirmation.\n\nEach family is omitted when no qualifying event contributes a measurement.\nIndividual percentiles can also be null.\n","properties":{"processing":{"$ref":"#/components/schemas/SMSLatencyQuantiles"},"delivery":{"$ref":"#/components/schemas/SMSLatencyQuantiles"},"total":{"$ref":"#/components/schemas/SMSLatencyQuantiles"}}},"SMSStatsComparisonDelta":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Changes from the previous period. A `*_pct_change` value is the signed relative change `(current - previous) / previous` and is null when the previous count is zero. A `*_rate_pp` value is the signed difference between rate fractions and is null when either rate is undefined.\n","required":["accepted_pct_change","sent_pct_change","delivered_pct_change","undelivered_pct_change","failed_pct_change","rejected_pct_change","expired_pct_change","delivery_rate_pp","failure_rate_pp"],"properties":{"accepted_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in accepted messages (`delivery.accepted`) versus the previous period, as a signed fraction. Null when the previous period accepted none.","example":0.508},"sent_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in sent messages (`delivery.sent`) versus the previous period, as a signed fraction. Null when the previous period had none.","example":0.121},"delivered_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in delivered messages (`delivery.delivered`) versus the previous period, as a signed fraction. Null when the previous period delivered none.","example":0.122},"undelivered_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in undelivered messages (`delivery.undelivered`) versus the previous period, as a signed fraction. Null when the previous period had none.","example":-0.031},"failed_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in failed messages (`delivery.failed`) versus the previous period, as a signed fraction. Null when the previous period had none.","example":-0.018},"rejected_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in rejected messages (`delivery.rejected`) versus the previous period, as a signed fraction. Null when the previous period had none.","example":0},"expired_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in expired messages (`delivery.expired`) versus the previous period, as a signed fraction. Null when the previous period had none.","example":0.04},"delivery_rate_pp":{"type":["number","null"],"minimum":-1,"maximum":1,"readOnly":true,"description":"Signed difference between this period's and the previous period's delivery rate, both fractions in [0,1] (multiply by 100 for percentage points). Null when either period's delivery rate is undefined.","example":0.004},"failure_rate_pp":{"type":["number","null"],"readOnly":true,"description":"Signed difference between the current and previous failure-rate fractions. Multiply by 100 for percentage points. The value can fall outside `[-1, 1]` because a message can contribute to more than one failure outcome and high-volume counts are approximate. Null when either rate is undefined.\n","example":-0.0008}}},"SMSStatsComparison":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The same statistics for the equal-length, inclusive period ending immediately before the requested start, together with the change between the two periods. Present only when `compare=previous_period` is requested. The change is already computed, so a percentage difference needs no second request.\n","required":["period","delivery","latency","delta"],"properties":{"period":{"$ref":"#/components/schemas/SMSStatsSummaryPeriod","description":"Equal-length window ending immediately before the requested start."},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSDeliveryStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSLatencyStats"}]},"delta":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSStatsComparisonDelta"}]}}},"SMSStatsSummary":{"type":"object","additionalProperties":false,"description":"Single-row aggregate across the full requested period, covering SMS lifecycle counts plus the derived delivery and failure rates, and latency percentiles. Use this endpoint for KPI tiles and reporting; the daily and hourly endpoints carry the same counts per bucket.\n\nEvery count is a sum of per-bucket counts across the window. Latency percentiles are computed across the whole period rather than summed per bucket. Rates are null when their denominator is zero.\n","required":["period","delivery","latency"],"properties":{"period":{"$ref":"#/components/schemas/SMSStatsSummaryPeriod","description":"The window the response covers (echoed back from the request, day or hour grain), plus `data_as_of`, the freshness boundary the data is current to."},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSDeliveryStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSLatencyStats"}]},"comparison":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSStatsComparison"}]}}},"SMSDeliveryCounts":{"type":"object","additionalProperties":false,"readOnly":true,"description":"SMS lifecycle counts for a time bucket. Counts use the message send time, so a message accepted on Monday and delivered on Tuesday counts in Monday's bucket. Rates are available only for whole periods and breakdowns.\n","required":["accepted","sent","delivered","undelivered","failed","rejected","expired"],"properties":{"accepted":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages accepted for sending after admission checks.","example":14820},"sent":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages handed off to the carrier for delivery.","example":14810},"delivered":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages the carrier confirmed as delivered to the handset.","example":14720},"undelivered":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages the carrier reported as not delivered.","example":60},"failed":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages that failed during sending.","example":25},"rejected":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages rejected before any send attempt, for example by sending policy or a message-generation failure.","example":10},"expired":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages that could not be delivered within their validity window and expired.","example":5}}},"SMSStatsPoint":{"type":"object","additionalProperties":false,"readOnly":true,"description":"SMS lifecycle counts for one time bucket (a calendar day or hour), bucketed by send time. Every count in a bucket describes the messages accepted in it, regardless of when their later events arrived. Per-bucket values include counts only. The summary and breakdown endpoints report rates and latency as whole-window aggregates.\n","required":["bucket","delivery"],"properties":{"bucket":{"type":"string","minLength":1,"readOnly":true,"description":"The day (YYYY-MM-DD) or hour (RFC 3339, on the hour) this point covers, matching the period's grain.","example":"2026-05-25"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSDeliveryCounts"}]}}},"SMSStatsSortMetric":{"type":"string","default":"accepted","description":"Metric to rank breakdown rows by, applied descending. Shared by the volume breakdowns whose rows carry the full delivery and latency block (originators, countries, categories, carriers). Any lifecycle count or derived rate may be used; rows whose rate is undefined (zero denominator) sort last.\n","enum":["accepted","sent","delivered","undelivered","failed","rejected","expired","delivery_rate","failure_rate"]},"SMSCountryStatsPoint":{"type":"object","additionalProperties":false,"description":"Aggregate delivery and latency stats for a single destination country over the requested period.","required":["country","delivery","latency"],"properties":{"country":{"type":"string","minLength":1,"readOnly":true,"description":"The destination country this row aggregates, as an ISO 3166-1 alpha-2 code.","example":"US"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSDeliveryStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSLatencyStats"}]},"trend":{"type":"array","readOnly":true,"description":"Per-bucket lifecycle counts for this country, using `trend_grain`. Includes only buckets with activity. Present when `include_trend=true`.","items":{"$ref":"#/components/schemas/SMSStatsPoint"}}}},"SMSStatsByCountryResponse":{"type":"object","additionalProperties":false,"description":"Per-country breakdown for the requested period, ranked by the `sort` metric (default `accepted`) descending and capped at the requested `limit` (default 50, max 200).","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/SMSStatsSummaryPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Country breakdown rows, ranked by the `sort` metric (default `accepted`) descending. Empty when no messages were sent in the period.","items":{"$ref":"#/components/schemas/SMSCountryStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct destination countries with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.\n","example":42}}},"SMSCarrierStatsPoint":{"type":"object","additionalProperties":false,"description":"Aggregate delivery and latency stats for a single delivery carrier over the requested period.","required":["carrier","delivery","latency"],"properties":{"carrier":{"type":"string","minLength":1,"readOnly":true,"description":"The delivery carrier this row aggregates, as resolved for the destination handset.","example":"Verizon"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSDeliveryStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSLatencyStats"}]},"trend":{"type":"array","readOnly":true,"description":"Per-bucket lifecycle counts for this carrier, using `trend_grain`. Includes only buckets with activity. Present when `include_trend=true`.","items":{"$ref":"#/components/schemas/SMSStatsPoint"}}}},"SMSStatsByCarrierResponse":{"type":"object","additionalProperties":false,"description":"Per-carrier breakdown for the requested period, ranked by the `sort` metric (default `accepted`) descending and capped at the requested `limit` (default 50, max 200).","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/SMSStatsSummaryPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Carrier breakdown rows, ranked by the `sort` metric (default `accepted`) descending. Empty when no messages were sent in the period.","items":{"$ref":"#/components/schemas/SMSCarrierStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct carriers with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.\n","example":24}}},"SMSCategoryStatsPoint":{"type":"object","additionalProperties":false,"description":"Aggregate delivery and latency stats for a single message category over the requested period.","required":["category","delivery","latency"],"properties":{"category":{"type":"string","minLength":1,"readOnly":true,"description":"The category this row aggregates, as set at send time. `transactional` is one-to-one messaging triggered by a user action; `marketing` is bulk sending. New categories may be added over time.","example":"transactional"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSDeliveryStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSLatencyStats"}]},"trend":{"type":"array","readOnly":true,"description":"Per-bucket lifecycle counts for this category, using `trend_grain`. Includes only buckets with activity. Present when `include_trend=true`.","items":{"$ref":"#/components/schemas/SMSStatsPoint"}}}},"SMSStatsByCategoryResponse":{"type":"object","additionalProperties":false,"description":"Per-category breakdown for the requested period, ranked by the `sort` metric (default `accepted`) descending and capped at the requested `limit` (default 50, max 200).","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/SMSStatsSummaryPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Category breakdown rows, ranked by the `sort` metric (default `accepted`) descending. Empty when no messages were sent in the period.","items":{"$ref":"#/components/schemas/SMSCategoryStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct categories with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.\n","example":8}}},"SMSContentTypeStatsPoint":{"type":"object","additionalProperties":false,"description":"Aggregate delivery and latency stats for a single message type over the requested period.","required":["content_type","delivery","latency"],"properties":{"content_type":{"readOnly":true,"description":"Message type used for reporting. Previously recorded statistics remain attributed to SMS. New activity uses the message type.","allOf":[{"$ref":"#/components/schemas/SMSContentType"}]},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSDeliveryStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSLatencyStats"}]},"trend":{"type":"array","readOnly":true,"description":"Per-bucket lifecycle counts for this message type, using `trend_grain`. Includes only buckets with activity. Present when `include_trend=true`.","items":{"$ref":"#/components/schemas/SMSStatsPoint"}}}},"SMSStatsByContentTypeResponse":{"type":"object","additionalProperties":false,"description":"Per-message-type breakdown for the requested period, ranked by the `sort` metric (default `accepted`) descending and capped at the requested `limit` (default 50, max 200).","required":["period","data","total"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/SMSStatsSummaryPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Message-type breakdown rows, ranked by the `sort` metric (default `accepted`) descending. Empty when no messages were sent in the period.","items":{"$ref":"#/components/schemas/SMSContentTypeStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct message types with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.\n","example":2}}},"SMSTagStatsPoint":{"type":"object","additionalProperties":false,"description":"Aggregate delivery and latency stats for a single tag (`name:value`) over the requested period.","required":["tag","delivery","latency"],"properties":{"tag":{"type":"string","minLength":1,"readOnly":true,"description":"The tag this row aggregates, in `name:value` form. Each distinct name-and-value pair is its own row, and a message carrying several tags is counted once under each of them, so rows do not sum to the period total.\n","example":"campaign:summer_sale"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSDeliveryStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSLatencyStats"}]},"trend":{"type":"array","readOnly":true,"description":"Per-bucket lifecycle-count series for this tag over the window, bucketed by `trend_grain`. Sparse, so only buckets with activity are present rather than zero-filled, unlike the daily and hourly series. Present only when `include_trend=true`.\n","items":{"$ref":"#/components/schemas/SMSStatsPoint"}}}},"SMSStatsByTagResponse":{"type":"object","additionalProperties":false,"description":"Per-tag breakdown for the requested period, ranked by the `sort` metric (default `accepted`) descending and capped at the requested `limit` (default 50, max 200).","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/SMSStatsSummaryPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Tag breakdown rows, ranked by the `sort` metric (default `accepted`) descending. Empty when no tagged messages were sent in the period.","items":{"$ref":"#/components/schemas/SMSTagStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct tags with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.\n","example":18}}},"SMSStatsLifecycleSortMetric":{"type":"string","default":"failed","description":"Metric to rank breakdown rows by, applied descending. Shared by the breakdowns whose rows carry lifecycle counts only, with no derived rates to sort on.\n","enum":["accepted","sent","delivered","undelivered","failed","rejected","expired"]},"SMSErrorCode":{"type":"string","minLength":1,"x-extensible-enum":["invalid_destination","unreachable","blocked_by_carrier","blocked_by_fraud_protection","blocked_by_recipient","landline_unreachable","content_rejected","sender_unregistered","recipient_opted_out","provider_unavailable","insufficient_balance","workspace_suspended","unknown"],"description":"Standardized failure reason:\n\n- `invalid_destination`: The number is unassigned, ported out, or malformed.\n- `unreachable`: The handset is off or outside coverage.\n- `blocked_by_carrier`: The carrier filtered the message.\n- `blocked_by_fraud_protection`: Bird fraud protection blocked suspected SMS pumping.\n- `blocked_by_recipient`: The recipient device blocked the sender.\n- `landline_unreachable`: The destination is a landline that does not accept SMS.\n- `content_rejected`: The carrier rejected the content.\n- `sender_unregistered`: The sender is not registered for the destination.\n- `recipient_opted_out`: The recipient is on a suppression list.\n- `provider_unavailable`: The provider remained unavailable after retries.\n- `insufficient_balance`: The workspace wallet could not fund the send.\n- `workspace_suspended`: The workspace is suspended, so Bird stopped this message and will not send it after reactivation. In rare cases an earlier attempt that Bird could not confirm may still have been delivered. A message refused after it was charged keeps its charge. Contact Bird support to reactivate the workspace.\n- `unknown`: The failure could not be classified.\n\nThis is an open enum. Accept unrecognized values.\n"},"SMSErrorCodeStatsPoint":{"type":"object","additionalProperties":false,"description":"Delivery and latency statistics for one standardized failure reason over the requested period.","required":["error_code","delivery","latency"],"properties":{"error_code":{"readOnly":true,"description":"Standardized failure reason this row aggregates. Matches the `error_code` message-list filter.","allOf":[{"$ref":"#/components/schemas/SMSErrorCode"}]},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSDeliveryStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSLatencyStats"}]},"trend":{"type":"array","readOnly":true,"description":"Per-bucket lifecycle counts for this error code, using `trend_grain`. Includes only buckets with activity. Present when `include_trend=true`.","items":{"$ref":"#/components/schemas/SMSStatsPoint"}}}},"SMSStatsByErrorCodeResponse":{"type":"object","additionalProperties":false,"description":"Per-error-code breakdown for the requested period, ranked by the `sort` metric (default `failed`) descending and capped at the requested `limit` (default 50, max 200).","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/SMSStatsSummaryPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Error-code breakdown rows, ranked by the `sort` metric (default `failed`) descending. Empty when no delivery failures occurred in the period.","items":{"$ref":"#/components/schemas/SMSErrorCodeStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct error codes with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.\n","example":17}}},"SMSInboundStatsComparisonDelta":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The change from the preceding period to the requested one. The `received_pct_change` field is a signed relative change, computed as `(current - previous) / previous`. A value of `0.5` means 50% higher, and `-0.2` means 20% lower. The field is null when the previous period received none.\n","required":["received_pct_change"],"properties":{"received_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in received messages versus the previous period, as a signed fraction. Null when the previous period received none.","example":0.058}}},"SMSInboundStatsComparison":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The received-message count for the equal-length, inclusive period ending immediately before the requested start, together with the change between the two periods. Present only when `compare=previous_period` is requested. The change is already computed, so a percentage difference needs no second request.\n","required":["period","received","delta"],"properties":{"period":{"$ref":"#/components/schemas/SMSStatsSummaryPeriod","description":"Equal-length window ending immediately before the requested start."},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages received in the preceding period.","example":3980},"delta":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSInboundStatsComparisonDelta"}]}}},"SMSInboundStatsSummaryResponse":{"type":"object","additionalProperties":false,"description":"Total received messages over the requested period.\n","required":["period","received"],"properties":{"period":{"$ref":"#/components/schemas/SMSStatsSummaryPeriod"},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages received in the period, counted by the time the carrier received them.","example":4210},"comparison":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSInboundStatsComparison"}]}}},"SMSInboundStatsPoint":{"type":"object","additionalProperties":false,"readOnly":true,"description":"One time bucket of received-message counts, attributed by arrival time.","required":["bucket","received"],"properties":{"bucket":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Start of the bucket this row covers, as a calendar day (YYYY-MM-DD) for the daily series or an hour boundary (RFC 3339) for the hourly one.","example":"2026-05-01"},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages received in this bucket, counted by the time the carrier received them.","example":128}}},"SMSInboundCountryStatsPoint":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Received-message volume for one country.\n","required":["country","received"],"properties":{"country":{"type":"string","minLength":1,"readOnly":true,"description":"The country of the Bird number the messages arrived on, as an ISO 3166-1 alpha-2 code. This identifies where the message was received. It does not identify the sender's country.","example":"US"},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages received on numbers in this country during the period.","example":1840}}},"SMSInboundStatsByCountryResponse":{"type":"object","additionalProperties":false,"description":"Received-message volume broken down by country, ranked by volume.\n","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/SMSStatsSummaryPeriod"},"data":{"type":"array","readOnly":true,"description":"One row per country with activity in the period, most messages first, capped at the requested `limit`. A country with no messages in the period is absent rather than zero-filled, because unlike a time bucket it is not part of a continuous axis.\n","items":{"$ref":"#/components/schemas/SMSInboundCountryStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct countries the messages arrived in with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.","example":12}}},"SMSInboundContentTypeStatsPoint":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Received-message volume for one message type.\n","required":["content_type","received"],"properties":{"content_type":{"readOnly":true,"description":"Message type used for reporting. Previously recorded statistics remain attributed to SMS. New activity uses the message type.","allOf":[{"$ref":"#/components/schemas/SMSContentType"}]},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages received on numbers in this message type during the period.","example":1840}}},"SMSInboundStatsByContentTypeResponse":{"type":"object","additionalProperties":false,"description":"Received-message volume broken down by message type, ranked by volume.\n","required":["period","data","total"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/SMSStatsSummaryPeriod"},"data":{"type":"array","readOnly":true,"description":"One row per message type with activity in the period, most messages first, capped at the requested `limit`. A message type with no messages in the period is absent rather than zero-filled, because unlike a time bucket it is not part of a continuous axis.\n","items":{"$ref":"#/components/schemas/SMSInboundContentTypeStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct message types with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.","example":2}}},"SMSInboundOperatorStatsPoint":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Received-message volume for one mobile operator.\n","required":["mcc_mnc","received"],"properties":{"mcc_mnc":{"type":"string","minLength":1,"readOnly":true,"description":"Mobile country code and mobile network code of the network the sending subscriber is on. The breakdown keys on this rather than on an operator name because the carrier reports a name only where a surcharge applies, which would leave most of the world in one unnamed bucket.","example":"311480"},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages received from senders on this operator during the period.","example":640}}},"SMSInboundStatsByOperatorResponse":{"type":"object","additionalProperties":false,"description":"Received-message volume broken down by operator, ranked by volume.\n","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/SMSStatsSummaryPeriod"},"data":{"type":"array","readOnly":true,"description":"One row per operator with activity in the period, most messages first, capped at the requested `limit`. An operator with no messages in the period is absent rather than zero-filled, because unlike a time bucket it is not part of a continuous axis.\n","items":{"$ref":"#/components/schemas/SMSInboundOperatorStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct sending operators with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.","example":38}}},"WhatsAppStatsMessageCategory":{"type":"string","minLength":1,"x-extensible-enum":["authentication","utility","marketing","service"],"description":"The category a message was sent under: its template's category when it was sent, or `service` for a free-form message. Meta can bill a message under a different pricing category.\n\n- `authentication`: a template that delivers one-time passcodes.\n- `utility`: a template that delivers transaction-triggered updates, such as receipts or order status.\n- `marketing`: a template that carries promotional content.\n- `service`: a free-form message, sent without a template inside the customer service window.\n"},"WhatsAppStatsSummaryPeriod":{"type":"object","additionalProperties":false,"description":"The window the server actually computed against. The summary serves two window grains: calendar days (bounds are YYYY-MM-DD) and hours (bounds are RFC 3339 instants on the hour). The grain of `from` and `to` mirrors the grain of the request's bounds.\n","required":["from","to"],"properties":{"from":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive start of the window, as a calendar day (`YYYY-MM-DD`) or an RFC 3339 hour boundary.","example":"2026-05-01"},"to":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive end of the window, as a calendar day (`YYYY-MM-DD`) or an RFC 3339 hour boundary.","example":"2026-05-25"},"data_as_of":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"Latest time reflected in the statistics. More recent events might not be included yet. Null when the freshness boundary is unavailable.\n","example":"2026-05-25T14:03:10Z"}}},"WhatsAppDeliveryStats":{"type":"object","additionalProperties":false,"readOnly":true,"description":"WhatsApp lifecycle counts and rates for the requested period, attributed by send time, so a later delivery stays attributed to the period in which its message was accepted, and a recent period under-reports `delivered` while delivery reports are still arriving. The sibling `engagement` block reports read counts and rates. Rates are null when their denominator is zero. Very large counts are close estimates rather than exact tallies.\n","required":["accepted","sent","delivered","failed","rejected","delivery_rate","failure_rate"],"properties":{"accepted":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages accepted for sending after admission checks. This is the denominator for `delivery_rate` and `failure_rate`.","example":4820},"sent":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages handed off for delivery.","example":4810},"delivered":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages confirmed delivered to the recipient's device.","example":4720},"failed":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages that failed during sending or delivery.","example":25},"rejected":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages rejected before any send attempt, because the recipient is on the workspace's suppression list, no reachable recipient was given, the destination has no price, the wallet could not fund the send, or the workspace is suspended. Rejected messages are never charged and are not counted in `accepted`, so the total addressed is `accepted + rejected`. Excluded from `failure_rate`, which covers send failures only.","example":412},"delivery_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Share of accepted messages that were delivered, computed as `delivered / accepted`. Null when no messages were accepted in scope.\n","example":0.9793},"failure_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Share of accepted messages that ultimately failed, computed as `failed / accepted`. Null when no messages were accepted in scope.\n","example":0.0052}}},"WhatsAppEngagementStats":{"type":"object","additionalProperties":false,"readOnly":true,"description":"WhatsApp engagement counts and the derived read rate for the scope of the containing row (the whole requested period or a breakdown dimension). The `read` field is the number of distinct messages confirmed read by the recipient. Send time determines attribution; the instant the read receipt arrived does not. A read is counted in the period its message was accepted in, alongside that message's own delivery when one arrived. The read rate divides reads by messages delivered in the same scope and is null when its denominator is zero. Very large counts are close estimates rather than exact tallies.\n","required":["read","read_rate"],"properties":{"read":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages confirmed read by the recipient.","example":3105},"read_rate":{"type":["number","null"],"minimum":0,"readOnly":true,"description":"Distinct messages read relative to messages delivered in the same scope, computed as `read / delivery.delivered`. Both counts are attributed by send time, so a read is counted alongside its own message's delivery. The rate can exceed 1 where a read receipt arrived for a message whose delivery receipt did not, or, at high volume, because the counts are close estimates. Null when `delivery.delivered` is zero.\n","example":0.6578}}},"WhatsAppLatencyQuantiles":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Approximate p50, p95, and p99 latency percentiles in milliseconds for one latency family. All three are null when no qualifying event contributed a measurement.\n","required":["p50_ms","p95_ms","p99_ms"],"properties":{"p50_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.","example":610},"p95_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.","example":2140},"p99_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.","example":5380}}},"WhatsAppLatencyStats":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Latency percentiles in milliseconds for the requested scope:\n\n- `processing`: From acceptance to WhatsApp handoff.\n- `delivery`: From WhatsApp handoff to delivery confirmation.\n- `total`: From acceptance to delivery confirmation.\n\nEach family is omitted when no qualifying message contributes a measurement.\nIndividual percentiles can also be null. `delivery` is measured on a best-effort basis, so\nit can be absent for a scope whose `processing` and `total` are present.\n","example":{"processing":{"p50_ms":610,"p95_ms":2140,"p99_ms":5380},"delivery":{"p50_ms":1530,"p95_ms":6820,"p99_ms":18400},"total":{"p50_ms":2180,"p95_ms":9060,"p99_ms":24300}},"properties":{"processing":{"$ref":"#/components/schemas/WhatsAppLatencyQuantiles"},"delivery":{"$ref":"#/components/schemas/WhatsAppLatencyQuantiles"},"total":{"$ref":"#/components/schemas/WhatsAppLatencyQuantiles"}}},"WhatsAppStatsComparisonDelta":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Changes from the previous period. A `*_pct_change` value is the signed relative change `(current - previous) / previous` and is null when the previous count is zero. A `*_rate_pp` value is the signed difference between rate fractions and is null when either rate is undefined.\n","required":["accepted_pct_change","sent_pct_change","delivered_pct_change","failed_pct_change","rejected_pct_change","read_pct_change","delivery_rate_pp","failure_rate_pp","read_rate_pp"],"properties":{"accepted_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in accepted messages (`delivery.accepted`) versus the previous period, as a signed fraction. Null when the previous period accepted none.","example":0.508},"sent_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in sent messages (`delivery.sent`) versus the previous period, as a signed fraction. Null when the previous period had none.","example":0.508},"delivered_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in delivered messages (`delivery.delivered`) versus the previous period, as a signed fraction. Null when the previous period delivered none.","example":0.513},"failed_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in failed messages (`delivery.failed`) versus the previous period, as a signed fraction. Null when the previous period had none.","example":-0.194},"rejected_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in rejected messages (`delivery.rejected`) versus the previous period, as a signed fraction. Null when the previous period had none.","example":0.084},"read_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in messages read (`engagement.read`) versus the previous period, as a signed fraction. Null when the previous period had none.","example":0.568},"delivery_rate_pp":{"type":["number","null"],"minimum":-1,"maximum":1,"readOnly":true,"description":"Signed difference between this period's and the previous period's delivery rate, both fractions in [0,1] (multiply by 100 for percentage points). Null when either period's delivery rate is undefined.","example":0.0031},"failure_rate_pp":{"type":["number","null"],"minimum":-1,"maximum":1,"readOnly":true,"description":"Signed difference between this period's and the previous period's failure rate, both fractions in [0,1] (multiply by 100 for percentage points). Null when either period's failure rate is undefined.","example":-0.0045},"read_rate_pp":{"type":["number","null"],"readOnly":true,"description":"Signed difference between the current and previous read-rate fractions. Multiply by 100 for percentage points. The value can fall outside `[-1, 1]` because a read receipt can arrive for a message whose delivery receipt did not, and high-volume counts are approximate. Null when either rate is undefined.\n","example":0.0232}}},"WhatsAppStatsComparison":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The same statistics for the equal-length, inclusive period ending immediately before the requested start, together with the change between the two periods. Present only when `compare=previous_period` is requested. The change is already computed, so a percentage difference needs no second request.\n","required":["period","delivery","engagement","latency","delta"],"properties":{"period":{"$ref":"#/components/schemas/WhatsAppStatsSummaryPeriod","description":"The preceding window these comparison figures cover, the equal-length window ending immediately before the requested start (the prior day for day windows, the prior hour for hour windows). For a request covering 2026-05-01 to 2026-05-25, this is 2026-04-06 to 2026-04-30, both inclusive.","example":{"from":"2026-04-06","to":"2026-04-30","data_as_of":"2026-05-25T14:03:10Z"}},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppDeliveryStats"}],"example":{"accepted":3196,"sent":3190,"delivered":3120,"failed":31,"rejected":380,"delivery_rate":0.9762,"failure_rate":0.0097}},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppEngagementStats"}],"example":{"read":1980,"read_rate":0.6346}},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppLatencyStats"}]},"delta":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppStatsComparisonDelta"}]}}},"WhatsAppStatsSummary":{"type":"object","additionalProperties":false,"description":"WhatsApp lifecycle counts, rates, engagement, and latency percentiles for the full requested period. Counts aggregate the time buckets. Latency percentiles cover the whole period. Rates are null when their denominator is zero.\n","required":["period","delivery","engagement","latency"],"properties":{"period":{"$ref":"#/components/schemas/WhatsAppStatsSummaryPeriod","description":"The window the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppLatencyStats"}]},"comparison":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppStatsComparison"}]}}},"WhatsAppDeliveryCounts":{"type":"object","additionalProperties":false,"readOnly":true,"description":"WhatsApp lifecycle counts for a time bucket, attributed by send time. A message accepted on Monday and delivered on Tuesday counts in Monday's bucket. The sibling `engagement` block reports read counts. Rates are available only for the whole period. Very large counts are close estimates rather than exact tallies.\n","required":["accepted","sent","delivered","failed","rejected"],"properties":{"accepted":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages accepted for sending after admission checks.","example":4820},"sent":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages handed off for delivery.","example":4810},"delivered":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages confirmed delivered to the recipient's device.","example":4720},"failed":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages that failed during sending or delivery.","example":25},"rejected":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages rejected before any send attempt, because the recipient is on the workspace's suppression list, no reachable recipient was given, the destination has no price, the wallet could not fund the send, or the workspace is suspended. Rejected messages are never charged and are not counted in `accepted`, so the total addressed is `accepted + rejected`. Excluded from `failure_rate`, which covers send failures only.","example":412}}},"WhatsAppEngagementCounts":{"type":"object","additionalProperties":false,"readOnly":true,"description":"WhatsApp engagement counts for a time bucket, attributed by send time. A message accepted on Monday and read on Tuesday counts in Monday's bucket. Read rates are available only for the whole period. Very large counts are close estimates rather than exact tallies.\n","required":["read"],"properties":{"read":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages confirmed read by the recipient.","example":3105}}},"WhatsAppStatsPoint":{"type":"object","additionalProperties":false,"readOnly":true,"description":"WhatsApp lifecycle counts, engagement, and latency percentiles for one time bucket (a calendar day or hour), bucketed by send time. Every count in a bucket describes the messages accepted in it, regardless of when their later events arrived. Rates apply to the whole window rather than individual buckets.\n","required":["bucket","delivery","engagement","latency"],"properties":{"bucket":{"type":"string","minLength":1,"readOnly":true,"description":"The day (YYYY-MM-DD) or hour (RFC 3339, on the hour) this point covers, matching the period's grain.","example":"2026-05-25"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppDeliveryCounts"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppEngagementCounts"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppLatencyStats"}]}}},"WhatsAppTemplateID":{"type":"string","minLength":1,"pattern":"^wat_[0-9a-hjkmnp-tv-z]{26}$","example":"wat_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppTemplateCategoryStatsPoint":{"type":"object","additionalProperties":false,"description":"Lifecycle counts, derived rates, and engagement for a single WhatsApp message category over the requested period. A template send counts under its template's category; a free-form send counts under `service`.","required":["category","delivery","engagement","latency"],"properties":{"category":{"readOnly":true,"description":"The category this row aggregates. `service` aggregates free-form messages.","allOf":[{"$ref":"#/components/schemas/WhatsAppStatsMessageCategory"}]},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppLatencyStats"}]}}},"WhatsAppStatsByTemplateCategoryResponse":{"type":"object","additionalProperties":false,"description":"Per-message-category breakdown for the requested period, ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200).","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/WhatsAppStatsSummaryPeriod","description":"The window the response covers (echoed back), plus `data_as_of`."},"data":{"type":"array","readOnly":true,"description":"Category rows ranked by accepted volume descending.","items":{"$ref":"#/components/schemas/WhatsAppTemplateCategoryStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total distinct categories with activity in the period, regardless of `limit`.","example":4}}},"WhatsAppTagStatsPoint":{"type":"object","additionalProperties":false,"description":"Lifecycle counts, derived rates, and engagement for a single tag (name:value) over the requested period.","required":["tag","delivery","engagement","latency"],"properties":{"tag":{"type":"string","minLength":1,"readOnly":true,"description":"The tag this row aggregates, in `name:value` form.","example":"campaign:summer_sale"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppLatencyStats"}]}}},"WhatsAppStatsByTagResponse":{"type":"object","additionalProperties":false,"description":"Per-tag breakdown for the requested period, ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200).","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/WhatsAppStatsSummaryPeriod","description":"The window the response covers (echoed back), plus `data_as_of`."},"data":{"type":"array","readOnly":true,"description":"Tag rows ranked by accepted volume descending.","items":{"$ref":"#/components/schemas/WhatsAppTagStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total distinct tags with activity in the period, regardless of `limit`.","example":12}}},"WhatsAppCountryStatsPoint":{"type":"object","additionalProperties":false,"description":"Lifecycle counts, derived rates, engagement and latency for a single destination country over the requested period.","required":["country","delivery","engagement","latency"],"properties":{"country":{"readOnly":true,"description":"The destination country this row aggregates, as an ISO 3166-1 alpha-2 code. `ZZ` collects recipients whose country could not be resolved.","allOf":[{"$ref":"#/components/schemas/CountryCode"}]},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppLatencyStats"}]}}},"WhatsAppStatsByCountryResponse":{"type":"object","additionalProperties":false,"description":"Per-country breakdown for the requested period, ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200).\n","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/WhatsAppStatsSummaryPeriod","readOnly":true,"description":"The window the response covers (echoed back), plus `data_as_of`."},"data":{"type":"array","readOnly":true,"description":"Country rows ranked by accepted volume descending. Empty when no eligible activity occurred in the period; rows sum to the summary less group-send volume, and less any pre-cutover phone-addressed sends still inside the window.\n","items":{"$ref":"#/components/schemas/WhatsAppCountryStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total distinct countries with activity in the period, regardless of `limit`.","example":4}}},"WhatsAppErrorCode":{"type":"string","minLength":1,"x-extensible-enum":["insufficient_balance","price_not_found","internal_error","undeliverable","service_window_expired","rate_limited","recipient_suppressed","media_rejected","workspace_suspended"],"description":"Standardized failure reason:\n\n- `insufficient_balance`: The workspace wallet could not fund the send.\n- `price_not_found`: No price was configured for the destination and template.\n- `internal_error`: An unexpected service failure occurred.\n- `undeliverable`: The recipient could not be reached.\n- `service_window_expired`: The 24-hour service window closed; send a template.\n- `rate_limited`: The send was throttled.\n- `recipient_suppressed`: The recipient is on the workspace suppression list.\n- `media_rejected`: WhatsApp could not fetch the media URL, or refused the file it found there; `description` carries its reason.\n- `workspace_suspended`: The workspace is suspended, so Bird stopped this message and will not send it after reactivation. In rare cases an earlier attempt that Bird could not confirm may still have been delivered. A message refused after it was charged keeps its charge. Contact Bird support to reactivate the workspace.\n\nThis is an open enum. Accept unrecognized values.\n"},"WhatsAppErrorCodeStatsPoint":{"type":"object","additionalProperties":false,"description":"Number of failed messages for a single normalized failure reason over the requested period.","required":["error_code","count"],"properties":{"error_code":{"readOnly":true,"description":"The normalized failure reason this row aggregates, matching the `last_error.code` reported on an individual failed message.","allOf":[{"$ref":"#/components/schemas/WhatsAppErrorCode"}]},"count":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages that failed with this reason in scope.","example":18}}},"WhatsAppStatsByErrorCodeResponse":{"type":"object","additionalProperties":false,"description":"Per-error-code failure breakdown for the requested period, ranked by failure count descending and capped at the requested `limit` (default 50, max 200).","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/WhatsAppStatsSummaryPeriod","description":"The window the response covers (echoed back), plus `data_as_of`."},"data":{"type":"array","readOnly":true,"description":"Error-code rows ranked by failure count descending. Empty when no failures occurred in the period.","items":{"$ref":"#/components/schemas/WhatsAppErrorCodeStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total distinct error codes with failures in the period, regardless of `limit`.","example":3}}},"WhatsAppInboundStatsComparisonDelta":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The change from the preceding period to the requested one. The `received_pct_change` field is a signed relative change, computed as `(current - previous) / previous`. A value of `0.5` means 50% higher, and `-0.2` means 20% lower. The field is null when the previous period received none.\n","required":["received_pct_change"],"properties":{"received_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in received messages versus the previous period, as a signed fraction. Null when the previous period received none.","example":0.058}}},"WhatsAppInboundStatsComparison":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The received-message count for the equal-length, inclusive period ending immediately before the requested start, together with the change between the two periods. Present only when `compare=previous_period` is requested. The change is already computed, so a percentage difference needs no second request.\n","required":["period","received","delta"],"properties":{"period":{"$ref":"#/components/schemas/WhatsAppStatsSummaryPeriod","description":"The preceding window these comparison figures cover, the equal-length window ending immediately before the requested start (the prior day for day windows, the prior hour for hour windows). For a request covering 2026-05-01 to 2026-05-25, this is 2026-04-06 to 2026-04-30, both inclusive.","example":{"from":"2026-04-06","to":"2026-04-30","data_as_of":"2026-05-25T14:03:10Z"}},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages received in the preceding period.","example":3980},"delta":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppInboundStatsComparisonDelta"}]}}},"WhatsAppInboundStatsSummaryResponse":{"type":"object","additionalProperties":false,"description":"Total received messages for the requested period.\n","required":["period","received"],"properties":{"period":{"$ref":"#/components/schemas/WhatsAppStatsSummaryPeriod","description":"The window the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages received in the period, counted by the time each message reached your number. Computed across the whole window rather than summed from the daily or hourly series, so it can sit slightly below the sum of those rows.","example":4210},"comparison":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppInboundStatsComparison"}]}}},"WhatsAppInboundStatsPoint":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Received-message count for one time bucket (a calendar day or hour), bucketed by the time each message reached your number.\n","required":["bucket","received"],"properties":{"bucket":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"The day (YYYY-MM-DD) or hour (RFC 3339, on the hour) this point covers, matching the request's grain.","example":"2026-05-25"},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages received in this bucket.","example":182}}},"AMBBusinessID":{"type":"string","minLength":1,"pattern":"^abz_[0-9a-hjkmnp-tv-z]{26}$","example":"abz_01krdgeqcxet5s7t44vh8rt9mg"},"AMBContentKind":{"type":"string","minLength":1,"enum":["text","attachment","rich_link","quick_reply","list_picker","time_picker","form","apple_pay","authenticate","imessage_app","interactive"],"description":"Derived message classification for filtering and statistics. Send requests use the `text`, `rich_link` and `interactive` keys. `apple_pay` and `authenticate` appear on existing messages. Sends do not accept them, and templates do not accept `apple_pay`. A sign-in message template has the kind `authenticate`.\n\n- text: Text, optionally with a subject.\n- attachment: One or more files, images, audio clips, or videos.\n- rich_link: A link with a preview card.\n- quick_reply: Two to five reply choices.\n- list_picker: A grouped menu of choices.\n- time_picker: Appointment time slots; a reply may contain only a selected label.\n- form: A multi-page form.\n- imessage_app: A custom iMessage app interaction on a compatible device.\n- interactive: An opaque interactive reference whose subtype is unknown.\n- apple_pay: An Apple Pay request, or the customer's response to one. Apple Pay requests are in preview.\n- authenticate: A sign-in request, the customer's response to one, or a sign-in message template."},"AMBStatsSummaryPeriod":{"type":"object","additionalProperties":false,"description":"The window the server actually computed against. The summary serves two window grains: calendar days (bounds are YYYY-MM-DD) and hours (bounds are RFC 3339 instants on the hour). The grain of `from` and `to` mirrors the grain of the request's bounds.\n","required":["from","to"],"properties":{"from":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive start of the window, as a calendar day (`YYYY-MM-DD`) or an RFC 3339 hour boundary. Historical starts are preserved; the maximum request length does not impose a historical cutoff.","example":"2026-05-01"},"to":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive end of the window, as a calendar day (`YYYY-MM-DD`) or an RFC 3339 hour boundary.","example":"2026-05-25"},"data_as_of":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"Latest time reflected in the statistics. More recent events might not be included yet. Null when the freshness boundary is unavailable.\n","example":"2026-05-25T14:03:10Z"}}},"AMBStatsAttribution":{"type":"string","minLength":1,"readOnly":true,"enum":["accepted_time","event_time"],"description":"Which timestamp a statistics response buckets its rows and totals by:\n\n- `accepted_time`: attributed to when Bird accepted the outbound message for sending. The outbound send statistics use this, so a later event for the same message, such as a send failure, still counts against the day or hour its message was accepted.\n- `event_time`: attributed to when the event itself occurred. Inbound message statistics, conversation statistics and the staff per-business failure counts use this, since there is no earlier outbound event to anchor them to.\n\nA response never mixes the two axes: every row and total in one payload shares the same attribution.\n","example":"accepted_time"},"AMBOutboundStatsCounts":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Outbound Apple Messages for Business counts for the requested scope, attributed to when each message was accepted. Apple Messages for Business has no delivery receipt, so there is no `delivered` count anywhere in this API: `sent` is the last outbound state Bird observes for a message. Very large counts are close estimates rather than exact tallies. Rates are computed once here, clamped to 1, and null when nothing was accepted.\n","required":["accepted","sent","send_failed","rejected","sent_rate","send_failure_rate"],"properties":{"accepted":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages accepted for sending after admission checks. This is the denominator for `sent_rate` and `send_failure_rate`.","example":4820},"sent":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages handed off to Apple.","example":4790},"send_failed":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct accepted messages that Apple refused, that exhausted their send attempts, or that a workspace suspension stopped. See `last_error.code` on the message for the reason; a refused charge is not a send failure, it is `rejected`.","example":30},"rejected":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages refused before any send attempt, because the destination has no price, the wallet could not fund the send, the workspace is suspended, or the content cannot be sent yet. Rejected messages are never charged and are not counted in `accepted`, so the total addressed is `accepted + rejected`. Excluded from `send_failure_rate`, which covers send failures only.","example":4},"sent_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Share of accepted messages Apple acknowledged, computed as `sent / accepted`. Null when no messages were accepted in scope. This stands where other channels report a delivery rate.","example":0.9938},"send_failure_rate":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"Share of accepted messages that failed to send, computed as `send_failed / accepted`. Null when no messages were accepted in scope.","example":0.0062}}},"AMBStatsQuantiles":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Approximate p50, p95, and p99 latency percentiles in milliseconds for one latency family. All three are null when no qualifying event contributed a measurement.\n","required":["p50_ms","p95_ms","p99_ms"],"properties":{"p50_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.","example":610},"p95_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.","example":2140},"p99_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.","example":5380}}},"AMBStatsLatency":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Processing-latency percentiles in milliseconds for the requested scope, from acceptance to Apple handoff. Apple Messages for Business has no delivery receipt, so there is no `delivery` or `total` member beside `processing`. Conversation response timing is reported separately in `first_response`. Always present; every percentile is null when no qualifying message in scope has a measurement.\n","required":["processing"],"properties":{"processing":{"$ref":"#/components/schemas/AMBStatsQuantiles"}}},"AMBStatsComparisonDelta":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Changes from the previous period. Each value is the signed relative change `(current - previous) / previous` and is null when the previous count is zero.\n","required":["accepted_pct_change","sent_pct_change","send_failed_pct_change","rejected_pct_change"],"properties":{"accepted_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in accepted messages (`counts.accepted`) versus the previous period, as a signed fraction. Null when the previous period accepted none.","example":0.508},"sent_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in sent messages (`counts.sent`) versus the previous period, as a signed fraction. Null when the previous period had none.","example":0.501},"send_failed_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in send failures (`counts.send_failed`) versus the previous period, as a signed fraction. Null when the previous period had none.","example":-0.12},"rejected_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in rejected messages (`counts.rejected`) versus the previous period, as a signed fraction. Null when the previous period had none.","example":0}}},"AMBStatsComparison":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The same statistics for the equal-length, inclusive period ending immediately before the requested start, together with computed changes for the message counts and rates listed in `delta`. Present only when `compare=previous_period` is requested. Monthly active contacts and latency values are returned for both periods without a computed change.\n","required":["period","counts","latency","delta"],"properties":{"monthly_active_contacts":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"description":"New monthly active contact charges activated by replies submitted in this window. Each business-scoped contact counts once per UTC calendar month. Omitted for message-kind, intent, group, category or tag filters. Read from retained activation records independently of the message rollup data_as_of boundary; tenant purges remove these records."},"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSummaryPeriod","description":"The preceding window these comparison figures cover, the equal-length window ending immediately before the requested start (the prior day for day windows, the prior hour for hour windows)."},"counts":{"readOnly":true,"$ref":"#/components/schemas/AMBOutboundStatsCounts"},"latency":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsLatency"},"first_response":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsQuantiles","description":"First-response latency percentiles for the preceding period. Omitted when no qualifying message in that period has a measurement."},"delta":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsComparisonDelta"}}},"AMBStatsSummary":{"type":"object","additionalProperties":false,"description":"Outbound Apple Messages for Business counts and latency percentiles for the full requested period. Counts and percentiles are computed over the whole period rather than combined from the returned time-series values.\n","required":["period","attribution","counts","latency"],"properties":{"monthly_active_contacts":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"description":"New monthly active contact charges activated by replies submitted in this window. Each business-scoped contact counts once per UTC calendar month. Omitted for message-kind, intent, group, category or tag filters. Read from retained activation records independently of the message rollup data_as_of boundary; tenant purges remove these records."},"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSummaryPeriod","description":"The window the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"attribution":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsAttribution","description":"Always `accepted_time` for outbound statistics."},"counts":{"readOnly":true,"$ref":"#/components/schemas/AMBOutboundStatsCounts"},"latency":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsLatency"},"first_response":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsQuantiles","description":"Time from the oldest unanswered inbound message to acceptance of the first outbound reply that claims it. Reported on summaries and breakdowns. Omitted when no qualifying reply contributes a measurement."},"comparison":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsComparison"}}},"AMBStatsPoint":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Outbound Apple Messages for Business counts and processing-latency percentiles for one time bucket (a calendar day or hour), bucketed by acceptance time. Every count in a bucket describes the messages accepted in it, regardless of when their later events arrived. There is no `first_response` here. Read first-response latency from the summary or a breakdown endpoint.\n","required":["bucket","counts","latency"],"properties":{"bucket":{"type":"string","minLength":1,"readOnly":true,"description":"The day (YYYY-MM-DD) or hour (RFC 3339, on the hour) this point covers, matching the period's grain.","example":"2026-05-25"},"counts":{"readOnly":true,"$ref":"#/components/schemas/AMBOutboundStatsCounts"},"latency":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsLatency"}}},"AMBMessageKindStatsPoint":{"type":"object","additionalProperties":false,"description":"Outbound counts and latency percentiles for a single message content kind over the requested period.","required":["message_kind","counts","latency"],"properties":{"message_kind":{"$ref":"#/components/schemas/AMBContentKind","readOnly":true,"description":"The content kind these messages were sent as, the same value the message read returns as its content kind discriminator."},"counts":{"readOnly":true,"$ref":"#/components/schemas/AMBOutboundStatsCounts"},"latency":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsLatency"},"first_response":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsQuantiles","description":"First-response latency percentiles for this content kind. Omitted when no qualifying message contributes a measurement."}}},"AMBStatsByMessageKindResponse":{"type":"object","additionalProperties":false,"description":"Per-content-kind breakdown for the requested period, ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200).","required":["period","attribution","data","total"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSummaryPeriod","description":"The window the response covers (echoed back), plus `data_as_of`."},"attribution":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsAttribution","description":"Always `accepted_time` for outbound statistics."},"data":{"type":"array","readOnly":true,"description":"Content-kind rows ranked by accepted volume descending.","items":{"$ref":"#/components/schemas/AMBMessageKindStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total distinct content kinds with activity in the period, regardless of `limit`.","example":4}}},"AMBCategoryStatsPoint":{"type":"object","additionalProperties":false,"description":"Outbound counts and latency percentiles for a single message category over the requested period.","required":["category","counts","latency"],"properties":{"category":{"type":"string","minLength":0,"readOnly":true,"description":"The category these messages were sent with. Defaults to an empty string when a send names no category.","example":"order_update"},"counts":{"readOnly":true,"$ref":"#/components/schemas/AMBOutboundStatsCounts"},"latency":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsLatency"},"first_response":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsQuantiles","description":"First-response latency percentiles for this category. Omitted when no qualifying message contributes a measurement."}}},"AMBStatsByCategoryResponse":{"type":"object","additionalProperties":false,"description":"Per-category breakdown for the requested period, ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200).","required":["period","attribution","data","total"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSummaryPeriod","description":"The window the response covers (echoed back), plus `data_as_of`."},"attribution":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsAttribution","description":"Always `accepted_time` for outbound statistics."},"data":{"type":"array","readOnly":true,"description":"Category rows ranked by accepted volume descending.","items":{"$ref":"#/components/schemas/AMBCategoryStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total distinct categories with activity in the period, regardless of `limit`.","example":6}}},"AMBTagStatsPoint":{"type":"object","additionalProperties":false,"description":"Outbound counts and latency percentiles for a single tag over the requested period.","required":["tag","counts","latency"],"properties":{"tag":{"type":"string","minLength":1,"readOnly":true,"description":"The tag these messages carry, as a bare name or a `name:value` pair. A message with several tags is counted once under each, so rows do not sum to the period total.","example":"campaign:spring_launch"},"counts":{"readOnly":true,"$ref":"#/components/schemas/AMBOutboundStatsCounts"},"latency":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsLatency"},"first_response":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsQuantiles","description":"First-response latency percentiles for this tag. Omitted when no qualifying message contributes a measurement."}}},"AMBStatsByTagResponse":{"type":"object","additionalProperties":false,"description":"Per-tag breakdown for the requested period, ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200). Only tagged messages appear.","required":["period","attribution","data","total"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSummaryPeriod","description":"The window the response covers (echoed back), plus `data_as_of`."},"attribution":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsAttribution","description":"Always `accepted_time` for outbound statistics."},"data":{"type":"array","readOnly":true,"description":"Tag rows ranked by accepted volume descending.","items":{"$ref":"#/components/schemas/AMBTagStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total distinct tags with activity in the period, regardless of `limit`.","example":9}}},"AMBStatsErrorCode":{"type":"string","minLength":1,"pattern":"^(bird:[a-z0-9_]+|apple:\\d{3})$","description":"Machine-readable reason a send failed, in one of two namespaces: `bird:` for a reason Bird's own pipeline assigned (for example `bird:business_not_registered`), or `apple:` followed by the HTTP status Apple's API returned for the send attempt (for example `apple:404`). This is an open, growing set in both namespaces; accept unrecognized values.\n","example":"bird:business_not_registered"},"AMBErrorCodeStatsPoint":{"type":"object","additionalProperties":false,"description":"Outbound counts and latency percentiles for a single failure reason over the requested period.","required":["error_code","counts","latency"],"properties":{"error_code":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsErrorCode","description":"The failure reason these messages share."},"counts":{"readOnly":true,"$ref":"#/components/schemas/AMBOutboundStatsCounts"},"latency":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsLatency"},"first_response":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsQuantiles","description":"First-response latency for failed replies that claimed an unanswered inbound message. Omitted when no qualifying reply contributes a measurement.\n"}}},"AMBStatsByErrorCodeResponse":{"type":"object","additionalProperties":false,"description":"Per-failure-reason breakdown for the requested period, ranked by `send_failed + rejected` descending and capped at the requested `limit` (default 50, max 200). Only messages carrying an error code appear: a `bird:` code is usually a rejection, an `apple:` code a send failure.","required":["period","attribution","data","total"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSummaryPeriod","description":"The window the response covers (echoed back), plus `data_as_of`."},"attribution":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsAttribution","description":"Always `accepted_time` for outbound statistics."},"data":{"type":"array","readOnly":true,"description":"Error-code rows ranked by `send_failed + rejected` descending.","items":{"$ref":"#/components/schemas/AMBErrorCodeStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total distinct error codes with activity in the period, regardless of `limit`.","example":2}}},"AMBInboundStatsComparisonDelta":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The change from the preceding period to the requested one. The `received_pct_change` field is a signed relative change, computed as `(current - previous) / previous`. A value of `0.5` means 50% higher, and `-0.2` means 20% lower. The field is null when the previous period received none.\n","required":["received_pct_change"],"properties":{"received_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in received messages versus the previous period, as a signed fraction. Null when the previous period received none.","example":0.058}}},"AMBInboundStatsComparison":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The received-message count for the equal-length, inclusive period ending immediately before the requested start, together with the change between the two periods. Present only when `compare=previous_period` is requested. The change is already computed, so a percentage difference needs no second request.\n","required":["period","received","delta"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSummaryPeriod","description":"The preceding window these comparison figures cover, the equal-length window ending immediately before the requested start (the prior day for day windows, the prior hour for hour windows)."},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages received in the preceding period.","example":3980},"delta":{"readOnly":true,"$ref":"#/components/schemas/AMBInboundStatsComparisonDelta"}}},"AMBInboundStatsSummary":{"type":"object","additionalProperties":false,"description":"Total inbound Apple Messages for Business messages for the requested period.\n","required":["period","attribution","received"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSummaryPeriod","description":"The window the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"attribution":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsAttribution","description":"Always `event_time` for inbound statistics."},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages received in the period, counted by the time each message occurred. Computed across the whole window rather than summed from the daily or hourly series, so it can sit slightly below the sum of those rows.","example":4210},"comparison":{"readOnly":true,"$ref":"#/components/schemas/AMBInboundStatsComparison"}}},"AMBInboundStatsPoint":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Received-message count for one time bucket (a calendar day or hour), bucketed by the time each message occurred.\n","required":["bucket","received"],"properties":{"bucket":{"type":"string","minLength":1,"readOnly":true,"description":"The day (YYYY-MM-DD) or hour (RFC 3339, on the hour) this point covers, matching the request's grain.","example":"2026-05-25"},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages received in this bucket.","example":182}}},"AMBConversationStatsCounts":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Conversation lifecycle counts for the requested scope, attributed to when each event occurred. A conversation can start, reopen, and close more than once over its life, so `started`, `reopened`, and `closed` can each exceed `conversations`, the number of distinct conversations touched in scope. Very large counts are close estimates rather than exact tallies.\n","required":["started","reopened","closed","conversations"],"properties":{"started":{"type":"integer","minimum":0,"readOnly":true,"description":"Count of conversation-started events in scope.","example":210},"reopened":{"type":"integer","minimum":0,"readOnly":true,"description":"Count of conversation-reopened events in scope.","example":34},"closed":{"type":"integer","minimum":0,"readOnly":true,"description":"Count of conversation-closed events in scope.","example":198},"conversations":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct conversations with at least one lifecycle event in scope.","example":205}}},"AMBConversationStatsComparisonDelta":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Changes from the previous period. Each value is the signed relative change `(current - previous) / previous` and is null when the previous count is zero.\n","required":["started_pct_change","reopened_pct_change","closed_pct_change","conversations_pct_change"],"properties":{"started_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in conversation starts (`counts.started`) versus the previous period, as a signed fraction. Null when the previous period had none.","example":0.22},"reopened_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in conversation reopens (`counts.reopened`) versus the previous period, as a signed fraction. Null when the previous period had none.","example":-0.05},"closed_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in conversation closes (`counts.closed`) versus the previous period, as a signed fraction. Null when the previous period had none.","example":0.19},"conversations_pct_change":{"type":["number","null"],"readOnly":true,"description":"Relative change in distinct conversations touched (`counts.conversations`) versus the previous period, as a signed fraction. Null when the previous period had none.","example":0.21}}},"AMBConversationStatsComparison":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The same statistics for the equal-length, inclusive period ending immediately before the requested start, together with the change between the two periods. Present only when `compare=previous_period` is requested. The change is already computed, so a percentage difference needs no second request.\n","required":["period","counts","delta"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSummaryPeriod","description":"The preceding window these comparison figures cover, the equal-length window ending immediately before the requested start (the prior day for day windows, the prior hour for hour windows)."},"counts":{"readOnly":true,"$ref":"#/components/schemas/AMBConversationStatsCounts"},"delta":{"readOnly":true,"$ref":"#/components/schemas/AMBConversationStatsComparisonDelta"}}},"AMBConversationStatsSummary":{"type":"object","additionalProperties":false,"description":"Conversation lifecycle counts for the full requested period. Counts aggregate the time buckets.\n","required":["period","attribution","counts"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSummaryPeriod","description":"The window the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"attribution":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsAttribution","description":"Always `event_time` for conversation statistics."},"counts":{"readOnly":true,"$ref":"#/components/schemas/AMBConversationStatsCounts"},"comparison":{"readOnly":true,"$ref":"#/components/schemas/AMBConversationStatsComparison"}}},"AMBConversationStatsPoint":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Conversation lifecycle counts for one time bucket (a calendar day or hour), bucketed by when each event occurred.\n","required":["bucket","counts"],"properties":{"bucket":{"type":"string","minLength":1,"readOnly":true,"description":"The day (YYYY-MM-DD) or hour (RFC 3339, on the hour) this point covers, matching the period's grain.","example":"2026-05-25"},"counts":{"readOnly":true,"$ref":"#/components/schemas/AMBConversationStatsCounts"}}},"SIPTrunkID":{"type":"string","minLength":1,"pattern":"^spt_[0-9a-hjkmnp-tv-z]{26}$","example":"spt_01krdgeqcxet5s7t44vh8rt9mg"},"VoiceCallStatus":{"type":"string","minLength":1,"enum":["answered","no_answer","busy","canceled","failed","rejected","unknown","ringing","in_progress"],"description":"Call status.\n\nA call that has ended carries one of:\n\n- `answered` means it connected and the far end picked up.\n- `no_answer` means nobody picked up before the call timed out.\n- `rejected` means it was refused rather than attempted. Either we turned it\n  away before dialing a carrier, in which case `rejection_reason` names the\n  check it failed where there was one, or the far end declined it.\n- `failed` means it was attempted and did not work, and `sip_response_code`\n  is what came back.\n- `unknown` means the outcome could not be determined. Contact support with\n  the call `id` if you see one.\n\nAn active call carries `ringing` before it is picked up and `in_progress`\nafterward. The call list's `status` filter takes any mix of the two sets.\n\n`busy` and `canceled` are reserved for incoming calls delivered to your own\nnumbers: `busy` for a called party that rejected the call as busy, `canceled`\nfor a caller who hung up before it was picked up. Neither is emitted yet and\nboth outcomes are reported as `failed` today.\n","example":"answered"},"VoiceCallDirection":{"type":"string","minLength":1,"enum":["inbound","outbound"],"description":"Whether the call was placed from your side, by your PBX, the API, the browser or Bird dialing onward for you (outbound), or arrived from a remote party (inbound).","example":"outbound"},"Money":{"type":"object","additionalProperties":false,"required":["amount","currency_code"],"properties":{"amount":{"type":"string","minLength":1,"description":"Decimal amount as a string, in major currency units.","example":"0.00995"},"currency_code":{"$ref":"#/components/schemas/CurrencyCode","description":"ISO 4217 currency code.","example":"USD"}}},"VerificationChannel":{"type":"string","minLength":1,"x-extensible-enum":["email","sms","whatsapp","telegram","voice"],"description":"The channel a passcode is delivered over. Open enum: new channels may be added over time, so treat any unrecognized value as a future channel rather than an error."},"VerificationTerminalReason":{"type":"string","minLength":1,"x-extensible-enum":["attempts_exhausted","ttl_elapsed","undeliverable"],"description":"Why a verification session reached its final state without succeeding: `attempts_exhausted` (too many incorrect passcodes), `ttl_elapsed` (the time window elapsed before a correct passcode), or `undeliverable` (no planned channel could deliver a passcode, so the recipient never had one to submit). Open enum: new reasons may be added over time, so treat any unrecognized value as a future reason rather than an error."},"VerificationAttemptFailureReason":{"type":"string","minLength":1,"x-extensible-enum":["carrier_rejected","hard_bounce","soft_bounce","undelivered","channel_unavailable","channel_disabled","channel_restricted","delivery_timeout","not_billable","workspace_suspended"],"description":"Why a passcode send did not deliver:\n\n- `carrier_rejected`: The SMS carrier rejected the send.\n- `hard_bounce`: The email permanently bounced.\n- `soft_bounce`: The email temporarily bounced, such as when a mailbox is full.\n- `undelivered`: The channel reported a generic delivery failure.\n- `channel_unavailable`: The channel could not be used, so the verification\n  moved to the next channel.\n- `channel_disabled`: Sending on the channel is temporarily disabled, so the\n  verification moved to the next channel.\n- `channel_restricted`: A destination or session restriction prevented the\n  channel from being used. The verification can try the next eligible channel\n  while the session remains pending and unexpired.\n- `delivery_timeout`: No delivery confirmation arrived before the channel's\n  timeout, so the verification moved to the next channel.\n- `not_billable`: The send could not be charged, so it was never handed to the\n  channel. Usually the workspace balance is too low to cover it. Topping up\n  the balance is what clears this.\n- `workspace_suspended`: The workspace was suspended, so Bird stopped this\n  attempt and no other channel is tried. In rare cases the channel had already\n  accepted the passcode, so a passcode can still be checked while the\n  verification is `pending`. Contact Bird support to reactivate the workspace; verifications\n  created after reactivation send normally.\n\nNew reasons may be added over time. Treat unrecognized values as reasons added\nlater rather than errors."},"RealtimeAppID":{"type":"string","minLength":1,"pattern":"^rap_[0-9a-hjkmnp-tv-z]{26}$","example":"rap_01krdgeqcxet5s7t44vh8rt9mg"},"WorkspaceSortField":{"type":"string","description":"Field used to order workspaces.","enum":["created_at","name"],"default":"created_at"},"OrganizationWorkspaceList":{"readOnly":true,"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"WorkspaceCreate":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"$ref":"#/components/schemas/TenantName","example":"Production"}}},"OrganizationWorkspaceUpdate":{"type":"object","additionalProperties":false,"properties":{"name":{"$ref":"#/components/schemas/TenantName","description":"New display name for the workspace, as it appears in the dashboard and in workspace lists. Must include at least one letter or number.\n","example":"Staging"}}},"WhatsAppDataLocalizationRegion":{"type":"string","minLength":2,"enum":["AU","ID","IN","JP","SG","KR","DE","CH","GB","BR","BH","ZA","AE","CA"],"description":"A country where WhatsApp can store a business phone number's message content at rest, as its two-letter ISO 3166 code.\n","example":"DE"},"OrganizationWorkspaceWhatsAppNumberCreate":{"type":"object","description":"A number your multi-partner solution onboarded, and the workspace label and storage country it takes. `data_localization_region` cannot be changed once the number is connected, so set it in this call if your customer needs one.\n","additionalProperties":false,"required":["waba","meta_phone_number_id"],"properties":{"waba":{"type":"string","minLength":1,"pattern":"^[0-9]+$","description":"The WhatsApp Business Account your Embedded Signup returned, from the session info's `messaging_account_ids`.\n","example":"102290129340398"},"meta_phone_number_id":{"type":"string","minLength":1,"pattern":"^[0-9]+$","description":"The phone number your Embedded Signup returned, from the session info's `phone_number_id`.\n","example":"109364591979012"},"name":{"type":"string","minLength":1,"maxLength":100,"description":"The workspace's own label for the number. Leave it out and the number's own phone number stands in. A number already connected in the workspace keeps its label unless you pass one. This has no bearing on what WhatsApp displays to people the number messages.\n","example":"Northwind Support"},"data_localization_region":{"$ref":"#/components/schemas/WhatsAppDataLocalizationRegion","description":"Store this number's message content at rest in a specific country, given as its two-letter ISO 3166 code. Leave it out to use WhatsApp's default storage. This cannot be changed once the number is connected, so set it now if your customer requires it.\n"}}},"WhatsAppNumberID":{"type":"string","minLength":1,"pattern":"^wan_[0-9a-hjkmnp-tv-z]{26}$","example":"wan_01krdgeqcxet5s7t44vh8rt9mg"},"AllocatedNumberID":{"type":"string","minLength":1,"pattern":"^(nda|nal)_[0-9a-hjkmnp-tv-z]{26}$","example":"nda_01krdgeqcxet5s7t44vh8rt9mg","description":"Identifier of a number allocated to your workspace, as returned in the id field of `GET /v1/numbers`."},"WhatsAppNumberScope":{"type":"string","minLength":1,"enum":["system","workspace"],"example":"workspace"},"WhatsAppNumberStatus":{"type":"string","minLength":1,"x-extensible-enum":["awaiting_signup","banned","connected","deleted","disconnected","failed","flagged","migrated","pending","preparing","rate_limited","restricted"],"description":"Operational state of a business phone number. The `preparing` status means the service is verifying a managed number. The `awaiting_signup` status means verification finished and you must complete signup. The `pending` status is WhatsApp's own token for a number it does not hold as registered, and is also returned when no WhatsApp status has been stored, including after setup completes. It does not by itself establish whether setup is complete. The `connected` status means registration completed. The `failed` status means connection was refused permanently. Other values are WhatsApp's own operational states for a number already connected. This is an open enum. Accept unrecognized values.","example":"connected"},"WhatsAppNumberErrorCode":{"type":"string","minLength":1,"x-extensible-enum":["registration_pin_rejected","registration_pin_rate_limited","registration_attempts_exhausted","number_verification_required","number_not_registered","number_already_linked","number_already_in_use","verification_code_not_received","verification_rate_limited","business_account_locked","business_verification_required","credit_currency_mismatch","payment_method_conflict","billing_close","permission_denied","invalid_request","internal_error"],"description":"Standardized number-connection failure:\n\n- `registration_pin_rejected`: WhatsApp refused the two-step verification PIN.\n- `registration_pin_rate_limited`: Too many PIN attempts occurred recently.\n- `registration_attempts_exhausted`: The number has no registration attempts left. WhatsApp's own lockout clears after 72 hours; the number's attempt budget does not, so contact support if repair keeps ending here.\n- `number_verification_required`: WhatsApp requires the number to be verified again.\n- `number_not_registered`: WhatsApp does not hold the number as registered.\n- `number_already_linked`: Another WhatsApp integration uses the number.\n- `number_already_in_use`: WhatsApp cannot accept the number.\n- `verification_code_not_received`: The verification text did not arrive.\n- `verification_rate_limited`: WhatsApp declined to send this number another verification code, having been asked too often. It clears with time; retrying sooner extends it.\n- `business_account_locked`: WhatsApp locked the business account.\n- `business_verification_required`: WhatsApp refused to register the number because the business portfolio is not verified, usually because an unverified portfolio may hold only a few registered numbers. Verify the business or free a registered number on the portfolio, then repair the number.\n- `credit_currency_mismatch`: WhatsApp bills the business account in a currency other than USD, EUR, or your organization's billing currency. In Meta Business Suite, remove the account's payment method and then set its currency to one of those. If Meta doesn't allow the change, connect the number under a business account WhatsApp bills in one of them or has set no currency on.\n- `payment_method_conflict`: The business account already pays through another payment method or another provider's credit line, and WhatsApp doesn't let an account change its credit line once one is attached. Disconnect the number and connect it again under a new WhatsApp Business Account, without adding a payment method to it. For a number also on the WhatsApp Business app, Meta's steps to get a new account are in the coexistence troubleshooting guide.\n- `billing_close`: WhatsApp refused to set up billing for the business account while its monthly billing close ran. The close usually ends within the first few days of the new month; nothing about the number or the account needs changing. Once those days have passed, repair the number.\n- `permission_denied`: WhatsApp refused access to the account.\n- `invalid_request`: WhatsApp rejected the connection details.\n- `internal_error`: The service could not classify or resolve the failure.\n\nThis is an open enum. Accept unrecognized values.\n","example":"registration_pin_rejected"},"WhatsAppNumberError":{"type":"object","additionalProperties":false,"readOnly":true,"required":["code"],"description":"Why a number's connection was refused for good. `code` is the standardized reason. `description` explains the failure where one was recorded, and `meta_error_code` carries WhatsApp's own code when available. It accompanies the `failed` status only; a number still being retried carries no error.","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/WhatsAppNumberErrorCode"}],"readOnly":true,"description":"Standardized failure reason."},"description":{"type":"string","minLength":1,"readOnly":true,"description":"Why the connection failed: WhatsApp's own words, in the language of the account it refused, when WhatsApp answered; our own explanation when the number was refused before WhatsApp was asked; a generic sentence when WhatsApp refused without giving a reason. Absent when the attempt failed without ever reaching WhatsApp, which leaves `code` as the only account of the failure. Show it to the person who owns the number; never match on its text.","example":"Cannot Create Certificate: Please ensure two-factor authentication is disabled."},"meta_error_code":{"type":["string","null"],"readOnly":true,"description":"WhatsApp's most specific code for the refusal: its error subcode where it sent one, otherwise its top-level code. Null when WhatsApp did not provide a code. Treat it as an opaque string.","example":"2388001"}}},"WhatsAppNumberQualityRating":{"type":"string","minLength":1,"x-extensible-enum":["green","yellow","red","unknown"],"description":"WhatsApp quality rating for a business phone number, based on recipient feedback. `green`, `yellow`, and `red` indicate decreasing quality; sustained `red` can restrict the number. `unknown` is itself a reported rating. This is separate from a template-language quality score. Accept unrecognized values.","example":"green"},"WhatsAppNumberMessagingLimit":{"type":"string","minLength":1,"x-extensible-enum":["tier_50","tier_250","tier_1k","tier_10k","tier_100k","tier_unlimited"],"description":"How many unique WhatsApp users can be messaged outside a customer service window in a rolling 24 hours, as WhatsApp's own tier token. WhatsApp calculates this for the business portfolio, and every number in that portfolio shares it; it is not this number's private capacity, and one number can consume all of it. Values are WhatsApp's own tokens, lower-cased. Open enum: WhatsApp documents a 2,000 limit its published tier vocabulary has no token for, so treat an unrecognized value as a tier WhatsApp added.","example":"tier_250"},"WhatsAppNumberThroughputLevel":{"type":"string","minLength":1,"x-extensible-enum":["standard"],"description":"How fast WhatsApp lets this number send, as WhatsApp's own level token. `standard` is 80 messages per second; WhatsApp upgrades an eligible number to 1,000 per second automatically. Values are WhatsApp's own tokens, lower-cased. This enum is open because WhatsApp publishes no vocabulary for the field. The `standard` value is the only value Bird has measured. The upgraded level's token remains unknown until a number returns it.","example":"standard"},"WhatsAppNumber":{"type":"object","additionalProperties":false,"required":["id","phone_number","name","scope","status","created_at","updated_at"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/WhatsAppNumberID"}],"readOnly":true,"description":"Unique identifier for the connected number."},"waba":{"type":"string","minLength":1,"readOnly":true,"description":"The WhatsApp Business Account this number is connected under. Present only for a number your workspace connected itself.\n","example":"102290129340398"},"phone_number":{"type":["string","null"],"readOnly":true,"description":"The number in E.164 format. Null only while the number itself is not yet known: a number your workspace holds carries its E.164 from the moment setup starts, so a value here does not mean the number can send. Check `status` for connection state.\n","example":"+15550001234"},"number_id":{"allOf":[{"$ref":"#/components/schemas/AllocatedNumberID"}],"readOnly":true,"description":"The number you hold with us that this WhatsApp number was connected from, as its id in GET /v1/numbers. Absent for a number you brought yourself.\n"},"meta_preverified_id":{"type":"string","minLength":1,"readOnly":true,"description":"WhatsApp's own id for the number while we prepare it for you. We hand it to WhatsApp when you finish signing up, so WhatsApp knows this is the number we already verified for you. Absent for a number you brought yourself. WhatsApp discards the id once signup claims it, so an id still shown here on a connected number no longer names anything.\n","example":"106540352242922"},"verified_until":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When we expect WhatsApp to release this pre-verified number if you have not finished signup by then. Present only while the number is `awaiting_signup`. Absent for a number pre-verified before we started recording this moment, and for a number you brought yourself.\n","example":"2026-11-19T10:22:31Z"},"name":{"type":"string","minLength":1,"maxLength":100,"readOnly":true,"description":"Your workspace's own label for this number, given when it was connected and changeable afterwards. It has no bearing on what WhatsApp displays to people the number messages; `GET /v1/whatsapp/numbers/{number_id}/profile` returns that as `display_name`. For a number we operate on your behalf, this is our own label instead and cannot be changed.\n","example":"Sales EU"},"scope":{"allOf":[{"$ref":"#/components/schemas/WhatsAppNumberScope"}],"readOnly":true,"description":"Whether the number sends under a WhatsApp Business Account we operate on your behalf (`system`) or one your workspace connected itself (`workspace`).\n"},"data_localization_region":{"allOf":[{"$ref":"#/components/schemas/WhatsAppDataLocalizationRegion"}],"readOnly":true,"description":"The country this number's message content is stored at rest in, as its two-letter ISO 3166 code. Absent when it uses WhatsApp's default storage. It can differ from the region requested at connection when WhatsApp requires a particular country for the number.\n"},"status":{"allOf":[{"$ref":"#/components/schemas/WhatsAppNumberStatus"}],"readOnly":true,"description":"WhatsApp's own state for this number as of `meta_synced_at`, except for the three states we answer ourselves because WhatsApp holds nothing to report. A connection we are still verifying reads `preparing`, one waiting for someone to finish signup reads `awaiting_signup`, and a permanently refused one reads `failed`, with `error` saying why. `pending` is WhatsApp's own token for a number it does not hold as registered, and is also what a number with no stored WhatsApp status reads, including after setup completes, so it does not by itself establish whether setup is complete. A number we operate on your behalf reads `connected` as our own assertion rather than a reading from WhatsApp for every number we ship today; that tier carries no `meta_synced_at`. A connected virtual +1 555 or +1 711 number still has a daily sending limit until its current name is approved. Read `display_name_status` from the live profile for display name approval."},"next":{"type":"array","readOnly":true,"description":"What to do next about this number, given the state it is in. Each entry names one\naction and says why it is worth taking, so you can act on this response without\nworking out the order yourself. Present on reads that compute it: an empty list\nmeans there is nothing to do, and the field is absent entirely on responses that\ndo not report next actions.\n\nWhile `status` is `awaiting_signup` this carries the browser step that finishes\nthe connection, because embedded signup sits behind an OAuth screen no API call\ncan stand in for.\n","items":{"$ref":"#/components/schemas/NextAction"}},"error":{"allOf":[{"$ref":"#/components/schemas/WhatsAppNumberError"}],"readOnly":true,"description":"Why this number's connection was refused for good. Present only while `status` is `failed`. A retryable step records its cause on a still-`pending` number without setting this field, because that cause is not a refusal yet, so a connection you are still waiting on reports no error here."},"finish_setup_url":{"type":"string","format":"uri","minLength":1,"readOnly":true,"description":"Where a person finishes connecting this number, present only while `status` is `awaiting_signup`. Finishing means completing WhatsApp's embedded signup, which is a browser flow behind an OAuth screen: it cannot be done over the API, so open this link and have someone with access to the workspace complete it. The number is offered to them already verified. Once they finish, `status` moves on and this link is no longer returned.","example":"https://bird.com/dashboard/w/ws_01krdgeqcxet5s7t44vh8rt9mg/whatsapp/numbers?finish_setup_number=wan_01krdgeqcxet5s7t44vh8rt9mg"},"quality_rating":{"allOf":[{"$ref":"#/components/schemas/WhatsAppNumberQualityRating"}],"readOnly":true,"description":"WhatsApp's quality rating for this number as of `meta_synced_at`. Absent until WhatsApp has reported one, and always absent for a number we operate on your behalf."},"messaging_limit":{"allOf":[{"$ref":"#/components/schemas/WhatsAppNumberMessagingLimit"}],"readOnly":true,"description":"The messaging limit WhatsApp applied to this number's business portfolio as of `meta_synced_at`. Absent until WhatsApp has reported one, and always absent for a number we operate on your behalf."},"throughput_level":{"allOf":[{"$ref":"#/components/schemas/WhatsAppNumberThroughputLevel"}],"readOnly":true,"description":"The send rate WhatsApp allowed this number as of `meta_synced_at`. Absent until WhatsApp has reported one, and always absent for a number we operate on your behalf."},"is_official_business_account":{"type":"boolean","readOnly":true,"description":"Whether WhatsApp grants this number Official Business Account status as of `meta_synced_at`. Absent until WhatsApp has reported it, and always absent for a number we operate on your behalf. WhatsApp grants the status per number, so two numbers on one WhatsApp Business Account can differ. The status also decides whether a rename is possible here: a number that has it cannot be renamed through `PATCH /v1/whatsapp/numbers/{number_id}/profile` at all, and has to be renamed through WhatsApp support instead."},"is_on_business_app":{"type":"boolean","readOnly":true,"description":"Whether this number is also in use on the WhatsApp Business app, so the business keeps sending one-to-one messages from the app while you send through the API. Absent until WhatsApp has reported it, and always absent for a number we operate on your behalf."},"meta_synced_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When this number's state was last read from WhatsApp. `status`, `quality_rating`, `messaging_limit`, `throughput_level`, and `is_official_business_account` all belong to that reading rather than representing live values. We re-read roughly hourly, so a change at WhatsApp can be up to an hour old here. Absent for a number we have never read back and for a number we operate on your behalf."},"pre_verification_requested_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When we last asked WhatsApp to send this number a verification code, which we do only for a number your workspace connected itself from a number you hold with us. Absent for a number we operate on your behalf, and for one you connected through Embedded Signup with a code you read yourself. Wait a few hours after this before repairing a number whose verification failed: WhatsApp rotates the routes it verifies over during that period, and throttles a number asked repeatedly in a short window. Distinct from `updated_at`, which any change to the number moves."},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When this number was submitted for connection."},"updated_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When this number was last changed."}}},"RealtimeRegion":{"type":"object","additionalProperties":false,"required":["id"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/Region"}],"description":"Region identifier to pass as a Realtime app's region."}}},"RealtimeRegionList":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","description":"The regions a Realtime app can be created in.","items":{"$ref":"#/components/schemas/RealtimeRegion"}}}},"RealtimeAppSortField":{"type":"string","default":"created_at","description":"Field to sort Realtime apps by.\n","enum":["created_at","name"]},"RealtimeApp":{"allOf":[{"$ref":"#/components/schemas/Timestamps"},{"type":"object","required":["id","app_id","name","region","client_events","connection_counting","connection_count_events","watchlist_events","authorized_connections","status"],"properties":{"client_events":{"type":"boolean","description":"Allow clients to trigger events directly (client events)."},"connection_counting":{"type":"boolean","description":"Count the connections subscribed to each channel and expose the count on channel queries."},"connection_count_events":{"type":"boolean","description":"Broadcast connection-count events to public and private channel subscribers. Requires `connection_counting`. Presence channels do not emit these events; use a channel query to read their connection count."},"watchlist_events":{"type":"boolean","description":"Tell a signed-in member when the members on their watchlist come online or go offline. The watchlist is part of the identity your backend signs at signin."},"authorized_connections":{"type":"boolean","description":"Require every connection to be authorized."},"id":{"readOnly":true,"$ref":"#/components/schemas/RealtimeAppID"},"app_id":{"type":"integer","format":"int64","readOnly":true,"description":"The numeric Realtime app id. Use it together with a key and secret to initialize a Realtime client/server SDK. Immutable.","example":432557},"name":{"type":"string","minLength":1,"description":"A label for the app, shown wherever it is listed.","example":"chat-production"},"region":{"allOf":[{"$ref":"#/components/schemas/Region"}],"description":"The region this app runs in. Unlike other products, a Realtime app can be placed in a region other than the workspace's home region. Immutable after creation."},"status":{"type":"string","minLength":1,"readOnly":true,"enum":["active","suspended"],"description":"Lifecycle state of the app. `active` apps serve connections; `suspended` apps are provisioned but reject connections."}}}]},"RealtimeAppList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RealtimeApp"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"RealtimeAppConfig":{"type":"object","description":"Realtime app configuration flags. TLS is always enforced (non-TLS client connections are rejected) and is not configurable.","properties":{"client_events":{"type":"boolean","description":"Allow clients to trigger events directly (client events)."},"connection_counting":{"type":"boolean","description":"Count the connections subscribed to each channel and expose the count on channel queries."},"connection_count_events":{"type":"boolean","description":"Broadcast connection-count events to public and private channel subscribers. Requires `connection_counting`. Presence channels do not emit these events; use a channel query to read their connection count."},"watchlist_events":{"type":"boolean","description":"Tell a signed-in member when the members on their watchlist come online or go offline. The watchlist is part of the identity your backend signs at signin."},"authorized_connections":{"type":"boolean","description":"Require every connection to be authorized."}}},"RealtimeAppCreate":{"example":{"name":"chat-production","region":"eu1","connection_counting":true},"allOf":[{"$ref":"#/components/schemas/RealtimeAppConfig"},{"type":"object","additionalProperties":false,"required":["name","region"],"properties":{"name":{"type":"string","description":"A label for the app, shown wherever it is listed.","minLength":1,"maxLength":100,"example":"chat-production"},"region":{"allOf":[{"$ref":"#/components/schemas/Region"}],"description":"The region this app runs in. Unlike other products, a Realtime app can be placed in a region other than the workspace's home region. Immutable after creation."},"client_events":{"type":"boolean","default":false,"description":"Allow clients to trigger events directly (client events)."},"connection_counting":{"type":"boolean","default":false,"description":"Count the connections subscribed to each channel and expose the count on channel queries."},"connection_count_events":{"type":"boolean","default":false,"description":"Broadcast connection-count events to public and private channel subscribers. Requires `connection_counting`. Presence channels do not emit these events; use a channel query to read their connection count."},"watchlist_events":{"type":"boolean","default":false,"description":"Tell a signed-in member when the members on their watchlist come online or go offline. The watchlist is part of the identity your backend signs at signin."},"authorized_connections":{"type":"boolean","default":false,"description":"Require every connection to be authorized."}}}]},"RealtimeAppKeyID":{"type":"string","minLength":1,"pattern":"^rak_[0-9a-hjkmnp-tv-z]{26}$","example":"rak_01krdgeqcxet5s7t44vh8rt9mg"},"RealtimeAppKey":{"type":"object","additionalProperties":false,"required":["id","key","revoked_at","created_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/RealtimeAppKeyID"},"key":{"type":"string","minLength":1,"readOnly":true,"description":"The public app key clients use to connect.","example":"d0e95a856ddc1b09d4c8"},"secret":{"type":"string","readOnly":true,"x-sensitive":true,"description":"The key secret, used for server-side request signing. Returned only when the key is created, and never shown again: store it securely. If lost, create a new key and revoke this one.","example":"862925e1991a8b6902f9"},"revoked_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the key was revoked, or `null` if still active."},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true}}},"RealtimeAppCreated":{"allOf":[{"$ref":"#/components/schemas/RealtimeApp"},{"type":"object","required":["key"],"properties":{"key":{"readOnly":true,"description":"The app's initial key, including its one-time secret. Present in this create response only; the secret is never returned again.","allOf":[{"$ref":"#/components/schemas/RealtimeAppKey"}]}}}]},"RealtimeAppUpdate":{"example":{"name":"chat-production","connection_counting":true},"description":"Mutable Realtime app fields. Omitted fields are left unchanged. Region is immutable and TLS is always enforced, so neither appears here.","type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"A label for the app, shown wherever it is listed.","minLength":1,"maxLength":100,"example":"chat-production"},"client_events":{"type":"boolean","description":"Allow clients to trigger events directly (client events)."},"connection_counting":{"type":"boolean","description":"Count the connections subscribed to each channel and expose the count on channel queries."},"connection_count_events":{"type":"boolean","description":"Broadcast connection-count events to public and private channel subscribers. Requires `connection_counting`. Presence channels do not emit these events; use a channel query to read their connection count."},"watchlist_events":{"type":"boolean","description":"Tell a signed-in member when the members on their watchlist come online or go offline. The watchlist is part of the identity your backend signs at signin."},"authorized_connections":{"type":"boolean","description":"Require every connection to be authorized."}}},"RealtimeEventName":{"type":"string","minLength":1,"maxLength":200,"description":"The event name clients bind to. Application event names are free-form; the `bird:` and `bird_internal:` prefixes are reserved for the protocol and rejected.","example":"order-updated"},"RealtimeChannelName":{"type":"string","minLength":1,"maxLength":164,"pattern":"^[A-Za-z0-9_=@,.;-]+$","description":"A Realtime channel name. Only letters, digits, and _ - = @ , . ; Prefix with `private-` or `presence-` for authenticated channels, or `private-encrypted-` for channels whose payloads are end-to-end encrypted with a key only you hold.","example":"orders-42"},"RealtimeEventData":{"description":"Arbitrary JSON payload delivered as the event data: an object, array, or scalar. Cap: 10 KB serialized.","x-go-type-skip-optional-pointer":true},"RealtimeExcludeConnectionId":{"type":"string","minLength":1,"example":"123.4567","description":"Exclude this connection from delivery, to avoid echoing a change back to the client that triggered it. The value is the client's connection id, assigned when its connection is established."},"RealtimeChannelInclude":{"type":"string","enum":["member_count","connection_count"],"description":"A per-channel attribute to include in the response. `member_count` is presence-channels only; `connection_count` requires the app's connection-counting flag."},"RealtimePublish":{"type":"object","additionalProperties":false,"description":"A Realtime publish: delivers one event to one or more channels of the app. Listing several channels fans the event out to all of them (broadcast) in a single call.\n","required":["event","channels"],"properties":{"event":{"$ref":"#/components/schemas/RealtimeEventName"},"channels":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/RealtimeChannelName"},"description":"The channels to deliver the event to (up to 100 per call). Prefix with `private-` or `presence-` for authenticated channels. A `private-encrypted-` channel must be the only channel in its publish: each encrypted channel has its own key, so a fan-out would hand the other channels unreadable ciphertext.\n","example":["orders","orders-42"]},"data":{"$ref":"#/components/schemas/RealtimeEventData","type":["object","array","string","number","boolean","null"],"description":"The event payload, up to 10 KB serialized; null delivers a JSON null payload."},"exclude_connection_id":{"$ref":"#/components/schemas/RealtimeExcludeConnectionId"},"include":{"type":"array","items":{"$ref":"#/components/schemas/RealtimeChannelInclude"},"description":"Per-channel attributes to return alongside the publish, reflecting each channel's state at publish time. `member_count` is available only for presence channels. `connection_count` requires the app's connection-counting flag. Requesting attributes counts as one additional message toward usage."}}},"RealtimeChannelCounts":{"type":"object","description":"Per-channel counts, present only when requested via `include` and applicable.","properties":{"member_count":{"type":"integer","format":"int64","description":"Distinct members (presence channels only; requires `include=member_count`)."},"connection_count":{"type":"integer","format":"int64","description":"Connections currently subscribed to this channel (requires `include=connection_count` and the app's connection-counting flag). Channel-scoped: distinct from the app-wide peak connections metric."}}},"RealtimeChannelListItem":{"allOf":[{"$ref":"#/components/schemas/RealtimeChannelCounts"},{"type":"object","additionalProperties":false,"description":"One occupied channel. A listed channel is occupied by definition; counts appear only when requested via `include` and applicable.","required":["name"],"properties":{"name":{"$ref":"#/components/schemas/RealtimeChannelName"}}}]},"RealtimePublishResult":{"type":"object","additionalProperties":false,"description":"The result of a Realtime publish. The event was accepted and fanned out to the requested channels; delivery to connected clients is asynchronous.\n","properties":{"data":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/RealtimeChannelListItem"},"description":"Per-channel attributes at publish time, present only when the request asked for them via `include`; one item per distinct target channel, sorted by name."}}},"RealtimeBatchEvent":{"type":"object","additionalProperties":false,"description":"A single event published to one channel as part of a batch.","required":["event","channel"],"properties":{"event":{"$ref":"#/components/schemas/RealtimeEventName"},"channel":{"$ref":"#/components/schemas/RealtimeChannelName"},"data":{"$ref":"#/components/schemas/RealtimeEventData","type":["object","array","string","number","boolean","null"],"description":"The event payload, up to 10 KB serialized; null delivers a JSON null payload."},"exclude_connection_id":{"$ref":"#/components/schemas/RealtimeExcludeConnectionId"},"include":{"type":"array","items":{"$ref":"#/components/schemas/RealtimeChannelInclude"},"description":"Attributes of this event's channel to return alongside the publish (same semantics and validation errors as on the channel endpoints). Requesting attributes counts as one additional message toward usage."}}},"RealtimeBatchPublish":{"type":"object","additionalProperties":false,"description":"A batch of events, each delivered to a single channel, in one request.","required":["events"],"properties":{"events":{"type":"array","minItems":1,"maxItems":10,"description":"Up to 10 events per batch.","items":{"$ref":"#/components/schemas/RealtimeBatchEvent"}}}},"RealtimeBatchPublishResultItem":{"allOf":[{"$ref":"#/components/schemas/RealtimeChannelCounts"},{"type":"object","additionalProperties":false,"description":"Attributes of one batch item's channel at publish time. Items are positional: the n-th item corresponds to the n-th event in the request.","required":["channel"],"properties":{"channel":{"$ref":"#/components/schemas/RealtimeChannelName"}}}]},"RealtimeBatchPublishResult":{"type":"object","additionalProperties":false,"description":"The result of a Realtime batch publish. The events were accepted for delivery; delivery to connected clients is asynchronous.\n","properties":{"data":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/RealtimeBatchPublishResultItem"},"description":"Per-event channel attributes at publish time, present only when at least one event asked for them via `include`. Positional: one item per event, in request order."}}},"RealtimeChannelsList":{"type":"object","additionalProperties":false,"description":"The app's occupied channels. The Realtime service does not paginate this listing, so all occupied channels are returned in one response.","required":["data"],"properties":{"data":{"type":"array","description":"The occupied channels, sorted by name.","items":{"$ref":"#/components/schemas/RealtimeChannelListItem"}}}},"RealtimeChannelInfo":{"allOf":[{"$ref":"#/components/schemas/RealtimeChannelCounts"},{"type":"object","additionalProperties":false,"description":"State of a single channel. Counts appear only when requested and applicable.","required":["occupied"],"properties":{"occupied":{"type":"boolean","description":"Whether at least one client is subscribed."}}}]},"RealtimeMemberID":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._~!$&'()*+,;=:@-]+$","description":"An app-defined member ID for your application's end user, assigned when your auth server authorizes them. Use up to 128 URL-safe characters because member IDs appear directly in API request paths. The value can include `+ : @ . _ -`, but not `/ ? # %` or whitespace."},"RealtimeChannelMember":{"type":"object","additionalProperties":false,"description":"A member present on a presence channel.","required":["member_id"],"properties":{"member_id":{"$ref":"#/components/schemas/RealtimeMemberID"}}},"RealtimeChannelMembers":{"type":"object","additionalProperties":false,"description":"The members present on a presence channel.","required":["members"],"properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/RealtimeChannelMember"}}}},"RealtimeMemberPublish":{"type":"object","additionalProperties":false,"description":"An event addressed to one member rather than to a channel. Every connection that member currently holds receives it; if they hold none, the event is dropped.","required":["event"],"properties":{"event":{"$ref":"#/components/schemas/RealtimeEventName"},"data":{"$ref":"#/components/schemas/RealtimeEventData","type":["object","array","string","number","boolean","null"],"description":"The event payload, up to 10 KB serialized; null delivers a JSON null payload."}}},"RealtimeAppKeyList":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","description":"The app's keys, oldest first. Revoked keys are excluded unless `include_revoked`=`true`.","items":{"$ref":"#/components/schemas/RealtimeAppKey"}}}},"EmailMessageStatus":{"type":"string","minLength":1,"enum":["scheduled","accepted","processed","deferred","delivered","partial_failure","bounced","complained","rejected","canceled"],"description":"Aggregate delivery status of an email, derived from its recipients' states.\n\nIn flight:\n\n- `scheduled`: The message is queued to send at a future time and has not been dispatched yet.\n- `accepted`: The initial status of an immediate send. The message is queued for its recipients.\n- `processed`: Delivery is underway, so at least one recipient's message is on its way out and none has failed.\n- `deferred`: At least one recipient's mailbox provider asked for a retry, and delivery attempts continue.\n\nFinal:\n\n- `delivered`: Every recipient's mail server accepted the message.\n- `bounced`: Every recipient permanently failed (bounced or was rejected).\n- `rejected`: Every recipient was rejected before a delivery attempt (for example, all recipients were suppressed).\n- `partial_failure`: Some recipients permanently failed while others were delivered or are still in flight.\n- `canceled`: A scheduled message was canceled before it was sent.\n\n`complained` takes precedence over every other status: at least one recipient reported\nthe message as spam, regardless of what happened to the rest.\n"},"MessageReference":{"type":"string","minLength":1,"maxLength":255,"description":"Your own reference for a message, such as an order or ticket identifier. Several messages can share one.","example":"INV-1234"},"EmailMessageCategory":{"type":"string","minLength":1,"enum":["marketing","transactional"],"description":"Content classification, which controls suppression policy:\n\n- `marketing`: Blocks on all suppression reasons.\n- `transactional`: Allows delivery through complaint and unsubscribe suppressions, for receipts, password resets, and similar operational mail.\n"},"EmailID":{"type":"string","minLength":1,"pattern":"^em_[0-9a-hjkmnp-tv-z]{26}$","example":"em_01krdgeqcxet5s7t44vh8rt9mg"},"EmailAddress":{"type":"object","additionalProperties":false,"description":"An email address with an optional display name.","required":["email"],"properties":{"email":{"type":"string","format":"email","minLength":5,"description":"Email address.","example":"jane@acme.com"},"name":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\r\\n]+$","description":"Display name shown alongside the address in mail clients.","example":"Jane Doe"}}},"RecipientID":{"type":"string","minLength":1,"pattern":"^er_[0-9a-hjkmnp-tv-z]{26}$","example":"er_01krdgeqcxet5s7t44vh8rt9mg"},"LanguageTag":{"type":"string","minLength":2,"maxLength":35,"description":"A language tag in BCP-47 form, for example `en` or `pt-BR`.","example":"pt-BR"},"EmailTemplateVersionID":{"type":"string","minLength":1,"pattern":"^emv_[0-9a-hjkmnp-tv-z]{26}$","example":"emv_01krdgeqcxet5s7t44vh8rt9mg"},"Tag":{"type":"object","additionalProperties":false,"required":["name","value"],"description":"Structured key/value label attached to a message or a call. Use tags for low-cardinality filtering dimensions (category, experiment ID, template ID); they surface in the list filter of whatever carries them.\n\nOn a message they also surface in the event log and in webhook payloads, and a message can carry `metadata` beside them for arbitrary per-send context that does not need to be filterable. A call has none of those three: its tags are set on the wire when the call is placed, and the call record is the one place you read them back.\n\nWhatever carries the tags defines how many it may have. Tag names are unique: a send that repeats one is rejected, and on a call the first instance of a name wins.\n","properties":{"name":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z0-9_-]+$","description":"Tag name. ASCII letters, digits, underscore, and hyphen only. Case-sensitive. Maximum 32 characters.\n","example":"category"},"value":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$","description":"Tag value. ASCII letters, digits, underscore, and hyphen only. Case-sensitive. Maximum 64 characters.\n","example":"welcome"}}},"EmailAttachmentID":{"type":"string","minLength":1,"pattern":"^ea_[0-9a-hjkmnp-tv-z]{26}$","example":"ea_01krdgeqcxet5s7t44vh8rt9mg"},"EmailAttachmentRef":{"type":"object","additionalProperties":false,"required":["filename","size"],"description":"Attachment metadata returned on API reads. Download the file during its retention window with `GET /v1/email/messages/{message_id}/attachments/{attachment_id}`.\n","properties":{"id":{"readOnly":true,"description":"Attachment ID, stable per email send.","$ref":"#/components/schemas/EmailAttachmentID"},"filename":{"type":"string","minLength":1,"description":"Filename as shown to the recipient.","example":"invoice.pdf"},"content_type":{"type":"string","description":"Resolved MIME type at send time.","example":"application/pdf"},"size":{"type":"integer","minimum":0,"description":"Decoded size in bytes.","example":215432},"inline":{"type":"boolean","description":"True when the attachment was sent inline via a `content_id` reference in the HTML body, false for regular file attachments.\n","example":false},"content_id":{"type":["string","null"],"description":"The Content-ID set at send time, when the attachment was inline."}}},"EmailMessage":{"type":"object","description":"An email message, including a recipient's copy of a broadcast. `broadcast_id` identifies the broadcast that sent the message and is absent for other sends. A broadcast records one message per recipient; these copies share the same `broadcast_id`.\n","additionalProperties":false,"required":["id","from","to","subject","category","status","accepted_count","processed_count","delivered_count","bounced_count","complained_count","deferred_count","rejected_count","open_count","click_count","track_opens","track_clicks","created_at"],"example":{"id":"em_01krdgeqcxet5s7t44vh8rt9mg","from":{"email":"onboarding@messagebird.dev","name":"Bird"},"to":[{"email":"delivered@messagebird.dev"}],"subject":"Hello from Bird","category":"marketing","status":"accepted","broadcast_id":"eb_01krdgeqcxet5s7t44vh8rt9mg","accepted_count":1,"processed_count":0,"delivered_count":0,"bounced_count":0,"complained_count":0,"deferred_count":0,"rejected_count":0,"open_count":0,"click_count":0,"track_opens":false,"track_clicks":false,"created_at":"2026-07-01T12:00:00Z","brand_id":null},"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/EmailID","description":"Message ID."},"from":{"$ref":"#/components/schemas/EmailAddress","description":"Sender address. `name` is present when a display name was provided on the send."},"to":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddress"},"minItems":1,"maxItems":50,"description":"Primary recipients. Length is the recipient count. Use the broadcasts endpoint for audience-targeted sends. Each entry's `name` is present when a display name was provided on the send."},"cc":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddress"},"description":"CC recipients."},"bcc":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddress"},"description":"BCC recipients."},"subject":{"type":"string","minLength":1,"description":"The resolved subject. For a template send with recipient snapshots, this is the subject accepted for the first To recipient in the original request. It remains available when body storage is disabled. Legacy messages use their message-wide subject and caller parameters. For sends with recipient snapshots, `subject_recipient_id` identifies the recipient represented by `subject` and is present for scheduled and canceled messages too.\n"},"subject_recipient_id":{"readOnly":true,"$ref":"#/components/schemas/RecipientID","description":"Recipient represented by subject. Present for template sends with recipient snapshots, including scheduled and canceled messages."},"category":{"$ref":"#/components/schemas/EmailMessageCategory"},"reply_to":{"type":["array","null"],"items":{"$ref":"#/components/schemas/EmailAddress"},"maxItems":25,"description":"Reply-To addresses, if set on the send. Empty/null when no Reply-To was provided."},"status":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailMessageStatus"}]},"accepted_count":{"type":"integer","readOnly":true,"default":0,"description":"How many recipients are in the `accepted` state, meaning we have the message and are getting ready to deliver it."},"processed_count":{"type":"integer","readOnly":true,"default":0,"description":"How many recipients the message has been prepared for and queued for delivery."},"delivered_count":{"type":"integer","readOnly":true,"default":0,"description":"How many recipients' messages were accepted by their mail server."},"bounced_count":{"type":"integer","readOnly":true,"default":0,"description":"Number of recipients that resulted in a permanent delivery failure."},"complained_count":{"type":"integer","readOnly":true,"default":0,"description":"Number of recipients that reported spam."},"deferred_count":{"type":"integer","readOnly":true,"default":0,"description":"Number of recipients in transient delivery deferral. Their mail server asked for a retry, and delivery attempts continue."},"rejected_count":{"type":"integer","readOnly":true,"default":0,"description":"Number of recipients rejected before delivery. Read the per-recipient `rejection_reason` field on `GET /v1/email/messages/{message_id}/recipients` for the specific cause.\n"},"processing_latency_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"Time between the send being accepted and the message being prepared for delivery, in milliseconds, for the fastest recipient. Null until the first recipient reaches `processed`.\n"},"delivery_latency_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"Time between the message being processed and the receiving mail server accepting it, in milliseconds, for the fastest delivered recipient. Null until the first recipient is delivered.\n"},"total_latency_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"End-to-end accept → delivered time for the fastest delivered recipient, in milliseconds. Null until the first recipient is delivered.\n"},"open_count":{"type":"integer","readOnly":true,"default":0,"description":"Total open events across all recipients."},"click_count":{"type":"integer","readOnly":true,"default":0,"description":"Total click events across all recipients."},"requested_language":{"oneOf":[{"$ref":"#/components/schemas/LanguageTag"},{"type":"null"}],"readOnly":true,"description":"The template language this send asked for, in canonical form (`pt-BR` for a request of `pt-br`). Null when the send named no language (it took the template's default) or used no template at all. Compare it with `resolved_language`: when they differ, the language you asked for was not available and the template's `on_missing_language` policy chose the one shown there instead.\n"},"resolved_language":{"oneOf":[{"$ref":"#/components/schemas/LanguageTag"},{"type":"null"}],"readOnly":true,"description":"The template language this send was actually delivered in, in canonical form. Null when the send used no template. A non-null value with a null `requested_language` means the send named no language and took the template's default.\n"},"template_id":{"oneOf":[{"$ref":"#/components/schemas/EmailTemplateID"},{"type":"null"}],"readOnly":true,"description":"The template this send rendered from, or null for a send that supplied its content inline.\n"},"template_version_id":{"oneOf":[{"$ref":"#/components/schemas/EmailTemplateVersionID"},{"type":"null"}],"readOnly":true,"description":"The exact template version this send rendered from, or null for an inline send. A template's live version changes every time you submit it, so this identifies the source of the send, together with `resolved_language`. Reading that version later does not reproduce the delivered wording when the template links a reusable block, because the block shows its latest published content. The stored message content holds the delivered body while it is available.\n"},"broadcast_id":{"$ref":"#/components/schemas/EmailBroadcastID","readOnly":true,"description":"The broadcast that sent this message. Absent for a send that was not part of a broadcast. A broadcast records one message per recipient, and every one of them carries the same value here.\n"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"},"description":"Labels on this message, each one a `name` and a `value`, that you can filter and search messages by. Use tags for anything you want to find messages by later, and `metadata` for data you only want handed back to you."},"metadata":{"type":"object","description":"Any JSON you kept on the message. We store it and hand it back in webhook payloads, and that is all it does. If you want to search or filter by it, use `tags` instead.","additionalProperties":true},"reference":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/MessageReference"}],"description":"The `reference` from the send request. Absent when the send set none."},"parameters":{"type":["object","null"],"additionalProperties":true,"readOnly":true,"description":"Public substitution values used for the subject and message bodies, whether supplied inline or through a template. Reserved internal keys and the exact top-level `bird_unsub_token` key are omitted, even if caller-supplied. Returns null when no public values remain.\n"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/EmailAttachmentRef"},"description":"Attachment metadata for the send. Empty when no attachments were included. Raw content is not echoed. When content storage is enabled, download an attachment by its `id` via the message's attachment endpoint."},"track_opens":{"type":"boolean","description":"Whether open tracking is enabled for this send."},"track_clicks":{"type":"boolean","description":"Whether click tracking is enabled for this send."},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the send request was accepted."},"thread_id":{"type":["string","null"],"readOnly":true,"pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"Thread this message belongs to, or null when the message is not part of one."},"in_reply_to_message_id":{"readOnly":true,"description":"The message this one is a reply to, if any.","oneOf":[{"$ref":"#/components/schemas/EmailID"},{"type":"null"}]},"delivered_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When all recipients reached a terminal delivered state, or null if not yet fully delivered."},"scheduled_at":{"type":"string","format":"date-time","readOnly":true,"description":"When this message is scheduled to send, for a send created with a future send time. Absent for an immediate send. Stays set after the scheduled send fires."},"brand_id":{"oneOf":[{"$ref":"#/components/schemas/BrandID"},{"type":"null"}],"readOnly":true,"description":"The business whose email preferences and unsubscribe page apply.\n"}}},"EmailMessageList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of message objects.","items":{"$ref":"#/components/schemas/EmailMessage"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"EmailAddressInput":{"description":"A sender or recipient address. Accepts a plain email string (`jane@acme.com`), an RFC 5322 mailbox string with an embedded display name (`Jane Doe <jane@acme.com>`), or an object carrying the address and an optional display name. All forms can be mixed freely within one request. Responses always return the object form.\n","oneOf":[{"type":"string","minLength":5,"maxLength":998,"pattern":"^[^\\r\\n]+$","title":"Email string","description":"Email address, optionally in RFC 5322 mailbox form with an embedded display name.","example":"Jane Doe <jane@acme.com>"},{"$ref":"#/components/schemas/EmailAddress"}]},"EmailTemplateSend":{"type":"object","additionalProperties":false,"description":"A reference to the template to send. Identify the template by its `id` or its `slug`, supplying exactly one of the two, and give the values for its caller parameters in `parameters`.\n","oneOf":[{"required":["id"]},{"required":["slug"]}],"properties":{"id":{"description":"The template to send, by its id.","$ref":"#/components/schemas/EmailTemplateID"},"slug":{"allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"description":"The template to send, by its slug handle. A workspace template (for example `welcome-email`) or a built-in `system` template (for example `bird_welcome`).","example":"welcome-email"},"language":{"$ref":"#/components/schemas/LanguageTag","description":"Which of the template's languages to send. Omit it to send the template's default language, unless the template sets `language_source_required`, in which case a send naming no language is rejected. When the template does not have the language you ask for, its own `on_missing_language` setting decides whether the closest available language is sent instead or the send is rejected.\n"},"parameters":{"type":"object","additionalProperties":true,"description":"Values for the template's caller parameters, keyed by single-word name. Caller parameters are those with `system` false or absent in the template's `variables`. Supply every required one the resolved language uses; omitting one or sending `null` returns `422`, and values the resolved language does not use are ignored. The `bird` namespace is reserved, so a send that sets it is rejected, and the object is capped at 16 KB serialized.\n\nReferenced `bird.contact` attributes come from each To recipient's contact in this workspace, so each To receives its own email, and Cc and Bcc receive a copy of each without needing a contact of their own. A To with no contact rejects the send with `422` (`E04099`), even when Liquid sets a default or condition. Empty name fields on an existing contact render empty unless Liquid supplies a default, and configured contact-property fallbacks still apply. Values are saved at acceptance and reused for delivery and content history, for individual, batch and scheduled sends alike.","example":{"animal":"otter"}}}},"EmailAttachment":{"type":"object","additionalProperties":false,"required":["filename","content"],"description":"A file attached to an email. Put the base64-encoded bytes in `content` and the\nrecipient-facing name in `filename`. To show an image inline, set `content_id`\nand reference it from the HTML body with `<img src=\"cid:...\"/>`.\n\nThe generated message is limited to 20 MB across the HTML body, text body,\nattachments, and inline images after base64 and MIME encoding. Keep raw\nattachment content at or below 15 MB to leave room for encoding and the body.\n\nBatch sends apply the same 20 MB limit to each message and to the full request\nbody. Executable and script content types are rejected.\n","properties":{"filename":{"type":"string","minLength":1,"maxLength":255,"description":"The name the recipient sees on the attachment.","example":"invoice.pdf"},"content":{"type":"string","format":"byte","minLength":1,"description":"Base64-encoded file bytes. The encoded value and MIME wrapping count toward the 20 MB message limit."},"content_type":{"type":"string","description":"The file's MIME type. If omitted, the API infers it from the extension in `filename`. The API rejects executable and script types based on this value.","example":"application/pdf"},"content_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._-]+$","description":"An RFC 2392 Content-ID for an inline file. Reference it from the HTML body with `<img src=\"cid:{content_id}\"/>`. Omit it to send a downloadable attachment.","example":"invoice-logo"}}},"EmailMessageSendRequest":{"type":"object","additionalProperties":false,"required":["from","to"],"properties":{"from":{"$ref":"#/components/schemas/EmailAddressInput","description":"Sender address, as a plain email string, an RFC 5322 mailbox string (`Jane <jane@acme.com>`), or an object with an optional display name. Must be from a verified domain in this workspace."},"to":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddressInput"},"minItems":1,"maxItems":50,"description":"Primary recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@acme.com>`), or an object with an optional display name."},"cc":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddressInput"},"maxItems":50,"description":"CC recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@acme.com>`), or an object with an optional display name."},"bcc":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddressInput"},"maxItems":50,"description":"BCC recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@acme.com>`), or an object with an optional display name."},"subject":{"type":"string","minLength":1,"maxLength":998,"description":"Message subject line. Required for inline sends. Omit it when sending a `template` (the template supplies the subject)."},"html":{"type":"string","maxLength":524288,"description":"HTML body. At least one of html or text must be provided."},"text":{"type":"string","maxLength":524288,"description":"Plain-text body. At least one of html or text must be provided."},"reply_to":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddressInput"},"minItems":1,"maxItems":25,"description":"Reply-To addresses, each a plain email string, an RFC 5322 mailbox string, or an object with an optional display name. RFC 5322 allows multiple. Every recipient reply hits all listed addresses, so 1-2 is typical. The 25 cap exists to prevent header sizes that some receiving mail servers reject.\n"},"headers":{"type":"object","maxProperties":25,"additionalProperties":{"type":"string","maxLength":998},"description":"Custom email headers, such as `References`, `In-Reply-To`, and `X-*` headers. Reserved headers and values containing carriage returns or line feeds return `422`. Set addressing and subject through their dedicated fields. Transactional sends accept `List-Unsubscribe` and `List-Unsubscribe-Post`. Marketing sends use Bird-managed unsubscribe by default.\n"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"},"maxItems":20,"description":"Structured `{name, value}` labels, up to 20 per send. You can filter the list endpoint by tag name, slice analytics by tag, and read them in webhook payloads. Use them for low-cardinality dimensions such as `category`, `experiment_variant` or `template_id`, and `metadata` for context you do not filter by."},"metadata":{"type":"object","description":"JSON object returned on reads and in webhook payloads, up to 2 KB serialized. Analytics can query its paths, such as `metadata.order_id`, but the dashboard cannot filter by it. Use it for per-send context such as order IDs and customer references, and `tags` for low-cardinality labels you filter by.","additionalProperties":true},"reference":{"allOf":[{"$ref":"#/components/schemas/MessageReference"}],"description":"An identifier you want to find this message by, such as an order or ticket number, matched exactly by the message list's `reference` filter. Set it only when you need to search on it, and put any other data in `metadata`. Stored on the message, returned on reads and echoed in webhook payloads. Several messages can share one.\n"},"parameters":{"type":"object","description":"Values for the Liquid tokens in inline content, shared by every recipient: `{{ animal }}` takes the `animal` value, and a missing value renders empty. Include the object, even as `{}`, to render Liquid, or omit it to leave tokens unchanged. Names are single words other than `bird`, and the object is capped at 16 KB serialized. A stored template takes `template.parameters` instead. [Inline personalization](https://bird.com/docs/guides/email/sending-email#content) covers validation and URL encoding.","additionalProperties":true},"template":{"allOf":[{"$ref":"#/components/schemas/EmailTemplateSend"}],"description":"Send a stored template instead of inline content. When set, omit `subject`, `html` and `text`, because the template supplies them. Personalize with `template.parameters`. Add `scheduled_at` to send it later.\n"},"track_opens":{"type":"boolean","default":true,"description":"Whether to track open events for this message."},"track_clicks":{"type":"boolean","default":true,"description":"Whether to track click events for this message."},"ip_pool_id":{"type":"string","pattern":"^ipp_([0-9a-hjkmnp-tv-z]{26}|shared)$","description":"ID of the IP pool to send from (`ipp_` prefix), or `ipp_shared` to route through the shared pool explicitly. Omit to use the sending domain's default pool in this workspace, or the organization's default when the domain has none. An unknown pool, or a pool with no dedicated IPs available to send from, is rejected with a `422`.\n"},"category":{"$ref":"#/components/schemas/EmailMessageCategory","default":"marketing","description":"Content classification, which sets the suppression policy:\n\n- `marketing`: blocked by every suppression reason. A send with no template and no category defaults to it.\n- `transactional`: delivered through complaint and unsubscribe suppressions, for receipts, password resets and similar operational mail.\n\nA `template` send that omits it takes the template's classification. Set it to classify one send differently from its template; it always takes precedence."},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/EmailAttachment"},"maxItems":20,"description":"Files to attach, up to 20 per message. A generated message is capped at 20 MB, and a send over it is refused. The cap counts the HTML and text bodies and every attachment and inline image after base64 encoding, which adds about a third, so 15 MB of raw files uses most of it. Each batch item has the same cap, and the whole request body is capped at 20 MB too."},"scheduled_at":{"type":"string","format":"date-time","description":"Send at this future time instead of immediately, at least 30 seconds and at most 30 days ahead; outside that range returns `422`. The message returns `accepted` and reads as `scheduled` until it sends, and the message cancel endpoint cancels it before then. Scheduled sends count against your plan's monthly scheduled-email allowance, and a send over it returns `422`. A stored template's published version, language and parameter values are pinned at acceptance, so a later publication does not change what sends; deleting the template before the message is due rejects it with `generation_failure`. Sender eligibility and send-volume allowance are checked again when it is due. Bodies and attachment contents count toward the same 20 MB message limit as an immediate send. The rest of the request, such as recipients, `headers`, `metadata`, parameters and attachment file names, shares a separate 31 KB limit, and a send over it returns `422`. Batch items take this field too, so one batch can mix scheduled and immediate messages."},"brand_id":{"oneOf":[{"$ref":"#/components/schemas/BrandID"},{"type":"null"}],"description":"Selects the business whose email preferences and unsubscribe page apply; omission or null selects the workspace's default Brand. The selection stays fixed for scheduled sends and retries. An explicit ID must belong to this workspace and must not be archived. An unknown, foreign or archived Brand returns `422`."}},"example":{"from":"Acme Support <noreply@acme.com>","to":["Jane Doe <delivered@messagebird.dev>"],"cc":["manager@acme.com"],"reply_to":["support@acme.com"],"subject":"Welcome aboard","html":"<h1>Hi there 👋</h1>","text":"Hi there","headers":{"X-Campaign":"spring-2026"},"tags":[{"name":"category","value":"welcome"}],"metadata":{"user_id":"usr_12345"},"category":"transactional","track_clicks":false}},"EmailMessageBatchRequest":{"type":"object","additionalProperties":false,"description":"Batch of email message send requests.","required":["messages"],"properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/EmailMessageSendRequest"},"minItems":1,"maxItems":100,"description":"Email message send requests, up to 100. All items are validated before any are queued. Attachments are allowed on individual messages. Each message must stay within the 20 MB estimated generated message-size cap. The serialized JSON request body for the batch has a hard 20 MB cap.\n"}},"example":{"messages":[{"from":{"email":"noreply@acme.com","name":"Acme Support"},"to":[{"email":"delivered@messagebird.dev","name":"Jane Doe"}],"subject":"Your receipt for order #1234","text":"Thanks for your purchase! Your receipt is attached."},{"from":{"email":"noreply@acme.com","name":"Acme Support"},"to":[{"email":"delivered@messagebird.dev","name":"John Roe"}],"subject":"Your receipt for order #1235","text":"Thanks for your purchase! Your receipt is attached."}]}},"EmailMessageBatchItem":{"type":"object","additionalProperties":false,"required":["id","status","category"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/EmailID","description":"Message ID assigned to this batch item."},"status":{"type":"string","minLength":1,"readOnly":true,"enum":["accepted"],"description":"Initial status of this message in the batch."},"category":{"type":"string","minLength":1,"enum":["marketing","transactional"],"description":"Resolved category for this batch item."},"requested_language":{"oneOf":[{"$ref":"#/components/schemas/LanguageTag"},{"type":"null"}],"readOnly":true,"description":"The template language this item asked for, in canonical form. Null when the item named no language or used no template. Every item in a batch resolves its own template reference, so this and `resolved_language` can differ from item to item.\n"},"resolved_language":{"oneOf":[{"$ref":"#/components/schemas/LanguageTag"},{"type":"null"}],"readOnly":true,"description":"The template language this item was actually delivered in, in canonical form. Null when the item used no template. A value here differing from `requested_language` means the template did not have the language asked for and its `on_missing_language` policy chose this one.\n"},"template_id":{"oneOf":[{"$ref":"#/components/schemas/EmailTemplateID"},{"type":"null"}],"readOnly":true,"description":"The template this item rendered from, or null for an item that supplied its content inline.\n"},"template_version_id":{"oneOf":[{"$ref":"#/components/schemas/EmailTemplateVersionID"},{"type":"null"}],"readOnly":true,"description":"The exact template version this item rendered from, or null for an inline item. Record it to know which version a message came from: a template's live version changes every time you submit it. Reading that version later does not reproduce the delivered wording when the template links a reusable block, because the block shows its latest published content. The stored message content holds the delivered body while it is available.\n"},"scheduled_at":{"type":"string","format":"date-time","readOnly":true,"description":"When this item is scheduled to send, for an item created with a future send time. Absent for an item that sends immediately.\n"},"brand_id":{"oneOf":[{"$ref":"#/components/schemas/BrandID"},{"type":"null"}],"readOnly":true,"description":"The business whose email preferences and unsubscribe page apply.\n"}}},"EmailMessageBatchResponse":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailMessageBatchItem"},"description":"One entry per message in the batch, in submission order."}}},"RecipientRole":{"type":"string","minLength":1,"enum":["to","cc","bcc"],"description":"Envelope position of a recipient on an outbound email event.","example":"to"},"EmailRecipient":{"type":"object","description":"One email delivery. For a contact-personalized template send, `copy_of_recipient_id` links a Cc or Bcc delivery to the To recipient whose saved values it carries. Each Cc and Bcc address receives one copy per To recipient. Its visible To header uses that To mailbox unless a different visible mailbox was specified for this copy. The link is absent for To recipients and sends without personalized copies.","additionalProperties":false,"required":["id","parent_id","role","recipient","status","open_count","click_count"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/RecipientID","description":"Recipient ID."},"parent_id":{"$ref":"#/components/schemas/EmailID","description":"ID of the message this recipient belongs to. For a message send, this is the message's own `em_`-prefixed ID. For a broadcast, it is the `em_`-prefixed ID of the copy addressed to this recipient. Read either one with [Get an email message](/docs/api/reference/get-email-message), which answers 404 for a broadcast copy the send has not recorded. No recipient status distinguishes a copy the send recorded from one it did not."},"role":{"$ref":"#/components/schemas/RecipientRole","description":"How this recipient appeared in the send request."},"recipient":{"type":"string","format":"email","minLength":5,"description":"Recipient email address.","example":"delivered@messagebird.dev"},"name":{"type":["string","null"],"description":"Display name provided for this recipient on the send, or null if none was given."},"subject":{"type":"string","readOnly":true,"description":"Resolved subject accepted for this recipient, available independently of body storage. Legacy messages report their message-wide subject. Omitted if a retained recipient snapshot is unavailable."},"copy_of_recipient_id":{"readOnly":true,"$ref":"#/components/schemas/RecipientID","description":"For a Cc or Bcc recipient of a template send personalized with contact data, the To recipient whose personalized message this copy carries. Each Cc and Bcc recipient receives one copy per To recipient, with that To's values and its own delivery status. The visible To header uses that To mailbox unless a different visible mailbox was specified for this copy. Absent for To recipients and for sends not personalized per To recipient."},"status":{"type":"string","minLength":1,"readOnly":true,"enum":["accepted","processed","deferred","delivered","bounced","complained","rejected"],"x-enum-varnames":["EmailRecipientStatusAccepted","EmailRecipientStatusProcessed","EmailRecipientStatusDeferred","EmailRecipientStatusDelivered","EmailRecipientStatusBounced","EmailRecipientStatusComplained","EmailRecipientStatusRejected"],"description":"Delivery status for this recipient:\n\n- `accepted`: The send has been taken and is being prepared for delivery.\n- `processed`: This recipient's message is on its way out.\n- `deferred`: The recipient's mailbox provider asked for a retry, and delivery attempts continue.\n- `delivered`: The recipient's mail server accepted the message.\n- `bounced`: Delivery permanently failed (see `bounce_type` for hard vs soft).\n- `complained`: The recipient reported the message as spam.\n- `rejected`: Delivery was never attempted. Check `rejection_reason`, or the message status for a schedule canceled before delivery.\n"},"rejection_reason":{"type":["string","null"],"readOnly":true,"enum":["recipient_suppressed","transmission_failed","generation_failure","policy_rejection","domain_unverified","quota_exceeded","recipient_not_allowed","workspace_suspended",null],"description":"Present on `status: rejected` rows. Specifies why the recipient was rejected:\n\n- `recipient_suppressed`: The recipient is on the workspace suppression list, so\n  delivery was never attempted.\n- `transmission_failed`: The message could not be transmitted for delivery.\n- `generation_failure`: The message could not be built for delivery (template or\n  content issue).\n- `policy_rejection`: The message was refused by sending policy.\n- `domain_unverified`: The sending domain was not verified.\n- `quota_exceeded`: The organization's send quota was reached.\n- `recipient_not_allowed`: A recipient was not permitted for this send (for shared\n  onboarding-domain sends, recipients must be verified workspace members).\n- `workspace_suspended`: The workspace is suspended, so this mail was not sent and will not be sent after reactivation. Contact Bird support to reactivate the workspace.\n"},"bounce_type":{"type":["string","null"],"readOnly":true,"enum":["hard","soft","undetermined","admin","block",null],"description":"Bounce classification for `bounced` and `deferred` rows, or null when the recipient\nhas not bounced or the receiving server's response has not been classified.\n\n- `hard`: a permanent failure (invalid address or non-existent domain).\n- `soft`: a transient failure (mailbox full or server temporarily unavailable).\n- `block`: the receiving mail server blocked the sending IP for reputation reasons.\n- `admin`: an administrative refusal (relaying denied or blocklisted domain).\n- `undetermined`: the receiving server's response is ambiguous.\n"},"bounce_code":{"type":["string","null"],"readOnly":true,"description":"SMTP reply code returned by the receiving mail server for `bounced` and `deferred` rows, or null when none was provided.","example":"550"},"bounce_description":{"type":["string","null"],"readOnly":true,"description":"Human-readable reason the receiving mail server gave for the bounce or deferral, or null when none was provided.","example":"5.1.1 Unknown user"},"processed_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the message was prepared and queued for delivery to the recipient's mail server, or null if that has not happened yet."},"delivered_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the recipient's mail server accepted the message, or null if not yet delivered."},"processing_latency_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"Time between the send being accepted and the message being prepared for delivery, in milliseconds. Null until processed."},"delivery_latency_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"Time between the message being prepared and the receiving mail server accepting it, in milliseconds. Null until delivered."},"total_latency_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"End-to-end accept → delivered time for this recipient, in milliseconds. Null until delivered."},"open_count":{"type":"integer","readOnly":true,"default":0,"description":"Number of open events for this recipient.","example":0},"click_count":{"type":"integer","readOnly":true,"default":0,"description":"Number of click events for this recipient.","example":0}}},"EmailRecipientList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of recipient objects for this email send.","items":{"$ref":"#/components/schemas/EmailRecipient"}},"next":{"type":"array","readOnly":true,"description":"What to do next, given what this page reports. Present only where the read computes it: an\nempty list means the answer you were looking for is here and there is nothing further to\ndo. Absent entirely on reads that do not report next actions.\n","items":{"$ref":"#/components/schemas/NextAction"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"EmailEventType":{"type":"string","minLength":1,"description":"Type of an event in a message's per-recipient delivery timeline.\n\n- `email.scheduled`: We accepted a send scheduled for a future time. Fires once for each message regardless of its recipient count.\n- `email.accepted`: We accepted the send and are getting ready to deliver it. Fires once per requested recipient.\n- `email.processed`: We queued the message for delivery to the recipient's mail server.\n- `email.deferred`: The recipient's mail server temporarily refused the message. Delivery remains pending and is retried. Can fire more than once per recipient.\n- `email.delivered`: The recipient's mail server accepted the message.\n- `email.bounced`: Delivery permanently failed at the recipient's mail server.\n- `email.out_of_band_bounce`: A bounce notification arrived after the message had already been accepted for delivery.\n- `email.rejected`: We rejected the message before attempting delivery, for example because the recipient is suppressed.\n- `email.canceled`: A scheduled send was canceled before it fired. Fires once for each message regardless of its recipient count.\n- `email.opened`: The recipient opened the message. Can fire more than once per recipient.\n- `email.clicked`: The recipient clicked a tracked link in the message. Can fire more than once per recipient.\n- `email.unsubscribed`: The recipient opted out through a tracked unsubscribe link in the message.\n- `email.list_unsubscribed`: The recipient opted out through the one-click unsubscribe control in their mail client.\n- `email.complained`: The recipient reported the message as spam through their mailbox provider.\n\nWe can add new event types to this list over time, so treat a value you do not recognize as a new type rather than as an error.\n","x-extensible-enum":["email.accepted","email.bounced","email.canceled","email.clicked","email.complained","email.deferred","email.delivered","email.list_unsubscribed","email.opened","email.out_of_band_bounce","email.processed","email.rejected","email.scheduled","email.unsubscribed"],"example":"email.delivered"},"EmailEvent":{"type":"object","additionalProperties":false,"required":["id","type","occurred_at","recipient_id"],"properties":{"id":{"type":"string","minLength":1,"readOnly":true,"pattern":"^ev_[0-9a-hjkmnp-tv-z]{26}$","description":"Event ID.","example":"ev_01krdgeqcxet5s7t44vh8rt9mg"},"type":{"$ref":"#/components/schemas/EmailEventType","description":"The event's type. `email.processed`, for example, means the message has been processed and queued for delivery.\n"},"occurred_at":{"type":"string","format":"date-time","minLength":1,"description":"When this event occurred.","example":"2026-07-01T12:00:03Z"},"recipient_id":{"$ref":"#/components/schemas/RecipientID","description":"Recipient this event applies to."},"bounce_type":{"type":["string","null"],"enum":["hard","soft","undetermined","admin","block",null],"description":"Bounce classification. Present on `email.bounced`, `email.out_of_band_bounce`, and\n`email.deferred` events.\n\n- `hard`: a permanent failure (invalid address or non-existent domain).\n- `soft`: a transient failure (mailbox full or server temporarily unavailable).\n- `block`: the receiving mail server blocked the sending IP for reputation reasons.\n- `admin`: an administrative refusal (relaying denied or blocklisted domain).\n- `undetermined`: the receiving server's response is ambiguous.\n"},"bounce_class":{"type":["integer","null"],"minimum":1,"maximum":255,"description":"A more detailed numeric bounce code, useful for telling apart failures that share the same `bounce_type`. For example, a DNS failure and a spam block can both come through as `bounce_type: soft` or `bounce_type: block`; this field tells you which one actually happened. Present on `email.bounced`, `email.out_of_band_bounce`, and `email.deferred` events.\n"},"bounce_code":{"type":["string","null"],"description":"SMTP status code returned by the receiving mail server. Present on `email.bounced` and `email.deferred` events.\n","example":"5.1.1"},"bounce_description":{"type":["string","null"],"description":"The bounce reason, in plain language, as reported by the mail server. Present on `email.bounced` and `email.deferred` events."},"rejection_reason":{"type":["string","null"],"enum":["recipient_suppressed","transmission_failed","generation_failure","policy_rejection","domain_unverified","quota_exceeded","recipient_not_allowed","workspace_suspended",null],"description":"Specific cause of rejection. Present on `email.rejected` events only.\n\n- `recipient_suppressed`: The recipient is on the workspace suppression list.\n- `transmission_failed`: The message could not be transmitted for delivery.\n- `generation_failure`: The message could not be built for delivery, because of a template or content issue.\n- `policy_rejection`: The message was refused by sending policy.\n- `domain_unverified`: The sending domain was not verified.\n- `quota_exceeded`: The organization's send quota was reached.\n- `recipient_not_allowed`: This recipient was not allowed for this send. For a send from the shared onboarding domain, every recipient has to be a verified member of the workspace.\n- `workspace_suspended`: The workspace is suspended, so this mail was not sent and will not be sent after reactivation. Contact Bird support to reactivate the workspace.\n"},"sending_ip":{"type":["string","null"],"description":"The IP address used to send this message. Useful for spotting a deliverability problem that is tied to one specific sending IP rather than affecting all of them. Present on `email.delivered`, `email.bounced`, `email.out_of_band_bounce`, and `email.deferred` events.\n"},"mailbox_provider":{"type":["string","null"],"description":"The recipient mailbox provider, as a lowercased classifier bucket (e.g. `gmail`, `yahoo`, `microsoft`, `apple`). Present on `email.processed`, `email.delivered`, `email.complained`, `email.bounced`, `email.out_of_band_bounce`, `email.deferred`, `email.rejected`, `email.unsubscribed`, `email.list_unsubscribed`, `email.opened`, and `email.clicked` events when the receiving mail system could be classified; null when it could not.\n"},"mailbox_provider_region":{"type":["string","null"],"description":"The provider region, as reported by the receiving mail system (for example `NA`, `EU`, `APAC`). The set is open and provider-specific. Present on `email.processed`, `email.delivered`, `email.complained`, `email.bounced`, `email.out_of_band_bounce`, `email.deferred`, `email.rejected`, `email.unsubscribed`, `email.list_unsubscribed`, `email.opened`, and `email.clicked` events when reported; null otherwise.\n"},"is_prefetched":{"type":["boolean","null"],"description":"True when the open was auto-fetched by an inbox privacy feature (Apple Mail Privacy Protection, the Gmail image proxy) rather than a person actually opening the message. Use it to calculate open rate accurately. Present on `email.opened` events only.\n"},"url":{"type":["string","null"],"description":"The clicked URL. Present on `email.clicked` events, and on `email.unsubscribed` events when the recipient unsubscribed through a link in the message."},"link_name":{"type":["string","null"],"description":"The clicked link's own name, when the link in the message carried one, so a click can be reported by what the link said rather than where it pointed. Absent when the link had no name. Appears alongside `url` on `email.clicked` events, and on `email.unsubscribed` events when the recipient unsubscribed through a link.","example":"Faster exports, docs"},"country":{"type":["string","null"],"minLength":2,"maxLength":2,"description":"ISO 3166-1 alpha-2 country code derived from the client IP. Present on `email.opened` and `email.clicked` events when available.","example":"US"},"ip_address":{"type":["string","null"],"description":"Client IP address (IPv4 or IPv6). Present on `email.opened` and `email.clicked` events when available."},"user_agent":{"type":["string","null"],"description":"Client user-agent string. Present on `email.opened` and `email.clicked` events when available."}}},"EmailEventList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of timeline events for this email send, in chronological order.","items":{"$ref":"#/components/schemas/EmailEvent"}},"next":{"type":"array","readOnly":true,"description":"What to do next, given what this page reports. Present only where the read computes it: an\nempty list means the answer you were looking for is here and there is nothing further to\ndo. Absent entirely on reads that do not report next actions.\n","items":{"$ref":"#/components/schemas/NextAction"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"EmailMessageContent":{"type":"object","additionalProperties":false,"description":"The body content of a sent email message, as delivered. A send that used a template reports its stored body with the accepted caller parameters and the selected recipient's saved contact values substituted in. A contextual send with multiple recipients requires the recipient_id query parameter.\n","properties":{"html":{"type":"string","minLength":1,"description":"The HTML body of the message as delivered, if it was stored.","example":"<p>Hi Jane,</p><p>Your order #1234 has shipped and is on its way.</p>"},"text":{"type":"string","minLength":1,"description":"The plain-text body of the message as delivered, if it was stored.","example":"Hi Jane,\n\nYour order #1234 has shipped and is on its way."}}},"EmailBroadcastStatus":{"type":"string","minLength":1,"enum":["draft","scheduled","accepted","sending","waiting_for_funds","paused","sent","canceling","canceled","failed"],"description":"Where the broadcast itself has got to. This is separate from what happened to individual recipients, which the broadcast's own `sent_count`, `delivered_count`, `bounced_count` and `complained_count` tell you. Those four are fields on the broadcast, not on everything that carries this status, and reading the broadcast's recipients or its events gives the same outcomes one recipient at a time.\n\nUse `can_start` in the send-allowance response to check whether email limits permit starting. A funding pause keeps the remaining recipients available for resumption; a failed broadcast cannot resume.\n\n- `draft`: Created, and not sent or scheduled yet.\n- `scheduled`: Due to send at `scheduled_at`. You can still edit it, and you can still change the time, right up until sending starts.\n- `accepted`: Taken for immediate sending. Nothing has gone out yet.\n- `sending`: On its way. Some recipients have been sent to and some have not.\n- `waiting_for_funds`: Sending stopped because your balance cannot pay for more email, or because the next batch would go over an email sending limit (`funding_hold.reason` is `send_limit_reached`). You can add funds manually or let your existing automatic top-up restore the balance. A sending limit allows more email when it resets. Bird checks once a minute and continues sending to the remaining recipients when a check succeeds before `funding_hold.wait_until`. Otherwise the broadcast becomes `paused`, even if funds or allowance arrive after the last check.\n- `paused`: Sending stopped for funds or a sending limit, and it does not continue by itself. `funding_hold.reason` says why. Check the balance and add funds if it is still short, or wait for the limit to allow more email, then resume the broadcast, or cancel it.\n- `sent`: Every recipient has been sent to.\n- `canceling`: A cancellation is under way and the remaining sends are stopping.\n- `canceled`: The cancellation finished. Anything already on its way to a recipient when you canceled cannot be pulled back.\n- `failed`: The broadcast could not be sent. Reading the broadcast gives `failure_reason`, which says why. If it had already started sending, the recipients it reached keep their delivery status and carry on producing events.\n\nA draft is deleted rather than canceled, because it was never sent. Recipients already sent to before a broadcast waits or pauses keep their delivery status, and are not sent to again when it continues.\n"},"AudienceID":{"type":"string","minLength":1,"pattern":"^adn_[0-9a-hjkmnp-tv-z]{26}$","example":"adn_01krdgeqcxet5s7t44vh8rt9mg"},"ContactID":{"type":"string","minLength":1,"pattern":"^con_[0-9a-hjkmnp-tv-z]{26}$","example":"con_01krdgeqcxet5s7t44vh8rt9mg"},"EmailBroadcastAutomaticSeeding":{"type":"object","additionalProperties":false,"required":["enabled","example_contact_id"],"properties":{"enabled":{"type":"boolean","description":"Whether the broadcast sends seed copies. False sends none, even when the audience contains a contact at the trigger address."},"example_contact_id":{"oneOf":[{"$ref":"#/components/schemas/ContactID"},{"type":"null"}],"description":"The contact whose values fill the personal fields in the seed copies. It belongs to this workspace but need not be in the audience; choosing it does not change who receives the broadcast. Null when personal fields use their fallback values.\n"}},"description":"How a broadcast takes part in automatic seeding. The seed pool, engagement profile and regions come from the workspace's automatic seeding settings.\n"},"EmailBroadcastParameterName":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"const":"bird"},"description":"A bare template input name, such as `first_name` or `offer`, outside the reserved `bird` namespace.","example":"offer"},"EmailBroadcastParameters":{"type":"object","x-sensitive":true,"maxProperties":128,"propertyNames":{"$ref":"#/components/schemas/EmailBroadcastParameterName"},"additionalProperties":{"type":["string","number","boolean","null"]},"description":"Complete template input map. Each value is a string, number, boolean or null and is used exactly as given, so text containing braces or code-like syntax is never evaluated. A value the template uses that opens Liquid (`{{`, or `{%` not followed by a digit) stops the broadcast from sending. Objects and lists are not accepted. Use bird.contact.first_name in the template for contact data. Names must be bare input names outside the bird namespace. Omission retains the map unless the template ID changes, which clears it; an empty object clears it, and null is invalid. The compact map is limited to 16384 UTF-8 bytes and 128 names. Individual email parameters keep their own format."},"EmailBroadcastParameterOverrides":{"type":"object","x-sensitive":true,"propertyNames":{"$ref":"#/components/schemas/LanguageTag"},"additionalProperties":{"$ref":"#/components/schemas/EmailBroadcastParameters"},"description":"Complete map of per-language parameter values, keyed by a BCP-47 language tag of at most 35 characters such as `es` or `pt-BR`. Each language holds only the names whose value differs for that language; a name it leaves out uses the value in `parameters`, including later changes to it. A value that is present always applies, even when it is `\"\"`, `0`, `false`, `null` or equal to the `parameters` value. To return a name to the `parameters` value, send the map without it. Sending this map, even as `{}`, applies language rules to the broadcast: `parameters` must hold every input the default language's content, sender name, reply-to or headers use, and an input only the selected language uses may come from that language's entry instead. A broadcast that never sends it keeps the selected-language rules. Values for the default language, or for a language the broadcast does not send, are kept but not used. Omission retains the map unless the template ID changes, which clears it; an empty object removes every override, null is invalid and a language with no names is removed. Tags are stored in canonical BCP-47 form, so two spellings of one tag are refused. The compact map is limited to 16384 UTF-8 bytes, and `parameters` and every language together are limited to 128 distinct names.\n"},"EmailBroadcastTemplate":{"type":"object","additionalProperties":false,"required":["id"],"description":"The template a broadcast sends, the exact version of it the broadcast is fixed to, and which of that version's languages goes out.\n\n`parameters` and `parameter_overrides` are returned on customer detail and mutation responses when the caller has email_management read permission, and omitted without that permission and from list responses. They are also omitted from staff-only responses. Broadcasts created before parameters existed return `parameters` as an empty object. `parameter_overrides` is also omitted for a broadcast that has never sent it; an empty object means language rules apply with no overrides.\n","properties":{"id":{"$ref":"#/components/schemas/EmailTemplateID","description":"Which template the broadcast sends. Which version of it the send is fixed to is `version_id`.\n"},"language":{"oneOf":[{"$ref":"#/components/schemas/LanguageTag"},{"type":"null"}],"description":"The BCP-47 language tag selected for the whole audience, such as `en` or `pt-BR`. `null` means no language is selected, so the broadcast uses the published version's default language, unless the template has `language_source_required` set. Send `template.language` in an update to change or clear the selection.\n"},"version_id":{"oneOf":[{"$ref":"#/components/schemas/EmailTemplateVersionID"},{"type":"null"}],"readOnly":true,"description":"The template version this broadcast is fixed to. It is chosen when the broadcast is prepared for sending, so publishing a new version while the broadcast is going out cannot change what the rest of the recipients get. Null until the broadcast is prepared.\n"},"parameters":{"$ref":"#/components/schemas/EmailBroadcastParameters"},"parameter_overrides":{"$ref":"#/components/schemas/EmailBroadcastParameterOverrides"}}},"EmailBroadcastFundingHoldReason":{"type":"string","minLength":1,"enum":["automatic_top_up","funds_required","wait_expired","send_limit_reached"],"description":"Why sending stopped for funds or a sending limit.\n\n- `automatic_top_up`: Sending stopped while automatic top-up was active. Sending can continue automatically when a funding check succeeds before `wait_until`.\n- `funds_required`: Sending stopped because your balance cannot pay for more email. While `waiting_for_funds`, a manual or automatic top-up can restart sending before `wait_until`. If the broadcast is `paused`, add funds if needed, then resume it.\n- `wait_expired`: Status is `paused`. The automatic wait ended before sending continued. Add funds if needed, then resume the broadcast.\n- `send_limit_reached`: Sending stopped because the next batch would go over one of your organization's email sending limits, such as its daily limit. While `waiting_for_funds`, Bird checks once a minute and continues sending if the limit allows the next batch before `wait_until`, such as after the daily limit resets at midnight UTC. If the broadcast is `paused`, the limit did not allow sending before `wait_until`. Resume it once the limit allows more email, or cancel it.\n"},"EmailBroadcastFundingHold":{"type":"object","readOnly":true,"additionalProperties":false,"required":["reason"],"description":"Why sending stopped for funds or a sending limit, and what happens next. Present only while `status` is `waiting_for_funds` or `paused`.\n\nFor a funds hold, add funds during the wait to let sending continue automatically. After the broadcast pauses, check the balance and add funds if it is still short, then resume it explicitly. For `send_limit_reached`, adding funds does not help: sending continues when the limit allows more email, and after a pause you resume it once it does. Resume is refused while the next batch still cannot be paid for or would go over a sending limit. A failed broadcast cannot resume.\n\nEach interruption can wait up to 20 minutes for funds. An interruption for a sending limit (`send_limit_reached`) waits until 10 minutes after the next midnight UTC, when the daily limit resets. Checks, refused batches and partial top-ups during the same interruption do not extend its deadline. Automatic continuation or an explicit resume clears the hold; if sending later stops again, a new wait begins.\n","properties":{"reason":{"example":"funds_required","$ref":"#/components/schemas/EmailBroadcastFundingHoldReason"},"wait_until":{"type":"string","format":"date-time","minLength":1,"example":"2026-09-02T08:35:03Z","description":"When the automatic wait ends, or ended. Absent when the broadcast paused without waiting."},"paused_at":{"type":"string","format":"date-time","minLength":1,"example":"2026-09-02T08:35:03Z","description":"When the broadcast paused. Present only while `status` is `paused`."}}},"EmailBroadcastParameterProblemCode":{"type":"string","minLength":1,"description":"What a broadcast input diagnostic found.\n\n- `parameter_json_invalid`: the request body or an input map is not valid JSON.\n- `parameter_map_invalid`: `template.parameters` or `template.parameter_overrides` is not a JSON object of input names.\n- `parameter_name_invalid`: an input name is not a bare name outside the `bird` namespace.\n- `parameter_value_unsupported`: an input value is an object or a list. Values must be a string, number, boolean or null.\n- `parameter_liquid_unsupported`: an input value the email uses contains Liquid, such as `{{` or `{%`. Values are sent as written, so the broadcast cannot send; put Liquid in the template instead.\n- `parameter_duplicate_key`: an input name, or two spellings of one language tag, appears twice.\n- `parameter_bytes_exceeded`: an input map is larger than 16384 UTF-8 bytes.\n- `parameter_names_exceeded`: `template.parameters` and every language together hold more than 128 distinct names.\n- `parameter_depth_exceeded`: an input value is nested too deeply.\n- `parameter_language_invalid`: a `template.parameter_overrides` key is not a valid BCP-47 language tag.\n- `parameter_required`: the template or envelope uses an input that has no value.\n- `sensitive_input_unsupported`: the template uses an input it marks sensitive, which a broadcast cannot supply.\n- `render_profile_unsupported`: the template uses a Liquid operation that rendering with broadcast inputs does not support.\n- `rendered_envelope_invalid`: the rendered subject, sender name, reply-to addresses or a header is not valid for an email, for example because it contains a line break.\n- `contact_property_unknown`: the template reads a contact property this workspace has not defined.\n- `template_unavailable`: the broadcast has no template, or its template no longer exists or has no published version.\n- `language_unavailable`: the published version has no content in the selected language.\n- `sender_unavailable`: the broadcast cannot send from its `from` address or IP pool.\n- `brand_unavailable`: the saved Brand is archived or unavailable for selection. Preview with an available Brand override before sending a test.\n- `audience_unavailable`: the broadcast's audience cannot be used for this send.\n- `recipient_render_failed`: content could not be rendered for a recipient while the broadcast was sending.\n- `render_budget_exceeded`: rendering went over a limit, named by `budget` with its `limit`.\n- `transport_missing`: the saved content of a prepared broadcast is unavailable. Contact Bird support.\n- `transport_invalid`: the saved content of a prepared broadcast no longer matches what was prepared. Contact Bird support.\n- `seed_example_value_missing`: automatic seeding has no example contact, and the template requires the contact field at `pointer`, which has no fallback value. Choose an example contact or give the field a fallback value. Seed copies are not sent until then.\n- `seeding_not_configured`: automatic seeding is on, but the workspace's automatic seeding settings are not saved or are turned off. Save them before sending, or no seed copies are sent.\n- `seed_tests_exhausted`: automatic seeding is on, but the organization has no seed tests left this period, so no seed copies are sent.\n","x-extensible-enum":["parameter_json_invalid","parameter_map_invalid","parameter_name_invalid","parameter_value_unsupported","parameter_liquid_unsupported","parameter_duplicate_key","parameter_bytes_exceeded","parameter_names_exceeded","parameter_depth_exceeded","parameter_language_invalid","parameter_required","sensitive_input_unsupported","render_profile_unsupported","rendered_envelope_invalid","contact_property_unknown","template_unavailable","language_unavailable","sender_unavailable","audience_unavailable","brand_unavailable","recipient_render_failed","render_budget_exceeded","transport_missing","transport_invalid","seed_example_value_missing","seeding_not_configured","seed_tests_exhausted"],"example":"parameter_required"},"EmailBroadcastParameterProblemPhase":{"type":"string","minLength":1,"description":"Where a broadcast input diagnostic was found.\n\n- `request`: in the inputs this request supplied, before the template was checked.\n- `validation`: while checking the inputs against the current published template, as validate, preview and send do.\n- `execution`: while the broadcast was being prepared or sent. This phase appears on `failure_parameters`.\n","x-extensible-enum":["request","validation","execution"],"example":"validation"},"EmailBroadcastParameterProblemSeverity":{"type":"string","minLength":1,"description":"How a broadcast input diagnostic affects sending.\n\n- `error`: the broadcast cannot send until the problem is fixed.\n- `warning`: the broadcast can send, but something it asks for will not happen, such as its automatic seed test.\n","x-extensible-enum":["error","warning"],"example":"error"},"EmailBroadcastParameterProblemSite":{"type":"string","minLength":1,"description":"The part of the email where the input is used.\n\n- `subject`: the subject line.\n- `html`: the HTML body, including its inbox preview text.\n- `text`: the plain-text body.\n- `from_name`: the sender display name.\n- `reply_to`: the reply-to addresses.\n\nA custom header is reported as `header:` followed by the header name as the broadcast sets it, for example `header:X-Campaign`.\n","x-extensible-enum":["subject","html","text","from_name","reply_to"],"example":"subject"},"EmailBroadcastParameterProblem":{"type":"object","additionalProperties":false,"required":["code","phase","severity"],"description":"One problem with a broadcast's template inputs. A diagnostic names the input or field it is about and never includes its value.","properties":{"code":{"$ref":"#/components/schemas/EmailBroadcastParameterProblemCode"},"phase":{"$ref":"#/components/schemas/EmailBroadcastParameterProblemPhase"},"severity":{"$ref":"#/components/schemas/EmailBroadcastParameterProblemSeverity"},"pointer":{"type":"string","description":"A JSON pointer to the request or broadcast field the problem is about, such as `/template/parameters/first_name` or `/from`. Absent when the problem is not about one field.","example":"/template/parameters/first_name"},"site":{"$ref":"#/components/schemas/EmailBroadcastParameterProblemSite","description":"Where in the email the input is used. Absent when the problem is not tied to one place."},"budget":{"type":"string","minLength":1,"description":"The rendering limit that was exceeded, such as `output_bytes` or `nesting`, when `code` is `render_budget_exceeded`. It is reported with `limit` on problems from sending a broadcast, in `failure_parameters`.","example":"output_bytes"},"limit":{"type":"integer","format":"int64","description":"The value of the limit named by `budget`."},"contact_id":{"$ref":"#/components/schemas/ContactID","description":"The contact whose values were being rendered, when the problem came from one recipient."}}},"EmailBroadcastFailureParameters":{"type":"object","additionalProperties":false,"required":["code","phase","failure_count"],"description":"Why a broadcast stopped because its template inputs could not be prepared or rendered. It names fields and contacts and never includes input or contact values.","properties":{"code":{"$ref":"#/components/schemas/EmailBroadcastParameterProblemCode"},"phase":{"$ref":"#/components/schemas/EmailBroadcastParameterProblemPhase"},"pointer":{"type":"string","description":"A JSON pointer to the broadcast field the failure is about, such as `/template/parameters/first_name` or `/template`.","example":"/template/parameters/first_name"},"observed_version_id":{"$ref":"#/components/schemas/EmailTemplateVersionID","description":"The published template version the broadcast was using when it failed. Absent when no version had been selected."},"problems":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/EmailBroadcastParameterProblem"},"description":"Up to 20 of the problems found. A recipient problem names its contact in `contact_id`."},"failure_count":{"type":"integer","format":"int64","minimum":0,"description":"How many recipients failed to render, including those not listed in `problems`. It can be `0` when the broadcast failed while it was being prepared, before any recipient was rendered."}}},"EmailBroadcast":{"type":"object","additionalProperties":false,"required":["id","category","status","recipient_count","track_opens","track_clicks","created_at","sent_at"],"properties":{"automatic_seeding":{"oneOf":[{"$ref":"#/components/schemas/EmailBroadcastAutomaticSeeding"},{"type":"null"}],"description":"The broadcast's automatic seeding choice, or null when a seed test starts only from a contact at the workspace's trigger address in the audience. Returned on single-broadcast reads and on create and update responses to callers with Inbox Insights read and contact read permission. Not included in lists.\n"},"id":{"type":"string","minLength":1,"readOnly":true,"pattern":"^eb_[0-9a-hjkmnp-tv-z]{26}$","description":"Broadcast ID.","example":"eb_01krdgeqcxet5s7t44vh8rt9mg"},"display_label":{"type":"string","readOnly":true,"example":"Weekly news","description":"Label for selecting this broadcast on list and single-broadcast reads. With `email_management` read access, uses the retained subject from the template version resolved when execution starts, then its non-generated name. Draft and scheduled broadcasts use the name. Omitted when no authoritative label is available; clients can show a localized Untitled broadcast fallback. Without that access, uses the canonical broadcast ID. Absent from mutation responses."},"from":{"$ref":"#/components/schemas/EmailAddress","description":"The address this broadcast sends from. `name` is filled in when the broadcast was given a display name to send under. Left out on a draft that has not picked a sender yet."},"audience_id":{"$ref":"#/components/schemas/AudienceID","description":"The audience this broadcast sends to. When the send starts we turn the audience into a list of recipients, and you can read that list a page at a time with [List recipients of a broadcast](/docs/api/reference/list-email-broadcast-recipients). Left out on a draft that has not picked an audience yet."},"template":{"oneOf":[{"$ref":"#/components/schemas/EmailBroadcastTemplate"},{"type":"null"}],"description":"The template this broadcast sends, and the language it sends in. A broadcast sends the template's published version, and the exact version is fixed when the broadcast is prepared for sending, so publishing a new version afterwards does not change what this broadcast sends. Null on a draft that has not chosen a template yet."},"html_bytes":{"type":"integer","minimum":0,"readOnly":true,"format":"int64","example":18432,"description":"Size of the HTML body this broadcast sends, in bytes, or 0 when its content has no HTML part. Measured on the template version the broadcast sends, using the selected language. Recipient merge values can change its size. Returned on a single broadcast read, and absent from the list and from the broadcast that creating, updating, sending, resuming or canceling one returns, none of which measure the content. Absent too when the broadcast has no template or its content can no longer be read.\n"},"text_bytes":{"type":"integer","minimum":0,"readOnly":true,"format":"int64","example":2104,"description":"Size of the plain-text body this broadcast sends, in bytes, or 0 when its content has no plain-text part. Measured, and absent, the same way as `html_bytes`.\n"},"category":{"type":"string","minLength":1,"enum":["marketing","transactional"],"description":"What kind of email this is, which decides how suppressions apply to it. A `marketing` broadcast is held back from every suppressed address. A `transactional` one still goes to addresses suppressed for a complaint or an unsubscribe, because those suppressions are about marketing mail."},"ip_pool_id":{"type":"string","pattern":"^ipp_([0-9a-hjkmnp-tv-z]{26}|shared)$","description":"The IP pool this broadcast sends from, or `ipp_shared` when it sends through the shared pool. Absent when it sends on your organization's default pool."},"reply_to":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddress"},"maxItems":25,"description":"Where replies to this broadcast go, if you want them somewhere other than the `from` address. Absent when you have not set one."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Any custom email headers set on the broadcast. Returned on a single broadcast read and on the broadcast that creating, updating, sending, resuming or canceling one returns, and absent from the list. The unsubscribe headers we add ourselves are not included."},"status":{"readOnly":true,"example":"sent","description":"Where the broadcast itself has got to, separate from what happened to individual recipients: for that, read `sent_count`, `delivered_count`, `bounced_count` and `complained_count` below. When it is `failed`, `failure_reason` says why. When it is `waiting_for_funds` or `paused`, `funding_hold` says why and what happens next.\n","allOf":[{"$ref":"#/components/schemas/EmailBroadcastStatus"}]},"funding_hold":{"readOnly":true,"$ref":"#/components/schemas/EmailBroadcastFundingHold"},"next":{"type":"array","readOnly":true,"description":"What to do next about this broadcast, given the state it is in. Each entry names one action and\nsays why it is worth taking. Responses that compute next actions include this field: an empty list means there is\nnothing to do. Other responses omit it.\n","items":{"$ref":"#/components/schemas/NextAction"}},"failure_reason":{"type":["string","null"],"readOnly":true,"enum":["empty_audience","audience_unavailable","content_invalid","insufficient_funds","quota_exceeded","internal_error","workspace_suspended",null],"example":null,"description":"Why the broadcast failed. Set when `status` is `failed`, and `null` the rest of the time. A failed broadcast cannot be sent again; once the cause is fixed, create a new broadcast.\n\n- `empty_audience`: There was nobody to send to. Either the audience has no members, or every address in it is suppressed.\n- `audience_unavailable`: The audience no longer exists, so there was nothing to resolve.\n- `content_invalid`: The broadcast could not be set up to send. `failure_detail` explains what went wrong. It is one of these:\n  - The broadcast has no template, or the template it uses no longer exists. Choose an existing template for the new broadcast.\n  - The template has no published version, or its published version has no subject and no body. Publish the template, or add content and publish it.\n  - The template uses a loop or reads a value that a broadcast cannot provide. Remove it, or use a contact property instead, then publish the template again.\n  - The template requires a language, but the broadcast has not selected one. Set `template.language` on the new broadcast to one of the template's languages.\n  - The selected language is not available on the published template version. Choose one of that version's languages, or publish a version that includes the selected language.\n  - The sending domain is no longer verified. Verify the domain again.\n  - The configured IP pool has no usable IP address.\n  - We could not hand the prepared message to the delivery system. This is a problem on our side.\n- `insufficient_funds`: There was not enough in the workspace balance to pay for the send.\n- `quota_exceeded`: The send would have gone past your organization's daily or monthly email allowance, whichever runs out first. This can happen when the broadcast is being prepared, or partway through sending if the remaining recipients no longer fit. `failure_detail` gives you the count and the limit.\n- `internal_error`: Something went wrong on our side. Open a support ticket if it keeps happening.\n- `workspace_suspended`: The workspace is suspended, so the broadcast stopped sending. Recipients not yet sent to are not sent to, even after reactivation. Contact Bird support to reactivate the workspace.\n"},"failure_detail":{"type":["string","null"],"readOnly":true,"example":null,"description":"A sentence explaining the failure in more detail than `failure_reason` does, and `null` when the broadcast has not failed. Show it to the person using your app. Do not write code that reads it, because the wording can change. Branch on `failure_reason` instead."},"recipient_count":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"default":0,"example":4820,"description":"Number of recipients after suppressed addresses are removed from the audience. This is 0 until sending starts and the audience becomes a recipient list."},"sent_count":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":4820,"description":"Saved count of recipients whose status is `processed` or later. Counters refresh periodically and can change after the broadcast reaches `sent`. Read the broadcast again to get the latest saved totals. These counts use exact retained delivery and engagement records; the email stats endpoints report approximate totals.\n\nList and single-broadcast reads return the last saved values during refresh delays or failures. A new broadcast starts with saved zero counters, which remain until its first refresh. Counters are absent while historical totals have not been calculated or their retained history is incomplete. A failure to read saved counters fails the request. Creating, updating, sending, resuming, and canceling a broadcast return no counters.\n"},"delivered_count":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":4712,"description":"How many recipients' messages were accepted by their mail server. Absent when `sent_count` is."},"bounced_count":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":96,"description":"How many recipients the message could not be delivered to at all. Absent when `sent_count` is."},"complained_count":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":12,"description":"How many recipients marked the message as spam. Absent when `sent_count` is."},"open_count":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":3104,"description":"How many times the message was opened, added up across every recipient. One recipient opening it twice counts twice. Absent when `sent_count` is."},"click_count":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":812,"description":"How many times a link in the message was clicked, added up across every recipient. One recipient clicking twice counts twice. Absent when `sent_count` is."},"sending_ips":{"type":"array","readOnly":true,"items":{"type":"string","minLength":1},"example":["198.51.100.42"],"description":"The saved IP addresses this broadcast's messages went out from, up to 100 of them. These refresh with the counters and stay absent when the saved counters are unavailable or incomplete. A broadcast is spread across every address in its pool, so more than one can appear. The receiving mail systems name the address when they deliver, bounce or defer a message, so this stays absent until the first of those comes back. Returned on a single broadcast read, and absent from the list and from the broadcast that creating, updating, sending, resuming or canceling one returns, none of which read them. For delivery and latency broken down per address, read the sending-IP stats.\n"},"unique_opens_non_prefetched":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":2140,"description":"How many distinct recipients opened the message at least once, excluding opens auto-fetched by inbox privacy features (such as Apple Mail Privacy Protection and the Gmail image proxy). A recipient who opened several times, or whose inbox prefetched the message, counts once. Absent when `sent_count` is."},"unique_clicks":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":693,"description":"How many distinct recipients clicked a link in the message at least once. A recipient who clicked several times counts once. Absent when `sent_count` is."},"out_of_band_bounces":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":14,"description":"How many recipients bounced after the message had already been accepted for delivery. A recipient who bounced this way more than once counts once. Absent when `sent_count` is."},"delivered_recipients":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":4724,"description":"How many distinct recipients a delivery landed for. This is the denominator to measure `unique_opens_non_prefetched`, `unique_clicks` and `complained_count` against. It differs from `delivered_count`, which reports how many recipients are currently in the delivered state: a recipient who was delivered to and then complained moves to `complained_count` and leaves `delivered_count`, but stays here, because the message did reach them. Absent when `sent_count` is."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"},"description":"Labels on this broadcast, each one a `name` and a `value`, that you can filter and search broadcasts by. Use tags for anything you want to find broadcasts by later, and `metadata` for data you only want handed back to you."},"metadata":{"type":"object","description":"Any JSON you want to keep on the broadcast. We store it and hand it back in webhook payloads, and that is all it does. If you want to search or filter by it, use `tags` instead.","additionalProperties":true},"track_opens":{"type":"boolean","example":true,"description":"Whether opens are tracked for this broadcast."},"track_clicks":{"type":"boolean","example":true,"description":"Whether link clicks are tracked for this broadcast."},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"example":"2026-09-01T09:14:02.418Z","description":"When the broadcast was created."},"scheduled_at":{"type":"string","format":"date-time","readOnly":true,"example":"2026-09-02T08:00:00Z","description":"When the broadcast is due to send, and absent when it is not scheduled."},"started_at":{"type":"string","format":"date-time","readOnly":true,"example":"2026-09-02T08:00:03.771Z","description":"When the broadcast started sending. Absent until then. Older broadcasts waiting or paused for funds may lack that timestamp; they report their send authorization time, or creation time if that is also missing, so late-resume confirmation uses the same conservative time as the server. Compare with `sent_at`, which is when the broadcast finished sending."},"sent_at":{"type":["string","null"],"format":"date-time","readOnly":true,"example":"2026-09-02T08:11:47.902Z","description":"When the last recipient was sent to and the broadcast became `sent`. Null until then. Compare with `started_at`, which is when the broadcast started sending."},"canceled_at":{"type":"string","format":"date-time","readOnly":true,"description":"When the broadcast was canceled, and absent if it never was. This is when cancellation was requested, so it is set as soon as the status is `canceling` and does not move while the remaining sends stop and the status becomes `canceled`."},"failure_parameters":{"$ref":"#/components/schemas/EmailBroadcastFailureParameters","readOnly":true,"description":"Why the broadcast failed, when it could not prepare or render its template inputs. A failed broadcast cannot be updated or sent again. Correct the input or template that `pointer` and `problems` name, then create a new broadcast with the corrected inputs and send it. When `code` is `transport_missing` or `transport_invalid`, the broadcast's saved content cannot be used and changing an input does not fix it, so contact Bird support.\n\nAbsent when the broadcast did not fail this way. Returned on a single broadcast read and on the broadcast that creating, updating, sending, resuming or canceling one returns, and absent from the list.\n"},"brand_id":{"oneOf":[{"$ref":"#/components/schemas/BrandID"},{"type":"null"}],"readOnly":true,"description":"The business whose email preferences and unsubscribe page apply."}},"example":{"id":"eb_01krdgeqcxet5s7t44vh8rt9mg","display_label":"Weekly news","category":"marketing","status":"sent","recipient_count":4820,"sent_count":4820,"delivered_count":4712,"track_opens":true,"track_clicks":true,"created_at":"2026-09-01T09:14:02.418Z","started_at":"2026-09-02T08:00:03.771Z","sent_at":"2026-09-02T08:11:47.902Z","failure_reason":null,"failure_detail":null}},"EmailBroadcastList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of broadcast objects.","items":{"$ref":"#/components/schemas/EmailBroadcast"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"EmailBroadcastAutomaticSeedingInput":{"type":"object","additionalProperties":false,"required":["enabled"],"properties":{"enabled":{"type":"boolean","description":"Whether the broadcast sends seed copies. False sends none, even when the audience contains a contact at the trigger address. A seeded send spends one of the organization's seed tests. When the workspace's automatic seeding is off or the organization has no seed tests left, the broadcast still sends without seed copies; validate the broadcast first to see these as warnings.\n"},"example_contact_id":{"allOf":[{"$ref":"#/components/schemas/ContactID"}],"description":"A contact whose values fill the personal fields in the seed copies, such as a first name. It must belong to this workspace but need not be in the audience; choosing it does not change who receives the broadcast. Its details reach external seed mailboxes, so use a test contact. While seeding is enabled, sending refuses a chosen contact that has since been deleted, so choose another or leave it out. Leave it out to fill personal fields with their fallback values.\n"}},"description":"How a broadcast takes part in automatic seeding. The seed pool, engagement profile and regions come from the workspace's automatic seeding settings.\n"},"EmailBroadcastTemplateCreate":{"type":"object","additionalProperties":false,"required":["id"],"description":"The template a new broadcast sends, and which of that template's languages goes out.\n","properties":{"id":{"$ref":"#/components/schemas/EmailTemplateID","description":"Which template the broadcast sends. The version it is fixed to is chosen when the broadcast is prepared for sending, and you read it back as `template.version_id`.\n"},"language":{"allOf":[{"$ref":"#/components/schemas/LanguageTag"}],"description":"The BCP-47 language tag that goes to the whole audience, such as `en` or `pt-BR`. It must be an exact match for a language on the template's published version, so `fr-CA` does not select `fr`. If you leave it out, the broadcast uses the version's default language, unless the template has `language_source_required` set, in which case sending fails until you select a language. Send `template.language` in an update to change or clear it later.\n"},"parameters":{"$ref":"#/components/schemas/EmailBroadcastParameters"},"parameter_overrides":{"$ref":"#/components/schemas/EmailBroadcastParameterOverrides"}}},"EmailBroadcastHeaders":{"type":"object","maxProperties":25,"additionalProperties":{"type":"string","maxLength":998},"description":"Custom email headers as name and value pairs. Up to 25 of them, each value up to 998 characters.","example":{"X-Campaign":"spring-launch"}},"EmailBroadcastCreateRequest":{"type":"object","additionalProperties":false,"description":"A broadcast sends one email to a whole audience. Every field here is optional, so you can create an empty draft and fill it in later. To actually send, a broadcast needs three things: a `from` address on a verified domain, an `audience_id`, and a `template`.\n\nLeave `send` false, which is the default, and you get a draft. Update it as often as you like, then send it when you are ready. Set `send` to true and the broadcast goes out as soon as it is created, or at `scheduled_at` if you set one.\n","properties":{"automatic_seeding":{"allOf":[{"$ref":"#/components/schemas/EmailBroadcastAutomaticSeedingInput"}],"description":"Whether this broadcast sends seed copies for an automatic seed test. Leave it out to start a seed test only when the audience contains a contact at the workspace's trigger address. Send `enabled: false` to send no seed copies at all. Needs Inbox Insights write permission, and contact read permission to choose an example contact. Turning seeding on returns `404 not_found` while automatic seeding is unavailable to the workspace.\n"},"from":{"$ref":"#/components/schemas/EmailAddressInput","description":"The address the broadcast sends from. Give it as a plain address, as `Jane <jane@acme.com>` to include a display name, or as an object with an address and a name. The domain has to be one this workspace has verified."},"audience_id":{"$ref":"#/components/schemas/AudienceID","description":"The audience this broadcast sends to. We take the audience's contacts as they stand when the send starts and drop any suppressed addresses, and what is left is who gets the email."},"template":{"$ref":"#/components/schemas/EmailBroadcastTemplateCreate","description":"The template the broadcast sends, and the language to send it in. You can leave it out on a draft, but a broadcast cannot send without one. The template's published version is fixed when the broadcast is prepared for sending, and each recipient's contact properties are filled into the content as the email goes out."},"reply_to":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddressInput"},"minItems":1,"maxItems":25,"description":"Where replies to this broadcast should go. Give each address as a plain address, as `Jane <jane@acme.com>` to include a display name, or as an object with an address and a name. You can list more than one."},"headers":{"$ref":"#/components/schemas/EmailBroadcastHeaders","description":"Custom email headers to set on the broadcast, as name and value pairs. Up to 25 of them, each value up to 998 characters. Two names are ours and cannot be set here: `List-Unsubscribe` and `List-Unsubscribe-Post` are dropped if you send them, whatever the category. We add the one-click unsubscribe pair to a marketing broadcast ourselves, and a transactional broadcast has neither header.\n"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"},"maxItems":20,"description":"Labels on this broadcast, each one a `name` and a `value`, up to 20 of them. You can filter the broadcast list by a tag, break your stats down by one, and read them back off webhook payloads. Use tags for anything you want to find broadcasts by later, and `metadata` for data you only want handed back to you."},"metadata":{"type":"object","description":"Any JSON you want to keep on the broadcast. We store it, hand it back when you read the broadcast, and include it in webhook payloads, and you can break stats down by a path inside it such as `metadata.order_id`. It can be up to 2 KB once serialized.","additionalProperties":true},"track_opens":{"type":"boolean","default":true,"description":"Whether to track opens for this broadcast."},"track_clicks":{"type":"boolean","default":true,"description":"Whether to track link clicks for this broadcast."},"ip_pool_id":{"type":"string","pattern":"^ipp_([0-9a-hjkmnp-tv-z]{26}|shared)$","description":"The IP pool to send this broadcast from. Pass a pool ID, or `ipp_shared` to send through the shared pool on purpose. Leave it out and the broadcast uses your organization's default pool. A pool we do not recognize, or one with no IPs available to send from, is refused with a `422`."},"category":{"type":"string","enum":["marketing","transactional"],"default":"marketing","description":"What kind of email this is. A broadcast sets this itself rather than taking it from its template, and it decides two things: which suppressions apply, and whether we add an unsubscribe header.\n\n`marketing`, the default, is held back from every suppressed address and has the one-click unsubscribe headers. `transactional` still goes to addresses suppressed for a complaint or an unsubscribe, and has no unsubscribe header. Only use `transactional` for genuine operational mail such as a terms-of-service update or a service outage notice. Marketing content sent this way still reaches people who have already unsubscribed from you.\n"},"send":{"type":"boolean","default":false,"description":"Whether to send the broadcast as soon as it is created. Set it to true and the broadcast goes out immediately, or at `scheduled_at` if you set one. Leave it false, which is the default, and you get a draft you can update and send later."},"scheduled_at":{"type":"string","format":"date-time","description":"When to send the broadcast. It has to be at least 30 seconds and at most 365 days from now. It requires `send` to be true, so a `scheduled_at` on its own is refused rather than saved on the draft.\n"},"brand_id":{"oneOf":[{"$ref":"#/components/schemas/BrandID"},{"type":"null"}],"description":"Selects the business whose email preferences and unsubscribe page apply. Omission or null selects the workspace's default Brand when the broadcast is first scheduled or sent. An explicit ID must belong to this workspace and be active; unknown, foreign or archived IDs return `422`. The selected Brand stays fixed through delivery and retries."}},"example":{"from":"newsletter@acme.com","audience_id":"adn_01krdgeqcxet5s7t44vh8rt9mg","template":{"id":"emt_01krdgeqcxet5s7t44vh8rt9mg","language":"nl"},"category":"marketing","tags":[{"name":"campaign","value":"spring_launch"}],"metadata":{"campaign_id":"12345"}}},"EmailBroadcastTemplateUpdate":{"type":"object","additionalProperties":false,"description":"A change to the template, language, or parameter maps a broadcast sends. Omitted properties retain their values unless the template ID changes. A changed ID clears the old language, parameters and parameter overrides before applying supplied replacements; repeating the same ID retains them.\n","properties":{"id":{"allOf":[{"$ref":"#/components/schemas/EmailTemplateID"}],"description":"Select this template. Changing the ID clears the old language, parameters and parameter overrides before supplied replacements. Repeating the same ID retains those values and clears the selected template version, so the next preparation uses the template's latest published version. Omit id to retain the selected template. Adding parameters to a draft created before parameters existed may clear its selected version so it uses the template's latest published version. To clear a draft's selection, set template itself to null.\n"},"language":{"oneOf":[{"$ref":"#/components/schemas/LanguageTag"},{"type":"null"}],"description":"The BCP-47 language tag that goes to the whole audience, such as `en` or `pt-BR`. It must be an exact match for a language on the template's published version, so `fr-CA` does not select `fr`. Leave it out to keep the language already selected. If you change the template `id` in the same request, the old language is cleared with the old template. Set this to `null` to use the published version's default language, unless the template has `language_source_required` set.\n"},"parameters":{"$ref":"#/components/schemas/EmailBroadcastParameters"},"parameter_overrides":{"$ref":"#/components/schemas/EmailBroadcastParameterOverrides"}}},"EmailBroadcastUpdateRequest":{"type":"object","additionalProperties":false,"description":"Changes a broadcast that is still a draft or is scheduled. Whatever you send here is applied, and anything you leave out keeps the value it already had. Once a broadcast has started sending it can no longer be edited.\n","properties":{"automatic_seeding":{"oneOf":[{"$ref":"#/components/schemas/EmailBroadcastAutomaticSeedingInput"},{"type":"null"}],"description":"Replaces the broadcast's automatic seeding choice. Leave it out to keep the saved choice. Send null to start a seed test only when the audience contains a contact at the workspace's trigger address. An object without `example_contact_id` removes the example contact, so seed copies use fallback values. Needs Inbox Insights write permission, and contact read permission to choose an example contact. Turning seeding on, or changing it while it is on, returns `404 not_found` while automatic seeding is unavailable to the workspace. Resending the saved choice, turning it off and sending null still succeed.\n"},"from":{"$ref":"#/components/schemas/EmailAddressInput","description":"The address the broadcast sends from. Give it as a plain address, as `Jane <jane@acme.com>` to include a display name, or as an object with an address and a name. The domain has to be one this workspace has verified."},"audience_id":{"$ref":"#/components/schemas/AudienceID","description":"The audience this broadcast sends to. We take the audience's contacts as they stand when the send starts and drop any suppressed addresses, and what is left is who gets the email."},"template":{"oneOf":[{"$ref":"#/components/schemas/EmailBroadcastTemplateUpdate"},{"type":"null"}],"description":"The template the broadcast sends, and the language to send it in, each changeable on its own. Set this to null to take the template and its language off a draft, or leave it out to keep the template, language and fixed version already set.\n"},"reply_to":{"type":["array","null"],"items":{"$ref":"#/components/schemas/EmailAddressInput"},"minItems":1,"maxItems":25,"description":"Where replies to this broadcast should go. Set this to null to remove the addresses already set."},"headers":{"$ref":"#/components/schemas/EmailBroadcastHeaders","description":"Custom email headers to set on the broadcast, as name and value pairs. What you send replaces the headers the draft already had rather than adding to them. Up to 25 of them, each value up to 998 characters. Two names are ours and cannot be set here: `List-Unsubscribe` and `List-Unsubscribe-Post` are dropped if you send them, whatever the category. We add the one-click unsubscribe pair to a marketing broadcast ourselves, and a transactional broadcast has neither header.\n"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"},"maxItems":20,"description":"Labels on this broadcast, each one a `name` and a `value`, that you can filter and search broadcasts by. What you send replaces the tags the draft already had rather than adding to them."},"metadata":{"type":"object","description":"Any JSON you want to keep on the broadcast, up to 2 KB once serialized. What you send replaces the metadata the draft already had rather than merging into it.","additionalProperties":true},"track_opens":{"type":"boolean","description":"Whether to track opens for this broadcast."},"track_clicks":{"type":"boolean","description":"Whether to track link clicks for this broadcast."},"ip_pool_id":{"type":["string","null"],"pattern":"^ipp_([0-9a-hjkmnp-tv-z]{26}|shared)$","description":"The IP pool to send this broadcast from. Pass a pool ID, or `ipp_shared` to send through the shared pool on purpose. Set it to null to fall back to your organization's default pool."},"category":{"type":"string","enum":["marketing","transactional"],"description":"What kind of email this is. It decides two things: which suppressions apply, and whether we add an unsubscribe header.\n\n`marketing` is held back from every suppressed address and has the one-click unsubscribe headers. `transactional` still goes to addresses suppressed for a complaint or an unsubscribe, and has no unsubscribe header. Only use `transactional` for genuine operational mail such as a terms-of-service update or a service outage notice. Marketing content sent this way reaches people who have already unsubscribed from you.\n"},"brand_id":{"oneOf":[{"$ref":"#/components/schemas/BrandID"},{"type":"null"}],"description":"Changes the business whose email preferences and unsubscribe page apply while this broadcast is a draft. Omission keeps the selection; null clears it so the workspace's default Brand is selected at first scheduling or sending. Explicit selection returns `422` when unavailable or when the ID is unknown, belongs to another workspace or is archived. Changing the Brand on a scheduled broadcast returns `422`. Broadcasts that are no longer editable retain the existing `409` conflict response."}},"example":{"category":"marketing","template":{"language":"nl"}}},"EmailBroadcastCounts":{"type":"object","additionalProperties":false,"required":["broadcast_id","status","total","addressable","sendable"],"description":"How many people a broadcast would reach right now, narrowing from everyone in the audience down to the ones it could actually be sent to.\n\nThese are live numbers, worked out at the moment you ask. Audience membership and suppressions change, so they can drift between now and when the broadcast sends.\n\n**They are about the audience, not about delivery, and sending does not change them.** Once the broadcast has sent, its own `recipient_count` is the number that actually went out, and what each of those recipients did with the message is in [the broadcast's recipients](/docs/api/reference/list-email-broadcast-recipients) and [its events](/docs/api/reference/list-email-broadcast-events). `status` is here so you can tell which question these numbers are answering, and `broadcast_id` names what they are about.\n","properties":{"broadcast_id":{"readOnly":true,"description":"The broadcast these counts are for.","allOf":[{"$ref":"#/components/schemas/EmailBroadcastID"}]},"status":{"readOnly":true,"example":"draft","description":"Where the broadcast is in its lifecycle, so the counts read in context. Anything past `draft` or `scheduled` means these numbers describe an audience the broadcast has already been sent to, not one it is about to reach.\n","allOf":[{"$ref":"#/components/schemas/EmailBroadcastStatus"}]},"next":{"type":"array","readOnly":true,"description":"What to do next, given where the broadcast is. On a broadcast that has already sent this names\nthe reads that carry delivery outcomes, which these counts never do. An empty list means there\nis nothing to do; the field is absent entirely on responses that do not report next actions.\n","items":{"$ref":"#/components/schemas/NextAction"}},"total":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":13000,"description":"How many contacts are in the audience."},"addressable":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":12500,"description":"How many of those contacts have an email address. A contact with no address is not counted. This is never higher than `total`."},"sendable":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":12000,"description":"How many of the addressable contacts are not suppressed for this broadcast's category, which is who the email would actually go to. This is never higher than `addressable`. Which suppressions apply depends on the category, so the same audience can give a higher number for a transactional broadcast than for a marketing one. A transactional broadcast still reaches people who unsubscribed from or complained about marketing mail, and a marketing broadcast does not.\n"}}},"EmailSendAllowanceWindow":{"type":"string","minLength":1,"enum":["none","monthly","daily"],"description":"The email limit that prevents a broadcast from reaching its full audience.\n\n- `none`: the email send allowance covers every recipient.\n- `monthly`: the monthly email limit for the billing period.\n- `daily`: the daily email limit, which resets at the end of each UTC day.\n\nWhen both email limits apply, the response reports the more restrictive one. If you pass `send_at`, the check evaluates both at that time.\n"},"EmailSendAllowanceLimitReason":{"type":"string","minLength":1,"enum":["plan","overage_off","overdue_payment","unfunded","overage_ceiling","custom_limit"],"description":"What sets the monthly email limit and how to raise it.\n\n- `plan`: the organization's monthly email limit. This is the plan's included volume unless we have set a different limit for the organization. If the limit matches the included volume, a plan with more included volume raises it. Otherwise, contact Bird support.\n- `overage_off`: email overage is turned off, so sending stops at the included volume. Turn email overage back on to raise the monthly email limit.\n- `overdue_payment`: an overdue payment pauses email overage, so sending stops at the included volume. Pay the overdue invoice to raise the monthly email limit.\n- `unfunded`: funding for email overage could not be confirmed, so sending stops at the included volume. Top up the wallet if it lacks funds. If it has sufficient funds, retry the allowance check. Email overage resumes once sufficient funding is confirmed.\n- `overage_ceiling`: email overage is billed up to a configured multiple of the included volume. A plan with more included volume raises the email overage ceiling.\n- `custom_limit`: we have set a monthly email limit for the organization that differs from the plan's included volume. Contact Bird support to change it. These limits currently report as `plan`. This enum value is declared in advance so reporting them as `custom_limit` will not be a breaking change.\n"},"EmailBroadcastCountAllowance":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The organization's broadcast count allowance for the current window. This counts broadcasts rather than emails. The window is the billing period, or the UTC day when no current billing period is available.\n\nSending or scheduling a draft uses one broadcast from the window current when you submit the request. The scheduled send time does not determine the window. Sending an already scheduled broadcast again uses no additional broadcast allowance. `send_at` on the send-quota request does not change this allowance.\n","required":["limit","remaining","resets_at"],"properties":{"limit":{"type":"integer","format":"int64","minimum":0,"description":"Maximum number of broadcasts the organization can send in this window.\n","example":20},"remaining":{"type":"integer","format":"int64","minimum":0,"description":"Number of broadcasts remaining in this window. At 0, you cannot send or schedule a draft.\n","example":4},"resets_at":{"type":"string","format":"date-time","minLength":1,"description":"When the window ends and broadcast usage resets to 0. This is the end of the billing period, or the end of the UTC day when no current billing period is available.\n","example":"2026-09-01T00:00:00Z"}}},"EmailBroadcastSendQuota":{"type":"object","additionalProperties":false,"required":["recipients","allowed","limited_by","can_start"],"description":"The recipients covered by the organization's email send allowance. If you pass `send_at`, the estimate is for that time. Otherwise, it is for a send now.\n\nThe organization shares this allowance across its email sends. `allowed` can change as other sends use the allowance. `recipients` can change with audience membership and suppressions. These counts are live estimates. Other sends can use the allowance before a broadcast sends, even if its audience fits now.\n\nUse `can_start` to check whether the email limits let this broadcast start. If the balance runs out during sending, the broadcast waits up to 20 minutes and can continue automatically if enough funds become available during that wait. Otherwise it pauses until you resume it. It checks for funds once a minute. This does not enable automatic top-up or initiate a payment.\n\n`limit_reason` is present only when `limited_by` is `monthly` and you have `org:billing` read access. The reason can reveal the organization's payment state. `broadcasts` is present only for a draft when the organization has a broadcast count limit.\n","example":{"recipients":12000,"allowed":5000,"limited_by":"monthly","limit":50000,"remaining":7000,"resets_at":"2026-09-01T00:00:00Z","limit_reason":"plan","can_start":true,"broadcasts":{"limit":20,"remaining":4,"resets_at":"2026-09-01T00:00:00Z"}},"properties":{"recipients":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":12000,"description":"Number of contacts the broadcast could reach now. Excludes contacts without an email address and contacts suppressed for the broadcast's category. Matches the sendable count from the broadcast's audience counts.\n"},"allowed":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":5000,"description":"Number of recipients covered by the organization's email send allowance at `send_at`, or now if you omit it. Equals `recipients` when no email limit restricts the send. It is lower when the remaining allowance cannot cover the audience.\n\nPartially covered broadcasts send in whole batches. This count is rounded down to a batch boundary and can be lower than `remaining`. Read this value directly instead of calculating it from `limit` and `remaining`.\n\nA value of 0 means no recipients are currently covered. This happens if the audience exceeds a full daily or funded monthly limit, if a temporary funding restriction blocks sending, or if the remaining allowance cannot cover a batch. Use `can_start` to decide whether a broadcast with insufficient funds can start and wait for funds.\n"},"limited_by":{"readOnly":true,"example":"monthly","$ref":"#/components/schemas/EmailSendAllowanceWindow"},"limit":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":50000,"description":"The email limit identified by `limited_by`, in emails. Omitted when no email limit restricts the send.\n"},"remaining":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":7000,"description":"The allowance remaining under the email limit identified by `limited_by`, in emails, at `send_at`, or now if you omit it. If the window resets by `send_at`, the check uses its full allowance. Omitted when no email limit restricts the send.\n"},"resets_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"example":"2026-09-01T00:00:00Z","description":"When usage resets to 0 for the email limit identified by `limited_by`, evaluated at `send_at`, or now if you omit it.\n\nA broadcast sent before this time uses the same window and the allowance left after other sends. A broadcast sent at or after this time uses a new window. If `recipients` exceeds a full daily or funded monthly limit, the send is rejected in any window with that limit. When `limit_reason` is `unfunded`, the reported `limit` can instead be a temporary funding restriction; use `can_start` to determine whether the broadcast can start and wait for funds. Pass the later time as `send_at` to check whether the other email limit still restricts the send.\n\nOmitted when no email limit restricts the send, when the reset is at or before `send_at`, or when the billing period has ended and the next one has not started.\n"},"limit_reason":{"readOnly":true,"example":"plan","$ref":"#/components/schemas/EmailSendAllowanceLimitReason"},"broadcasts":{"readOnly":true,"$ref":"#/components/schemas/EmailBroadcastCountAllowance"},"can_start":{"type":"boolean","readOnly":true,"example":true,"description":"Whether the organization's email limits let this broadcast start at `send_at`, or now if you omit it. This ignores a temporary funding restriction, including exhausted included volume when paid overage is available. It still checks daily limits and the monthly limit that applies after funding is restored.\n\nIt is `false` when no recipient fits the daily or funded monthly limits, including when the audience exceeds a full daily or funded monthly limit, or when usage has exhausted either limit. The response field `remaining` can instead reflect the temporary funding restriction: with `limit_reason: unfunded`, `remaining: 0` can accompany `can_start: true` if those daily and funded monthly limits allow sending. The broadcast can then start and wait for funds. A `true` value does not reserve allowance or promise that every recipient is sent. Other checks still apply when you send.\n"}}},"EmailBroadcastClickedLink":{"type":"object","additionalProperties":false,"required":["url","name","click_count","recipient_count"],"description":"One destination URL a broadcast's recipients clicked, with its exact click and recipient totals. Grouped over every click event the broadcast has, not a sample.\n","properties":{"url":{"type":"string","minLength":1,"readOnly":true,"example":"https://acme.com/whats-new/faster-exports","description":"The clicked URL."},"name":{"type":["string","null"],"readOnly":true,"description":"What the link said, resolved by the name used by the most clicks that carried one. Null when no click through this URL ever carried a name.\n","example":"Faster exports, docs"},"click_count":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":431,"description":"Total clicks through this URL, including clicks that carried no link name."},"recipient_count":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"example":388,"description":"Number of distinct recipients who clicked this URL at least once."}}},"EmailBroadcastClickedLinkList":{"type":"object","additionalProperties":false,"required":["data","total"],"properties":{"data":{"type":"array","description":"The broadcast's clicked URLs, most-clicked first, capped at 100 rows.","items":{"$ref":"#/components/schemas/EmailBroadcastClickedLink"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct URLs the broadcast's recipients clicked, regardless of the cap on `data`. When it exceeds the number of rows returned, the list was capped at the 100 most-clicked URLs.\n","example":57}}},"EmailBroadcastInputOverrides":{"type":"object","x-sensitive":true,"properties":{"template":{"oneOf":[{"$ref":"#/components/schemas/EmailBroadcastTemplateUpdate"},{"type":"null"}],"description":"Replaces the template, language or parameters for this request. Null removes the template for this request."},"from":{"$ref":"#/components/schemas/EmailAddressInput","description":"Replaces the sender for this request. Give it as a plain address, as `Jane <jane@acme.com>` to include a display name, or as an object with an address and a name."},"reply_to":{"type":["array","null"],"items":{"$ref":"#/components/schemas/EmailAddressInput"},"minItems":1,"maxItems":25,"description":"Replaces the reply-to addresses for this request. Null removes them."},"headers":{"$ref":"#/components/schemas/EmailBroadcastHeaders","description":"Replaces the custom headers for this request rather than adding to them. Up to 25 of them, each value up to 998 characters. The header rules for updating a broadcast apply.\n"},"brand_id":{"oneOf":[{"$ref":"#/components/schemas/BrandID"},{"type":"null"}],"description":"Changes the Brand for this validation, preview or test only, without changing the saved broadcast. Null selects the workspace default Brand. Omission keeps a historical broadcast's saved identity. An unavailable saved Brand remains renderable with a brand_unavailable diagnostic. Before sending a test, preview again with an available ID or null, then send the same override and fresh preview_fingerprint. Explicit unavailable overrides return 422."}}},"EmailBroadcastValidationRequest":{"x-sensitive":true,"description":"Replacements over the saved broadcast for this validation only. A supplied field replaces the saved value and an omitted field keeps it; nothing is saved. A changed template ID clears the saved language and parameters before supplied replacements apply, and repeating the same ID keeps them.\n","allOf":[{"$ref":"#/components/schemas/EmailBroadcastInputOverrides"}],"unevaluatedProperties":false,"example":{"from":"newsletter@acme.com"}},"EmailBroadcastResolution":{"type":"object","additionalProperties":false,"required":["template_id","observed_version_id","effective_language","requirements_fingerprint"],"description":"The published template version and language a validation or preview checked. It does not fix the version a later send uses.","properties":{"template_id":{"$ref":"#/components/schemas/EmailTemplateID","description":"The template the broadcast uses."},"observed_version_id":{"$ref":"#/components/schemas/EmailTemplateVersionID","description":"The published template version that was checked."},"requested_language":{"$ref":"#/components/schemas/LanguageTag","description":"The language selected in `template.language`, by the broadcast or this request. Absent when none is selected and the published version's default language is used."},"effective_language":{"$ref":"#/components/schemas/LanguageTag","description":"The language whose content was checked."},"requirements_fingerprint":{"type":"string","minLength":1,"description":"An opaque value that changes when the checked version, its content or the inputs it uses change. Compare it with an earlier value to tell whether the requirements are still the same. Do not parse it."},"default_language":{"$ref":"#/components/schemas/LanguageTag","description":"The published version's default language. When the broadcast has `template.parameter_overrides`, `template.parameters` must hold every input this language's content and the broadcast's sender name, reply-to and headers use; without it the selected language's rules apply. Read the complete lists from `base_parameters` and `override_parameters` on the validation result. Template inputs describe template content only and do not include the sender name, reply-to or headers.\n"}}},"EmailBroadcastValidationResult":{"type":"object","additionalProperties":false,"required":["ready_for_admission","problems","unused_parameters"],"description":"Whether the broadcast's current template and inputs pass validation. Validation does not save, fix a template version or evaluate recipients.","properties":{"ready_for_admission":{"type":"boolean","description":"Whether the current template and supplied broadcast inputs pass validation, including checks that the sender, audience and selected Brand can be used. Sending also checks permissions, limits, the audience's recipients and their values, so `true` does not guarantee the broadcast sends."},"resolution":{"$ref":"#/components/schemas/EmailBroadcastResolution","description":"The published template version and language that were checked. Absent when no published template could be selected."},"problems":{"type":"array","items":{"$ref":"#/components/schemas/EmailBroadcastParameterProblem"},"description":"The problems found. Problems with severity `error` block sending, and none remain when `ready_for_admission` is true. Problems with severity `warning` do not block sending."},"unused_parameters":{"type":"array","items":{"type":"string"},"description":"Names supplied in `template.parameters`, or in the selected language's `template.parameter_overrides` entry, that the selected content and envelope do not use. Rendering the selected content ignores them. With `template.parameter_overrides`, this can include a name in `base_parameters` that only the default language uses, and `template.parameters` must still hold its value.\n"},"base_parameters":{"type":"array","items":{"type":"string"},"description":"Input names `template.parameters` must hold, returned with `resolution`. Without `template.parameter_overrides` these are the inputs the selected language uses. With it they are every input the default language's content or the envelope uses, including names the selected language does not use."},"override_parameters":{"type":"array","items":{"type":"string"},"description":"Input names only the selected language uses, returned with `resolution`. Each may come from that language's entry in `template.parameter_overrides` or from `template.parameters`. Always empty without `template.parameter_overrides`."}}},"EmailBroadcastPreviewContact":{"type":"object","properties":{"contact_id":{"$ref":"#/components/schemas/ContactID","description":"The workspace contact whose values fill `bird.contact.` inputs. Required when the template or envelope reads contact data. Present values are used as they are, and a property's fallback applies only when the contact has no value for it."}}},"EmailBroadcastPreviewRequest":{"x-sensitive":true,"description":"Replacements over the saved broadcast, and the contact to render this preview for. A supplied field replaces the saved value for this preview only and an omitted field keeps it; nothing is saved. A changed template ID clears the saved language and parameters before supplied replacements apply, and repeating the same ID keeps them.\n","allOf":[{"$ref":"#/components/schemas/EmailBroadcastInputOverrides"},{"$ref":"#/components/schemas/EmailBroadcastPreviewContact"}],"unevaluatedProperties":false,"example":{"contact_id":"con_01krdgeqcxet5s7t44vh8rt9mg"}},"EmailBroadcastResolvedParameters":{"type":"object","x-sensitive":true,"maxProperties":128,"propertyNames":{"$ref":"#/components/schemas/EmailBroadcastParameterName"},"additionalProperties":{"type":["string","number","boolean","null"]},"description":"The broadcast inputs this render used, by name, each with the string, number, boolean or null value it used. It holds the values taken from `template.parameters` or the selected language's `template.parameter_overrides` entry, and only for names the rendered content or envelope uses. Contact values are never included. A number keeps the digits it was supplied with.\n"},"EmailBroadcastPreviewResult":{"type":"object","x-sensitive":true,"additionalProperties":false,"required":["resolution","subject","preheader","html","text","resolved_parameters","problems","preview_fingerprint"],"description":"A broadcast rendered for one contact, with the inputs it used. Preview sends nothing, and its unsubscribe link is a placeholder that unsubscribes no one.","properties":{"resolution":{"$ref":"#/components/schemas/EmailBroadcastResolution"},"contact_id":{"$ref":"#/components/schemas/ContactID","description":"The contact whose values personalized this preview. Absent when the request named none."},"subject":{"type":"string","minLength":0,"description":"The rendered subject line."},"preheader":{"type":"string","minLength":0,"description":"The text of the hidden preview block that this render of `html` includes, which inbox clients can show beside the subject. It is empty when the template has no preview text, when the text renders empty, or when the rendered HTML does not include the block. A version published earlier can have preview text whose block its markup leaves out, escapes or removes; publishing the template again places the block. This value describes the rendered HTML and does not show how a provider or inbox displays it. Use it instead of reading the hidden block in `html`.\n"},"html":{"type":"string","minLength":0,"description":"The rendered HTML body. When `preheader` is not empty, it includes the hidden block that carries that text."},"text":{"type":"string","minLength":0,"description":"The rendered plain-text body."},"resolved_parameters":{"$ref":"#/components/schemas/EmailBroadcastResolvedParameters"},"problems":{"type":"array","items":{"$ref":"#/components/schemas/EmailBroadcastParameterProblem"},"description":"Problems with the broadcast's inputs found while rendering this preview."},"preview_fingerprint":{"type":"string","minLength":1,"description":"An opaque value for this rendered content. It changes when the published version, an input, a contact value, a fallback or the envelope changes. To send this content as a test, repeat the same inputs with this value. Do not parse it."}}},"EmailBroadcastTestRequest":{"x-sensitive":true,"description":"The inputs of a preview, repeated with its fingerprint, and the member to send its rendered content to. Send the same template, envelope and contact fields the preview used; nothing is saved to the broadcast. A user may send to their own current member email; another destination, or a machine principal, also requires members read permission. The personalization contact and the destination are independent.\n","allOf":[{"$ref":"#/components/schemas/EmailBroadcastInputOverrides"},{"$ref":"#/components/schemas/EmailBroadcastPreviewContact"},{"type":"object","required":["to","preview_fingerprint"],"properties":{"to":{"type":"string","format":"email","example":"member@example.com","minLength":1,"description":"The email address of a current organization member with access to this workspace."},"preview_fingerprint":{"type":"string","example":"fingerprint_from_matching_preview","minLength":1,"description":"The `preview_fingerprint` returned by the preview whose content you are sending."}}}],"unevaluatedProperties":false,"example":{"contact_id":"con_01krdgeqcxet5s7t44vh8rt9mg","to":"member@example.com","preview_fingerprint":"fingerprint_from_matching_preview"}},"EmailBroadcastTestResult":{"allOf":[{"$ref":"#/components/schemas/EmailMessage"}],"description":"The email accepted for asynchronous test delivery. Acceptance does not confirm delivery."},"EmailBroadcastSendNowRequest":{"type":"object","additionalProperties":false,"properties":{"scheduled_at":{"type":"string","format":"date-time","description":"When to send the broadcast. It has to be at least 30 seconds and at most 365 days from now. Leave it out to send straight away."}},"example":{"scheduled_at":"2026-12-01T09:00:00Z"}},"EmailBroadcastResume":{"type":"object","additionalProperties":false,"properties":{"confirm":{"type":"boolean","description":"Acknowledgment that the message reaches the remaining recipients later than intended. It is required to resume a broadcast that started sending at least 24 hours ago. Before setting it, read the broadcast's `started_at` and have a reviewer with `email_management:read` read its template by `template.id` to check `scope`, then, for a workspace template or one the template read reports deleted (`404`), its pinned version using `template.id` and `template.version_id`. Workspace versions retain the template's own original content; sections linked from reusable blocks show as currently published. A built-in template (`scope: system`) shows current catalogue content, and only the template read returns `scope`. Broadcasts with frozen content keep it, but older broadcasts can read the catalogue again when resumed. Neither a current lookup nor an earlier message alone proves what remaining recipients will receive. Leave the broadcast paused unless you can verify that content. Ask an authorized teammate if you lack that permission. It does not skip the funds or concurrent-broadcast checks."}},"example":{"confirm":true}},"LabelID":{"type":"string","minLength":1,"pattern":"^lbl_[0-9a-hjkmnp-tv-z]{26}$","example":"lbl_01krdgeqcxet5s7t44vh8rt9mg"},"LabelName":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[^,\\s\\x00-\\x1F\\x7F-\\x9F](?:[^,\\x00-\\x1F\\x7F-\\x9F]*[^,\\s\\x00-\\x1F\\x7F-\\x9F])?$","description":"The label name, unique in the workspace regardless of case. No commas, control characters, or leading or trailing whitespace. System names such as `inbox`, `sent`, `unread`, `open` or `assigned` are reserved.","example":"Hot lead"},"LabelColor":{"type":"string","minLength":7,"maxLength":7,"pattern":"^#[0-9A-Fa-f]{6}$","description":"The label colour as a `#RRGGBB` hex value.","example":"#E5484D"},"LabelDescription":{"type":"string","minLength":1,"maxLength":500,"description":"When to apply the label. People and agents read it when they decide which label fits.","example":"Inbound sales enquiry from a company. Not support requests or vendors."},"Label":{"readOnly":true,"description":"A label in the workspace catalogue. Its `id` is accepted by every operation that takes a `label_id` and stays the same when the label is renamed.","unevaluatedProperties":false,"allOf":[{"type":"object","required":["id","name","color","description","created_at","updated_at"],"properties":{"id":{"$ref":"#/components/schemas/LabelID","description":"ID of the label, accepted by every operation that takes a `label_id`. It stays the same when the label is renamed."},"name":{"$ref":"#/components/schemas/LabelName"},"color":{"oneOf":[{"$ref":"#/components/schemas/LabelColor"},{"type":"null"}],"description":"The label colour as a `#RRGGBB` hex value, or `null` when none is set."},"description":{"oneOf":[{"$ref":"#/components/schemas/LabelDescription"},{"type":"null"}],"description":"When to apply the label, or `null` when none is set."}}},{"$ref":"#/components/schemas/Timestamps"}]},"LabelList":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Label"},"description":"Every label in the workspace, ordered by name."}}},"LabelCreate":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"$ref":"#/components/schemas/LabelName"},"color":{"$ref":"#/components/schemas/LabelColor"},"description":{"$ref":"#/components/schemas/LabelDescription"}},"example":{"name":"Hot lead","color":"#E5484D","description":"Inbound sales enquiry from a company. Not support requests or vendors."}},"LabelUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"description":"Fields to change. Omitted fields are left unchanged; `null` clears `color` or `description`. A body with none of `name`, `color` or `description` is refused; one that resends current values is accepted.","properties":{"name":{"$ref":"#/components/schemas/LabelName"},"color":{"oneOf":[{"$ref":"#/components/schemas/LabelColor"},{"type":"null"}],"description":"The new colour, or `null` to remove it."},"description":{"oneOf":[{"$ref":"#/components/schemas/LabelDescription"},{"type":"null"}],"description":"The new description, or `null` to remove it."}},"example":{"name":"Qualified lead"}},"ContactIdentifierFilter":{"type":"string","enum":["email","phone_number"],"description":"Which identifier a contact has on file, `email` for an email address or `phone_number` for a phone number."},"AudienceRef":{"type":"object","additionalProperties":false,"required":["id","name"],"description":"A compact reference to an audience, carrying its ID and display name.","properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/AudienceID","description":"ID of the referenced audience."},"name":{"type":"string","minLength":1,"maxLength":100,"description":"The audience's display name.","example":"Newsletter subscribers"}}},"Contact":{"allOf":[{"type":"object","required":["id","email","phone_number","created_at","updated_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/ContactID","description":"ID of the contact, accepted by every operation that takes a `contact_id`."},"email":{"type":["string","null"],"format":"email","maxLength":254,"description":"The contact's email address, in its stored form, trimmed and lowercased before uniqueness is checked. Unique within the workspace. `null` when the contact has no email address.","example":"alice@acme.com"},"phone_number":{"type":["string","null"],"minLength":5,"maxLength":16,"description":"The contact's phone number in normalized international form: a leading `+` and four to 15 digits. We normalize formatting but do not verify the number against numbering-plan metadata. The number is unique within the workspace. Because carriers recycle disconnected numbers, use `external_id` as the durable key for your own records. `null` when the contact has no phone number.","example":"+31612345678"},"first_name":{"type":["string","null"],"maxLength":100,"description":"The contact's first name. Available in broadcast templates as `bird.contact.first_name`."},"last_name":{"type":["string","null"],"maxLength":100,"description":"The contact's last name. Available in broadcast templates as `bird.contact.last_name`."},"external_id":{"type":["string","null"],"maxLength":254,"description":"Your own identifier for this contact, such as a user ID in your system. Unique within the workspace when set."},"data":{"type":"object","additionalProperties":true,"description":"Custom property values for this contact, available in broadcast templates as `bird.contact.<key>`. Each key is a property created via the contact properties API, and each value is a string, number, boolean, or RFC 3339 datetime matching the property's declared type (strings up to `500` characters). Total size is capped at 2 KB serialized. Values stored under a property that was later archived remain readable here.\n"},"audiences":{"type":"array","readOnly":true,"description":"The audiences this contact belongs to, most-recently-joined first. Only present when listing contacts; omitted from every other contact operation.","items":{"$ref":"#/components/schemas/AudienceRef"}}}},{"$ref":"#/components/schemas/Timestamps"}]},"ContactList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of contact objects.","items":{"$ref":"#/components/schemas/Contact"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"ContactCreateRequest":{"type":"object","additionalProperties":false,"properties":{"email":{"type":"string","format":"email","maxLength":254,"description":"The contact's email address. Trimmed and lowercased before it is stored and checked for uniqueness. Unique within the workspace. Supply an email address, a phone number, or both."},"phone_number":{"type":"string","maxLength":32,"description":"The contact's phone number in E.164 format, including the leading `+` and country code. Spaces and punctuation are accepted and stripped; the number is stored in its canonical form, which may differ from what you send, and is unique within the workspace. An empty string is treated as if the field were omitted. Supply an email address, a phone number, or both.","example":"+31612345678"},"first_name":{"type":"string","maxLength":100,"description":"The contact's first name."},"last_name":{"type":"string","maxLength":100,"description":"The contact's last name."},"external_id":{"type":"string","maxLength":254,"description":"Your own identifier for this contact, such as a user ID in your system. Unique within the workspace when set."},"data":{"type":"object","additionalProperties":true,"description":"Custom property values for this contact. Each key must be a registered contact property, including an archived one. Each value must match the property's declared type: string, number, boolean, or RFC 3339 datetime. Strings can contain up to `500` characters, and a `null` value is ignored. An unregistered key returns a validation error. The serialized data is limited to 2 KB."}},"example":{"email":"alice@acme.com","phone_number":"+31612345678","first_name":"Alice","last_name":"Anderson"}},"ContactBatchEntry":{"type":"object","additionalProperties":false,"description":"A contact to create or update. Field values are validated individually during processing, so an invalid contact returns a failed result while valid contacts are saved. The request must still contain an object with the declared field types. Omitted fields keep their stored values on an existing contact.","properties":{"email":{"type":"string","description":"Email address, up to 254 characters. Trimmed and lowercased before matching. Invalid addresses fail this contact."},"phone_number":{"type":"string","description":"Phone number with a country code, up to 32 characters. Spaces and punctuation are accepted. An empty string is treated as omitted."},"first_name":{"type":"string","description":"First name, up to 100 characters."},"last_name":{"type":"string","description":"Last name, up to 100 characters."},"external_id":{"type":"string","description":"Your identifier for the contact, up to 254 characters. Unique within the workspace when set."},"data":{"type":"object","additionalProperties":true,"description":"Custom contact property values. Keys must be registered contact properties, including archived ones. Values must match their declared type. Strings can contain up to 500 characters and the serialized map is limited to 2 KB. Invalid values fail this contact. Null values remove keys when updating and are ignored when creating."}}},"ContactMatchKey":{"type":"string","enum":["email","phone_number","external_id"],"description":"A contact identifier a batch entry can be matched on."},"ContactUpsertRequest":{"type":"object","additionalProperties":false,"required":["contacts"],"properties":{"contacts":{"type":"array","minItems":1,"maxItems":1000,"items":{"$ref":"#/components/schemas/ContactBatchEntry"},"description":"Contacts to create or update, matched automatically against every identifier an entry supplies. Existing contacts are updated with the fields each entry supplies; omitted fields keep their stored values, so an entry can set fields but never clear them. Unmatched entries create contacts."},"audience_ids":{"type":"array","minItems":1,"maxItems":10,"items":{"$ref":"#/components/schemas/AudienceID"},"description":"Audiences every contact in this request is added to. Contacts that are already members are left in place. Every listed audience must exist, or the whole request fails with a validation error and nothing is written."},"match_on":{"$ref":"#/components/schemas/ContactMatchKey","description":"Optional field used to match every entry to an existing contact. Every entry must include this field when set. When omitted, each entry is matched against all identifiers it supplies. No match creates a contact, one match updates it, and identifiers that match multiple contacts return an error naming each contact."},"data_mode":{"type":"string","enum":["merge","replace"],"default":"merge","description":"How a supplied `data` object is applied to an existing contact. The default `merge` mode adds the supplied keys to the contact's stored custom values. A key with a `null` value deletes that key. The `replace` mode overwrites the whole stored `data` map with the supplied map. In both modes a contact that omits `data` keeps its stored values unchanged, so an import that touches one attribute never wipes the others.\n"}},"example":{"contacts":[{"email":"alice@acme.com","first_name":"Alice","last_name":"Anderson"},{"email":"bob@acme.com","first_name":"Bob","last_name":"Baker"}],"audience_ids":["adn_01krdgeqcxet5s7t44vh8rt9mg"]}},"ContactUpsertEntry":{"type":"object","additionalProperties":false,"required":["email","phone_number","external_id"],"description":"The identifiers a batch entry supplied, in the normalized form used for matching. A field is `null` when the entry did not include it. These values identify the request entry and do not represent the contact's current state.","properties":{"email":{"type":["string","null"],"description":"Email address this entry carried, trimmed and lowercased. `null` when the entry carried none.","example":"alice@acme.com"},"phone_number":{"type":["string","null"],"description":"Phone number this entry carried, in its normalized international form. `null` when the entry carried none. A row rejected for an invalid phone echoes the value as sent, trimmed, since no normalized form exists.","example":null},"external_id":{"type":["string","null"],"description":"Your own identifier for this entry, when the entry supplied one.","example":null}}},"ContactMatchedOn":{"type":["string","null"],"enum":["email","phone_number","external_id",null],"description":"Which identifier matched a batch entry to an existing contact. `null` when the entry created a new contact."},"ContactUpsertError":{"type":"object","additionalProperties":false,"required":["type","code","message"],"properties":{"type":{"type":"string","minLength":1,"description":"Machine-readable error category for this entry, such as `validation_error` or `conflict_error`, in the same vocabulary as the top-level error `type`. New categories may be added over time, so treat unrecognized values as a generic failure."},"code":{"type":"string","minLength":6,"pattern":"^E\\d{5}$","description":"Specific error code for this entry, from the same catalog as the top-level error `code`. `E04058` means the entry matched two contacts and requires review. `E04055` means the phone number belongs to another contact and you must retry with different data. Both are `conflict_error` errors; the code distinguishes them."},"message":{"type":"string","minLength":1,"description":"Human-readable explanation of why this entry failed."},"param":{"type":"string","minLength":1,"description":"The field in this entry that caused the failure, such as `data` or `email`. Omitted when the failure names no field."},"details":{"type":"array","description":"Per-field problems with this entry, in the same shape as the top-level error `details`. A contact property failure names the property as `data.<key>`, such as `data.plan`. Omitted when the failure has no per-field problems.","items":{"$ref":"#/components/schemas/ErrorDetail"}}}},"ContactUpsertResultItem":{"type":"object","additionalProperties":false,"required":["entry","matched_on","status"],"properties":{"entry":{"$ref":"#/components/schemas/ContactUpsertEntry"},"matched_on":{"$ref":"#/components/schemas/ContactMatchedOn","description":"Which identifier matched this entry to an existing contact. `null` when the entry created a new contact."},"status":{"type":"string","minLength":1,"enum":["created","updated","failed"],"description":"What happened to this contact.\n\n- `created`: a new contact was created for the address.\n- `updated`: an existing contact with the address was updated.\n- `failed`: the entry was rejected and `error` explains why. A failed entry\n  does not affect the other entries in the request.\n"},"contact_id":{"$ref":"#/components/schemas/ContactID","description":"ID of the created or updated contact. Absent when the entry failed."},"error":{"$ref":"#/components/schemas/ContactUpsertError","description":"Why this entry failed. Absent for successful entries."}}},"ContactUpsertResult":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactUpsertResultItem"},"description":"One entry per contact in the request, in submission order."}}},"ContactUpdateRequest":{"type":"object","additionalProperties":false,"properties":{"email":{"type":["string","null"],"format":"email","maxLength":254,"description":"New email address for the contact. Trimmed and lowercased before it is stored and checked for uniqueness. Must not be in use by another contact in the workspace. Omit to keep the current address; set to `null` to remove it, as long as the contact keeps at least one identifier."},"phone_number":{"type":["string","null"],"maxLength":32,"description":"New phone number for the contact, in E.164 format with the leading `+` and country code. Spaces and punctuation are accepted and stripped. Stored in its canonical form, which may differ from what you send, and unique within the workspace. Omit to keep the current number; set to `null` to remove it, as long as the contact keeps at least one identifier. An empty string behaves as `null`."},"first_name":{"type":["string","null"],"maxLength":100,"description":"The contact's first name. Set to `null` to clear."},"last_name":{"type":["string","null"],"maxLength":100,"description":"The contact's last name. Set to `null` to clear."},"external_id":{"type":["string","null"],"maxLength":254,"description":"Your own identifier for this contact. Unique within the workspace when set. Set to `null` to clear."},"data":{"type":"object","additionalProperties":true,"description":"Custom property values to merge into the contact's existing data. Supplied keys are set, keys with a `null` value are removed, and omitted keys remain unchanged. Each key must be a registered contact property, including an archived one. Each value must match the property's declared type: string, number, boolean, or RFC 3339 datetime. Strings can contain up to `500` characters. An unregistered key returns a validation error. The serialized result is limited to 2 KB."}},"example":{"first_name":"Alice","last_name":"Anderson"}},"Audience":{"allOf":[{"type":"object","required":["id","name","type","created_at","updated_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/AudienceID","description":"ID of the audience, accepted by every operation that takes an `audience_id`."},"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name for the audience.","example":"Newsletter subscribers"},"description":{"type":["string","null"],"maxLength":500,"description":"Longer description of who this audience is."},"type":{"type":"string","minLength":1,"enum":["static"],"x-enum-varnames":["AudienceTypeStatic"],"default":"static","description":"How the audience's recipients are determined. `static` is an explicit member list you manage by adding and removing contacts."}}},{"$ref":"#/components/schemas/Timestamps"}]},"AudienceList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of audience objects.","items":{"$ref":"#/components/schemas/Audience"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"PreferenceID":{"type":"string","minLength":1,"pattern":"^prf_[0-9a-hjkmnp-tv-z]{26}$","example":"prf_01krdgeqcxet5s7t44vh8rt9mg"},"PreferenceChannel":{"type":"string","minLength":1,"description":"The channel a preference statement applies to. A preference addresses one channel: the handle that identifies the person differs per channel, so opting out of one channel says nothing about the others. New channels can be added over time, so a value outside this list can be returned.","x-extensible-enum":["email","sms","whatsapp","amb"],"example":"sms"},"PreferenceStatus":{"type":"string","minLength":1,"description":"What the statement says: `granted` records consent to receive messages, `revoked` records an opt-out. There is no third state: a person who never stated anything simply has no preference on record.","enum":["granted","revoked"],"example":"revoked"},"PreferenceCoverage":{"type":"string","minLength":1,"description":"How much traffic the statement covers. `non_transactional` covers marketing and other non-essential messages while transactional messages such as receipts and verification codes keep flowing; `all` covers every message including transactional ones. Apple Messages for Business phone invitations have no transactional exemption, so either value covers them.","enum":["all","non_transactional"],"example":"non_transactional"},"PreferenceOrigin":{"type":"string","minLength":1,"description":"How the statement was made. Statements the person made themselves (`unsubscribe_link`, `unsubscribe_event`, `keyword`, `preference_page`, `complaint`) carry more weight than ones asserted on their behalf (`api_key`, `user`, `import`): deletion cannot remove a person's own opt-out. A Brand complaint can be cleared only by a newer opt-in through the individual-recipient preference operation. New origins can be added over time, so a value outside this list can be returned.","x-extensible-enum":["unsubscribe_link","unsubscribe_event","keyword","preference_page","api_key","user","import","complaint"],"example":"api_key"},"Preference":{"description":"One person's current stated preference for one channel: whether they have consented to or opted out of receiving messages at a handle, and how much traffic the statement covers. A key holds one current statement (a newer statement replaces it, an older one is refused), and the full history behind the current state is kept internally. `sender_scope` and `topic_id` are part of the key: a preference with both null applies to the selected email Brand, or channel-wide for other channels.\n","allOf":[{"type":"object","required":["id","channel","handle","sender_scope","topic_id","status","coverage","effective_at","origin"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/PreferenceID"},"channel":{"allOf":[{"$ref":"#/components/schemas/PreferenceChannel"}],"readOnly":true},"handle":{"type":"string","minLength":1,"maxLength":320,"readOnly":true,"description":"Who the statement is about: an email address on the email channel, a phone number in E.164 format on SMS, WhatsApp, and Apple Messages for Business.","example":"+15550001234"},"sender_scope":{"type":["string","null"],"readOnly":true,"description":"The sender the statement is limited to, or null when it covers the whole channel. On SMS this is the originator the person replied to; on WhatsApp it identifies the business account that messaged them; on Apple Messages for Business it is the Apple business ID used for invitations. Email preferences use brand_id instead, so sender_scope is always null there.","example":"+15557654321"},"topic_id":{"type":["string","null"],"readOnly":true,"description":"The topic the statement is limited to, or null when it covers every topic. Part of the key that identifies a statement, alongside `sender_scope`.","example":null},"status":{"allOf":[{"$ref":"#/components/schemas/PreferenceStatus"}],"readOnly":true},"coverage":{"allOf":[{"$ref":"#/components/schemas/PreferenceCoverage"}],"readOnly":true},"effective_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the statement was made, as reported by whoever made it. This is what orders one key's statements: a write dated before this moment is refused rather than applied."},"origin":{"allOf":[{"$ref":"#/components/schemas/PreferenceOrigin"}],"readOnly":true},"source":{"type":["string","null"],"maxLength":255,"readOnly":true,"description":"Free-form note on where the statement came from, as supplied when it was recorded: a form name, an import batch, a campaign. Null when none was given.","example":"signup-form-v2"},"consented_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the person consented, as evidenced by whoever asserted the grant. Null on statements that carry no consent evidence, including every opt-out."},"contact_id":{"oneOf":[{"$ref":"#/components/schemas/ContactID"},{"type":"null"}],"readOnly":true,"description":"The contact whose handle matched when the statement was recorded. Null when no contact matched at that moment; it is not updated when contacts change later."},"complaint_message_id":{"example":null,"oneOf":[{"$ref":"#/components/schemas/EmailID"},{"type":"null"}],"readOnly":true,"description":"The email that caused the most recent recorded spam complaint for this preference. Null when no complaint is recorded. Retained after a newer individual opt-in clears complaint protection; check status and origin for the current preference."},"brand_id":{"oneOf":[{"$ref":"#/components/schemas/BrandID"},{"type":"null"}],"readOnly":true,"example":null,"description":"The business this email preference belongs to."}}},{"$ref":"#/components/schemas/Timestamps"}]},"PreferenceList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of preferences, most recently created first.","items":{"$ref":"#/components/schemas/Preference"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"PreferenceStatement":{"type":"object","required":["channel","status"],"properties":{"channel":{"$ref":"#/components/schemas/PreferenceChannel"},"status":{"$ref":"#/components/schemas/PreferenceStatus"},"coverage":{"allOf":[{"$ref":"#/components/schemas/PreferenceCoverage"}],"default":"non_transactional","description":"How much traffic the statement covers. Defaults to `non_transactional`, which keeps transactional messages such as receipts and verification codes flowing. Apple Messages for Business phone invitations have no transactional exemption, so either value covers them."},"sender_scope":{"type":"string","minLength":1,"maxLength":255,"description":"Limit the statement to one sender instead of the whole channel. On SMS this is the originator; on WhatsApp it identifies the business account; on Apple Messages for Business it is the Apple business ID used for invitations. Not supported on email, where preferences belong to the selected Brand.","example":"+15557654321"},"source":{"type":"string","minLength":1,"maxLength":255,"description":"Free-form note on where the statement came from: a form name, an import batch, a campaign. For a grant, it can describe how you collected consent. Stored verbatim and returned on the preference; Bird does not verify this note. It does not grant permission to clear a complaint.","example":"signup-form-v2"},"consented_at":{"type":"string","format":"date-time","description":"When the person consented, on a `granted` statement. Required evidence when granting over a stored opt-out: the grant applies only if this is later than the opt-out it reverses. May not be in the future."},"brand_id":{"oneOf":[{"$ref":"#/components/schemas/BrandID"},{"type":"null"}],"description":"Select the business for an email preference. Omitted or null selects the original business. Unsupported on other channels. An additional Brand supports non_transactional coverage only. Existing opt-outs can be recorded for archived Brands; grants to archived Brands return 422. A Brand not found in this workspace returns 404."}}},"PreferenceIndividualCreate":{"description":"Records one recipient's preference. For email, a granted statement with consented_at strictly later than a Brand complaint can clear that complaint. Bulk writes and imports cannot clear complaints. Other applicable opt-outs and delivery blocks still apply.","allOf":[{"type":"object","required":["handle"],"properties":{"handle":{"type":"string","minLength":1,"maxLength":320,"description":"Who the statement is about: an email address on the email channel, a phone number in E.164 format on SMS, WhatsApp, and Apple Messages for Business.","example":"+15550001234"}}},{"$ref":"#/components/schemas/PreferenceStatement"}],"unevaluatedProperties":false},"PreferenceTransitionID":{"type":"string","minLength":1,"pattern":"^prt_[0-9a-hjkmnp-tv-z]{26}$","example":"prt_01krdgeqcxet5s7t44vh8rt9mg"},"PreferenceWriteResult":{"type":"object","additionalProperties":false,"description":"The outcome of one preference write or delete. `applied: true` means the request took effect, including an identical repeat. `applied: false` means it was refused because a newer statement or protected complaint survives; `preference` carries the statement that survived, and `transition_id` identifies the operation on the key's record.\n","required":["applied","transition_id","preference"],"properties":{"applied":{"type":"boolean","readOnly":true,"description":"Whether the request took effect. False when causal ordering or protected complaint rules refuse the request; the surviving statement is returned in `preference`. A grant returns false when a newer opt-out or deletion survives, even if its consent history is retained."},"transition_id":{"oneOf":[{"$ref":"#/components/schemas/PreferenceTransitionID"},{"type":"null"}],"readOnly":true,"description":"Identifies this write on the key's record, for applied and refused requests alike. Null when the write was a repeat of the current statement and recorded nothing new."},"preference":{"oneOf":[{"$ref":"#/components/schemas/Preference"},{"type":"null"}],"readOnly":true,"description":"The key's surviving statement. Null after an applied delete, when the key is back to having no record. It is also null after a refused grant when a later deletion remains in force."}}},"ContactPropertyID":{"type":"string","minLength":1,"pattern":"^prp_[0-9a-hjkmnp-tv-z]{26}$","example":"prp_01krdgeqcxet5s7t44vh8rt9mg"},"ContactPropertyType":{"type":"string","minLength":1,"enum":["string","number","boolean","datetime"],"x-enum-varnames":["ContactPropertyTypeString","ContactPropertyTypeNumber","ContactPropertyTypeBoolean","ContactPropertyTypeDatetime"],"description":"The value type every contact must use for a property. Cannot be changed after creation.\n\n`datetime` values are RFC 3339 timestamps with an explicit offset. Examples include `2024-01-15T09:30:00Z` and `2024-01-15T11:30:00+02:00`. A bare date or a time with no offset is rejected. The value is normalized to UTC with second precision on write, so `2024-01-15T11:30:00+02:00` is stored and returned as `2024-01-15T09:30:00Z`, and any fractional seconds are dropped.\n"},"ContactProperty":{"allOf":[{"type":"object","required":["id","key","type","created_at","updated_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/ContactPropertyID","description":"ID of the property, accepted by every operation that takes a `property_id`."},"key":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9_]*$","description":"The property key, used as the key in contact data and as the attribute in the `bird.contact.<key>` broadcast template variable. Lowercase letters, digits, and underscores, starting with a letter. Cannot be changed after creation.","example":"plan"},"type":{"$ref":"#/components/schemas/ContactPropertyType"},"fallback_value":{"maxLength":500,"description":"Default used when a contact has no value for this property and the template does not supply an inline fallback. A string, number, boolean, or RFC 3339 datetime matching the declared type (strings up to `500` characters), or `null` when no fallback is set."},"archived":{"type":"boolean","readOnly":true,"description":"Whether the property is archived. Archived properties disappear from pickers and cannot be used in new template versions. Published templates keep sending. Stored values remain available to read and update. Unarchive the property to restore it."}}},{"$ref":"#/components/schemas/Timestamps"}]},"ContactPropertyList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of contact property objects.","items":{"$ref":"#/components/schemas/ContactProperty"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"ContactPropertyCreateRequest":{"type":"object","additionalProperties":false,"required":["key","type"],"properties":{"key":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9_]*$","description":"The property key, used as the key in contact data and as the attribute in the `bird.contact.<key>` broadcast template variable. Lowercase letters, digits, and underscores, starting with a letter. Cannot be changed after creation."},"type":{"$ref":"#/components/schemas/ContactPropertyType"},"fallback_value":{"type":["string","number","boolean","null"],"maxLength":500,"description":"Default used when a contact has no value for this property and the template does not supply an inline fallback. A string, number, boolean, or RFC 3339 datetime string matching the declared type (strings up to `500` characters); a value of another type returns a validation error. Omit or set to `null` for no fallback."}},"example":{"key":"plan","type":"string","fallback_value":"free"}},"ContactPropertyUpdateRequest":{"type":"object","additionalProperties":false,"properties":{"fallback_value":{"type":["string","number","boolean","null"],"maxLength":500,"description":"Default used when a contact has no value for this property and the template does not supply an inline fallback. A string, number, boolean, or RFC 3339 datetime string matching the declared type (strings up to `500` characters); a value of another type returns a validation error. Set to `null` to remove the fallback; omit to leave it unchanged."}},"example":{"fallback_value":"free"}},"AudienceCreateRequest":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name for the audience."},"description":{"type":"string","maxLength":500,"description":"Longer description of who this audience is."},"type":{"type":"string","enum":["static"],"x-enum-varnames":["AudienceTypeStatic"],"default":"static","description":"How the audience's recipients are determined. `static` is an explicit member list you manage by adding and removing contacts."}},"example":{"name":"Newsletter subscribers","description":"Contacts who opted into the monthly product newsletter"}},"AudienceUpdateRequest":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"New display name for the audience. Omit to keep the current name. The name cannot be cleared, and a whitespace-only value returns a validation error."},"description":{"type":["string","null"],"maxLength":500,"description":"Longer description of who this audience is. Set to null to clear."}},"example":{"name":"Newsletter subscribers"}},"AudienceMembershipSummary":{"type":"object","readOnly":true,"additionalProperties":false,"required":["total","data_as_of"],"description":"Exact count of all audience members at the source evaluation instant, including contacts without email and unsubscribed contacts.","properties":{"total":{"type":"integer","format":"int64","minimum":0,"description":"Number of members at evaluation time."},"data_as_of":{"type":"string","minLength":1,"format":"date-time","description":"Source evaluation instant for the live count. Membership changes committed after the read began appear in a later response."}}},"AudienceMembershipResponse":{"type":"object","readOnly":true,"additionalProperties":false,"description":"Exact audience membership at evaluation time. Membership is absent when the count is unavailable.","properties":{"membership":{"$ref":"#/components/schemas/AudienceMembershipSummary"}}},"AudienceMembershipStatisticsPeriod":{"type":"object","readOnly":true,"additionalProperties":false,"required":["from","to","data_as_of"],"description":"Inclusive UTC date window for daily membership observations. Snapshots do not establish continuous freshness; data_as_of is always null.","properties":{"from":{"type":"string","minLength":1,"format":"date","description":"Inclusive first UTC date."},"to":{"type":"string","minLength":1,"format":"date","description":"Inclusive last UTC date."},"data_as_of":{"type":["string","null"],"format":"date-time","description":"Always null. Use each point's observed_at for its actual observation instant."}}},"AudienceMembershipStatisticsPoint":{"type":"object","readOnly":true,"additionalProperties":false,"required":["bucket","total","observed_at"],"description":"First successful membership observation for a UTC date. Both total and observed_at are null when no retained observation exists; a successful empty audience has total zero.","properties":{"bucket":{"type":"string","minLength":1,"format":"date","description":"UTC date of the observation, or the requested date for a gap."},"total":{"type":["integer","null"],"format":"int64","minimum":0,"description":"Exact number of all members at observation time, or null for a gap."},"observed_at":{"type":["string","null"],"format":"date-time","description":"Actual source observation instant, or null for a gap. This is not a day-close count."}}},"AudienceMembershipStatisticsResponse":{"type":"object","readOnly":true,"additionalProperties":false,"required":["period","data"],"description":"Daily membership observations in ascending UTC date order. Missing observations are explicit null gaps; changes between samples are unobserved.","properties":{"period":{"description":"Requested UTC date window.","allOf":[{"$ref":"#/components/schemas/AudienceMembershipStatisticsPeriod"}]},"data":{"type":"array","maxItems":365,"items":{"$ref":"#/components/schemas/AudienceMembershipStatisticsPoint"},"description":"One point for every requested date, including gaps."}}},"AudienceMember":{"type":"object","additionalProperties":false,"required":["contact","joined_at"],"properties":{"contact":{"$ref":"#/components/schemas/Contact"},"joined_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When this contact joined the audience. Members are listed in join order, most recent first.","example":"2026-05-21T10:30:00Z"},"audiences":{"type":"array","readOnly":true,"description":"The audiences this contact belongs to, including the one being listed, most-recently-joined first.","items":{"$ref":"#/components/schemas/AudienceRef"}}}},"AudienceMemberList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of audience members, each a contact paired with the time it joined the audience.","items":{"$ref":"#/components/schemas/AudienceMember"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"AudienceContactsAddRequest":{"type":"object","additionalProperties":false,"required":["contact_ids"],"properties":{"contact_ids":{"type":"array","minItems":1,"maxItems":1000,"items":{"$ref":"#/components/schemas/ContactID"},"description":"Contacts to add to the audience. Adding a contact that is already a member has no effect and keeps its original join time. Duplicate IDs in the list are collapsed. If any ID does not exist in the workspace, the whole request fails with a validation error and no contacts are added."}},"example":{"contact_ids":["con_01krdgeqcxet5s7t44vh8rt9mg"]}},"AudienceContactsRemoveRequest":{"type":"object","additionalProperties":false,"required":["contact_ids"],"properties":{"contact_ids":{"type":"array","minItems":1,"maxItems":1000,"items":{"$ref":"#/components/schemas/ContactID"},"description":"Contacts to remove from the audience. Removing a contact that is not a member has no effect. Duplicate IDs in the list are collapsed. If any ID does not exist in the workspace, the whole request fails with a validation error and no memberships are removed."}},"example":{"contact_ids":["con_01krdgeqcxet5s7t44vh8rt9mg"]}},"MessageDirection":{"type":"string","enum":["outbound","inbound"],"description":"Whether a message was sent from the workspace (`outbound`) or received by it (`inbound`)."},"SMSMessageCategory":{"type":"string","minLength":1,"enum":["transactional","marketing","authentication","service"],"description":"Content classification: why you are sending. Carriers see it, and where a destination country requires the sender to be registered, that registration is approved for a category: a send outside what it covers returns a `422` `SenderCategoryNotPermitted`. A registration approved for `marketing` covers all four values; one approved for `transactional`, `authentication`, or `service` covers those three and not `marketing`. Use `authentication` for a one-time passcode and `marketing` for a promotion; otherwise pick the value matching the message's purpose."},"SMSMessageID":{"type":"string","minLength":1,"pattern":"^sms_[0-9a-hjkmnp-tv-z]{26}$","example":"sms_01krdgeqcxet5s7t44vh8rt9mg"},"SMSMessageStatus":{"type":"string","minLength":1,"enum":["scheduled","accepted","sent","delivered","undelivered","failed","rejected","canceled","expired","received"],"description":"Delivery status:\n\n- `accepted`: Accepted and awaiting carrier handoff.\n- `sent`: Handed to the carrier and awaiting a delivery receipt.\n- `delivered`: Confirmed as delivered.\n- `undelivered`: The carrier reported delivery as failed for a reason that may clear later, such as a handset out of coverage or a carrier at capacity. Bird does not retry it, so reaching the recipient means sending again; a carrier report of another outcome that occurred later, such as a delivery, replaces it.\n- `failed`: The carrier reported delivery as failed for a reason not expected to clear, such as an unassigned number, a recipient who has opted out, or content the carrier refused. Bird does not retry it, but a carrier report of another outcome that occurred later, such as a delivery, replaces it.\n- `rejected`: Refused before carrier handoff.\n- `expired`: Reached its validity limit without a final receipt.\n- `received`: Received as an inbound message.\n\n`scheduled` and `canceled` are declared ahead of the send-later scheduling\nfeature that produces them, so their arrival is not a breaking change. No\nmessage carries either status today.\n"},"SMSBinary":{"type":"object","additionalProperties":false,"required":["data"],"description":"An 8-bit binary SMS payload, sent as one segment. `udh` plus `data` must fit 140 octets.\n","properties":{"udh":{"type":"string","pattern":"^([0-9A-Fa-f]{2}){1,16}$","description":"User data header as hexadecimal, 1-16 octets. Required on a send: a binary send without it returns `422`. Its first octet must count the octets after it, every information element must fit inside it, and concatenation elements (`00`, `08`) are refused because the message is one segment.\n","example":"0605041582158A"},"data":{"type":"string","minLength":2,"pattern":"^([0-9A-Fa-f]{2})+$","description":"The payload after the header, as hexadecimal.","example":"C0FFEE"}},"example":{"udh":"0605041582158A","data":"C0FFEE"}},"SMSTemplateID":{"type":"string","minLength":1,"pattern":"^smt_[0-9a-hjkmnp-tv-z]{26}$","example":"smt_01krdgeqcxet5s7t44vh8rt9mg"},"SMSTemplateVersionID":{"type":"string","minLength":1,"pattern":"^smv_[0-9a-hjkmnp-tv-z]{26}$","example":"smv_01krdgeqcxet5s7t44vh8rt9mg"},"SMSTemplateContentHash":{"type":"string","minLength":1,"readOnly":true,"description":"A fingerprint of SMS template text, prefixed with its algorithm. Compare it within this API version to identify the exact source without transferring it.\n","example":"sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"},"SMSMessagingProfileID":{"type":"string","minLength":1,"pattern":"^mpr_[0-9a-hjkmnp-tv-z]{26}$","example":"mpr_01krdgeqcxet5s7t44vh8rt9mg"},"SMSSegments":{"type":"object","additionalProperties":false,"required":["count","encoding","characters"],"description":"Billable SMS segments, or one unit for MMS.","properties":{"count":{"type":"integer","minimum":1,"readOnly":true,"description":"Number of billable units. MMS always has one unit and is not split into SMS segments.","example":1},"encoding":{"type":"string","minLength":1,"readOnly":true,"enum":["GSM_7BIT","UCS2","BINARY","MMS"],"description":"Encoding used for the body. The `GSM_7BIT` encoding fits 160 septets\n(seven-bit units) in one segment, or 153 per part in a multi-segment\nmessage. The `UCS2` encoding applies when the body contains a character\noutside the GSM 03.38 alphabet, including emoji, CJK, and some accented\ncharacters. It fits 70 UTF-16 code units in one segment, or 67 per part.\n\nNeither limit counts characters, and both alphabets have characters that\ncost two units. Under `GSM_7BIT` there are ten such entries, and they are\nthe whole set: `^`, `{`, `}`, `\\`, `[`, `]`, `~`, `|`, `€`, and the form\nfeed control. Eighty of those fill a single segment. Under `UCS2` an emoji\noutside the Basic Multilingual Plane is a surrogate pair costing two code\nunits, so 35 of those fill a single segment.\n\n`MMS` marks a multimedia message billed as one unit; `characters` counts text code points.\n\n`BINARY` marks an 8-bit binary payload, sent as one segment, where `characters` counts its octets. Only a binary send produces it.\n"},"characters":{"type":"integer","minimum":0,"readOnly":true,"description":"Character count of the body, counted in Unicode code points under `GSM_7BIT` and `UCS2`; under `BINARY` it is the payload's octets, header included. This is not the segment measure: a `GSM_7BIT` extended-table character counts once here but costs two septets, and a `UCS2` emoji outside the Basic Multilingual Plane counts once here but costs two of the segment's 70 code units.\n","example":41}}},"MessageCost":{"type":["object","null"],"additionalProperties":false,"required":["amount","currency_code","transaction_amount","passthrough_amount"],"description":"What was charged for a message, split into the components that make it up. `null` until at least one component has been priced.\n","properties":{"amount":{"type":"string","minLength":1,"readOnly":true,"description":"Total charged, as a decimal string: the sum of the components below. Net of tax, which applies to your wallet balance rather than to an individual charge.\n","example":"0.00990"},"currency_code":{"readOnly":true,"$ref":"#/components/schemas/CurrencyCode","description":"ISO 4217 currency code. Every component is denominated in this currency.","example":"USD"},"transaction_amount":{"type":["string","null"],"readOnly":true,"description":"What we charged to carry the message, as a decimal string. `null` when this component was not priced; `\"0.00000\"` when it priced at zero.\n","example":"0.00790"},"passthrough_amount":{"type":["string","null"],"readOnly":true,"description":"Third-party fees we pass on, as a decimal string, such as US 10DLC carrier surcharges. `null` when this component was not priced; `\"0.00000\"` when it priced at zero.\n","example":"0.00200"}}},"SMSMessageEffectiveOptions":{"type":"object","additionalProperties":false,"description":"The settings Bird applied to this message. Every option is reported, whether you set it on the send or took the default that was in force at the time.\n","required":["smart_encoding"],"properties":{"smart_encoding":{"type":"boolean","description":"Whether Bird replaced characters outside the GSM-7 alphabet in this message's body with their closest equivalent before sending it. When `true`, `text` is the body as sent and `segments` describes that body.\n"},"ignore_suppression":{"type":"boolean","description":"`true` when the send may reach the recipient even if they are suppressed for the sender, including after replying STOP. Only `authentication` and `transactional` messages can set it. Absent otherwise."},"callback_url":{"type":"string","description":"The callback URL that applies to this message, which receives its events instead of your webhook endpoints. Absent when the message has none, in which case its events go to your webhook subscriptions.\n"}},"example":{"smart_encoding":true}},"SMSError":{"type":["object","null"],"additionalProperties":false,"readOnly":true,"required":["code","description","occurred_at"],"description":"Failure detail for a message that could not be delivered or was rejected.","properties":{"code":{"$ref":"#/components/schemas/SMSErrorCode"},"description":{"type":"string","minLength":1,"description":"The failure in words: the provider's reason text, or Bird's explanation for a fraud protection block or a message refused before submission. Free-form, so branch on `code` and show this to a human.","example":"Carrier filtered as spam"},"carrier_error_code":{"type":["string","null"],"description":"Raw provider-supplied error code, finer-grained than the `code` that normalizes it. Not a Bird-defined value, so quote it to support when asking why a message failed. Null when the provider sent none, including any failure decided before one was reached."},"occurred_at":{"type":"string","format":"date-time","minLength":1,"description":"When the failure occurred."},"permanent":{"type":["boolean","null"],"description":"Whether the cause is permanent, so sending the same message again would fail the same way. Describes the cause, not whether Bird retries. Null when Bird cannot tell, such as when the provider returned no code or one without a known permanence, or when Bird blocked the message itself.\n"}}},"SMSInReplyToMessage":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The outbound message a received message was paired with. Bird pairs a reply with the last message the messaging profile sent this subscriber from the receiving number, within the profile's outbound-matching window. The pairing is inferred from timing; the subscriber does not report which message they answered.\n","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/SMSMessageID","description":"ID of the outbound message."},"text":{"type":"string","description":"Text of the outbound message as Bird stored it, with sensitive template values masked. Authentication messages without declared sensitive variables read `**REDACTED**`. Absent once that message is past the read window.\n","example":"Reply YES to confirm your appointment on Friday."},"sent_at":{"type":"string","format":"date-time","description":"Time Bird handed the outbound message to the carrier; the matching window counts from here. Absent once that message is past the read window.\n","example":"2026-10-22T10:14:04.001Z"}}},"SMSFileID":{"type":"string","minLength":1,"pattern":"^smf_[0-9a-hjkmnp-tv-z]{26}$","example":"smf_01krdgeqcxet5s7t44vh8rt9mg"},"SMSMedia":{"type":"object","additionalProperties":false,"description":"A media attachment on an MMS. Inbound attachments include carrier metadata even when their contents could not be retrieved. Outbound attachments retain the submitted URL.\n","required":["mime_type"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/SMSFileID"}],"readOnly":true,"description":"ID of the stored attachment. Absent for outbound URLs and inbound attachments that were not stored."},"mime_type":{"type":"string","minLength":1,"readOnly":true,"description":"Carrier-reported media type for inbound attachments; application/octet-stream when unknown or outbound.","example":"image/jpeg"},"filename":{"type":["string","null"],"readOnly":true,"description":"Filename the sender's device supplied, when it supplied one.","example":"photo.jpg"},"url":{"type":["string","null"],"readOnly":true,"description":"Where to download the attachment, kept for 30 days after the message is received. Null when the attachment was not stored, for example because Bird could not retrieve it from the carrier. For outbound MMS this is the submitted URL, whose availability the caller controls.\n"}}},"SMSMessage":{"type":"object","additionalProperties":false,"required":["id","direction","status","to","from","segments","requested_language","resolved_language","template_id","template_version_id","template_content_hash","created_at"],"properties":{"content_type":{"$ref":"#/components/schemas/SMSContentType"},"id":{"readOnly":true,"$ref":"#/components/schemas/SMSMessageID","description":"ID of the message, assigned when the send is accepted. Pass it as `message_id` to the get-message endpoint.\n"},"direction":{"type":"string","minLength":1,"readOnly":true,"enum":["outbound","inbound"],"description":"Whether the message was sent from a Bird sender (`outbound`) or received from a subscriber (`inbound`)."},"status":{"allOf":[{"$ref":"#/components/schemas/SMSMessageStatus"}],"readOnly":true},"to":{"type":"string","minLength":1,"description":"Where the message went. On an outbound message this is the recipient's phone number in E.164 format; on an inbound one it is your own number that received it.\n","example":"+15551234567"},"from":{"type":"string","minLength":1,"description":"Where the message came from. On an outbound message this is the sender you sent it from: an E.164 number, an alphanumeric sender ID, or a short code. On an inbound message, this is the phone number that sent it to you.\n","example":"+15557654321"},"text":{"type":"string","minLength":1,"description":"The message body. Absent on media-only or subject-only MMS and on a binary message, which returns `binary` instead. For a template send, this is the rendered text after parameter substitution. System template messages preserve the surrounding text and mask sensitive codes with one asterisk per digit. Authentication messages without declared sensitive variables return `**REDACTED**`. The recipient receives the real code; message history retains only its masked representation.\n","example":"Your order has shipped and is on its way."},"binary":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSBinary"}],"description":"The payload of a binary send, in place of `text`. Absent on every other message."},"category":{"oneOf":[{"$ref":"#/components/schemas/SMSMessageCategory"},{"type":"null"}],"description":"Content classification supplied for free text or derived from the template. Null for inbound messages."},"requested_language":{"readOnly":true,"description":"The template language requested by the send, in canonical form. Null when the send named no language or used no template.\n","oneOf":[{"$ref":"#/components/schemas/LanguageTag"},{"type":"null"}]},"resolved_language":{"readOnly":true,"description":"The template language whose text was rendered, in canonical form. Null when the send used no template. This can differ from `requested_language` when the template's fallback policy selects another language.\n","oneOf":[{"$ref":"#/components/schemas/LanguageTag"},{"type":"null"}]},"template_id":{"readOnly":true,"description":"The template rendered for this message, or null for a free-text message.","oneOf":[{"$ref":"#/components/schemas/SMSTemplateID"},{"type":"null"}]},"template_version_id":{"readOnly":true,"description":"The workspace published version or synthetic built-in version rendered at acceptance, or null for a free-text message. For a built-in template, `template_content_hash` identifies the exact catalogue source.\n","oneOf":[{"$ref":"#/components/schemas/SMSTemplateVersionID"},{"type":"null"}]},"template_content_hash":{"readOnly":true,"description":"The rendered language's source fingerprint, or null for a free-text message.","oneOf":[{"$ref":"#/components/schemas/SMSTemplateContentHash"},{"type":"null"}]},"messaging_profile_id":{"readOnly":true,"description":"The messaging profile this message was sent or received under. Absent when no messaging profile applied.","$ref":"#/components/schemas/SMSMessagingProfileID"},"segments":{"$ref":"#/components/schemas/SMSSegments","description":"Segment breakdown for the body."},"cost":{"$ref":"#/components/schemas/MessageCost","description":"What the message cost, split into Bird's charge and any third-party fees passed through. Null until the message has been priced."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"},"description":"Structured `{name, value}` filter labels applied to this message."},"metadata":{"type":"object","additionalProperties":true,"description":"Arbitrary JSON metadata stored on the message and echoed in webhook payloads."},"options":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSMessageEffectiveOptions"}],"description":"The settings applied to this message, with any option you omitted filled in with the default in force when you sent it. Absent on received messages, and on any outbound message for which no settings were recorded.\n"},"validity_period":{"type":"integer","readOnly":true,"description":"The `validity_period` applied to the message, in seconds: the send's own, or else its messaging profile's. Absent when neither set one."},"reference":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/MessageReference"}],"description":"The `reference` from the send request. Absent when the send set none, and on inbound messages."},"cost_center":{"type":"string","readOnly":true,"description":"The `cost_center` applied to the message: the send's own, or else its messaging profile's. Absent when neither set one, and on inbound messages.","example":"CC001234"},"carrier":{"type":"string","readOnly":true,"description":"Carrier that handled the message. Absent until a delivery receipt identifies it, and on a received message the carrier reports it only where a carrier fee applies.","example":"Verizon"},"mcc_mnc":{"type":"string","readOnly":true,"description":"Mobile country code and mobile network code of the carrier. Absent until the carrier is identified.","example":"311480"},"last_error":{"$ref":"#/components/schemas/SMSError","description":"Failure detail on a message that failed, was rejected, was not delivered, or expired. Absent otherwise."},"country_code":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/CountryCode"}],"description":"On an outbound message, the country of the recipient's number. On a received message, the country of the sender's number, or of your number that received it when the sender is not a phone number, such as a short code or an alphanumeric sender. The same value as the message's `sms.*` events' `country_code`. Absent when not known.\n"},"in_reply_to_message":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSInReplyToMessage"}],"description":"On a received message, the outbound message it was paired with through its messaging profile's outbound matching. Absent on outbound messages and on received messages that were not paired.\n"},"subject":{"type":"string","readOnly":true,"description":"MMS subject. Absent on any message that carries none."},"media":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/SMSMedia"},"description":"MMS attachments. Omitted when absent or redacted for an authentication send. Outbound entries retain submitted URLs; inbound entries describe stored attachments.\n"},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the message was accepted (outbound) or received (inbound).","example":"2026-05-21T12:00:00Z"},"sent_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the message was handed to the carrier. Null until then."},"delivered_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When delivery was confirmed. Null until then."}},"example":{"id":"sms_01krdgeqcxet5s7t44vh8rt9mg","direction":"outbound","content_type":"mms","status":"accepted","from":"+12025550123","to":"+12025550199","text":"Order ready","subject":"Order update","category":"transactional","media":[{"mime_type":"application/octet-stream","url":"https://example.com/order.jpg"}],"segments":{"count":1,"encoding":"MMS","characters":11},"requested_language":null,"resolved_language":null,"template_id":null,"template_version_id":null,"template_content_hash":null,"created_at":"2026-05-21T12:00:00Z"}},"SMSMessageList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of SMS messages, newest first.","items":{"$ref":"#/components/schemas/SMSMessage"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"SMSSendOptions":{"type":"object","additionalProperties":false,"description":"Settings that change how Bird processes this message. Each option applies to this send only; omit one to use the value of the messaging profile in `messaging_profile_id`, or its default when the profile sets none.\n","properties":{"smart_encoding":{"type":"boolean","default":false,"description":"Replace characters outside the GSM-7 alphabet, typically curly quotes, dashes, ellipses, fullwidth forms and non-breaking spaces, with their closest GSM-7 equivalent before sending. One such character forces the whole body into `UCS2`, which more than halves the characters per segment, so replacing them often lowers the segment count and the cost. Off by default, because it alters the body you composed. The replacement is all-or-nothing: a body that still holds a character outside the alphabet, such as an emoji or a non-Latin script, is sent exactly as supplied. The message's `text` on a read is the body as sent."},"ignore_suppression":{"type":"boolean","default":false,"description":"Send even if the recipient is suppressed for the sender, including after replying STOP: Bird skips every suppression reason and records the flag on the message, while communication preferences the recipient revoked still apply. Only `authentication` and `transactional` messages take it; `true` on a `marketing` or `service` message returns `422`, as does any use before Bird enables it for your workspace. Omit it to use the setting of the profile in `messaging_profile_id`."},"callback_url":{"type":["string","null"],"format":"uri","maxLength":2048,"description":"An HTTPS URL that receives this message's events instead of your webhook endpoints; a private, loopback or link-local host returns `422`. The URL is fixed when Bird accepts the message, so later profile changes do not reroute it. Each event is a POST, retried on failure and signed with your workspace callback signing secret, which `rotateWebhookCallbackSigningSecret` creates and returns once. While the URL applies, the message's events skip your plain webhook endpoints, with no fallback when the callback fails; MCP Events subscriptions and connector endpoints still receive them. The `callback_events` of the profile in `messaging_profile_id` choose which events go to the URL. Omit it to use that profile's callback URL, or send `null` to send the events to your webhook subscriptions.","example":"https://receipts.example.com/bird/sms"},"track_clicks":{"type":"boolean","description":"Preview feature: link click tracking. Defaults to `false`. Currently unavailable; setting this to `true` returns `422 SMSUnsupportedFeature`."},"max_price_per_segment":{"type":"number","description":"Preview feature: per-segment price ceiling. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`."}},"example":{"smart_encoding":true}},"SMSTemplateSend":{"type":"object","additionalProperties":false,"description":"A send-by-template reference. Identify the template by `id` or `slug`, or use the deprecated `name` for a legacy built-in template. Supply exactly one reference, optionally select a language, and pass variable values in `parameters`.\n","oneOf":[{"required":["id"]},{"required":["slug"]},{"required":["name"]}],"properties":{"id":{"description":"The workspace or built-in template to send, by ID.","$ref":"#/components/schemas/SMSTemplateID"},"slug":{"allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"description":"The workspace or built-in template to send, by its immutable slug. Read the template's live version to see its variables.\n","example":"bird_otp_verification_ttl"},"name":{"type":"string","minLength":1,"deprecated":true,"description":"Deprecated. Use `slug` instead. This resolves legacy built-in catalogue names and never matches a workspace template's display name.\n"},"language":{"allOf":[{"$ref":"#/components/schemas/LanguageTag"}],"description":"Which of the template's languages to send. Omit it to send the template's default language, unless the template sets `language_source_required`, in which case a send naming no language is rejected. When the template does not carry the language you ask for, its own `on_missing_language` setting decides whether the closest available language is sent instead or the send is rejected.\n","example":"fr"},"parameters":{"type":"object","additionalProperties":true,"description":"Values for the template's variables, keyed by variable name. Read the live version to see the accepted keys and formats. A missing key, an undeclared key, an invalid value, or a serialized object over 16 KiB returns `422`.\n","example":{"code":"493021","ttl":"10"}}}},"SMSMessageSendRequest":{"type":"object","additionalProperties":false,"description":"A message to send. Supply direct content (`text` and/or `media_urls`, with an optional `subject`), a stored `template`, or `binary`. A nonempty subject or media list selects MMS, which requires a recipient with calling code +1 and is charged as one message. Direct content requires `category` unless a messaging profile supplies a default. A subject alone is rejected.\n","required":["to"],"anyOf":[{"required":["text"]},{"required":["template"]},{"required":["binary"]},{"required":["media_urls"],"properties":{"media_urls":{"minItems":1}}}],"not":{"anyOf":[{"required":["text","template"],"properties":{"text":{},"template":{}}},{"required":["text","binary"],"properties":{"text":{},"binary":{}}},{"required":["template","binary"],"properties":{"template":{},"binary":{}}},{"required":["template","category"],"properties":{"template":{},"category":{}}},{"required":["template","media_urls"],"properties":{"template":{},"media_urls":{}}},{"required":["template","subject"],"properties":{"template":{},"subject":{}}},{"required":["binary","subject"],"properties":{"binary":{},"subject":{}}},{"required":["binary","media_urls"],"properties":{"binary":{},"media_urls":{}}}]},"properties":{"to":{"type":"string","minLength":1,"description":"Recipient phone number in E.164 format (for example `+14155550100`), or in national format when you also pass `to_country_code`. One recipient per message. The number is stored and returned in canonical E.164; a recipient that cannot be routed returns a `422` `SMSInvalidRecipient`.\n","example":"+14155550100"},"to_country_code":{"type":"string","pattern":"^[A-Z]{2}$","description":"The ISO 3166-1 alpha-2 country whose national numbering plan `to` is written in, such as `NL` for `0612345678`. Bird converts `to` to E.164 before checking the destination, price and sender. An E.164 `to` is still accepted when its country calling code matches this country; a mismatch, or a national number that is not valid in this country, returns a `422` `SMSInvalidRecipient`. Omit it to send `to` in E.164.\n","example":"NL"},"from":{"type":"string","minLength":1,"description":"Sender the workspace holds: a number it owns in E.164, such as `+15557654321`, a short code, such as `24680`, or an alphanumeric sender ID it has claimed, such as `MyBrand`. Any other sender returns `422` `SMSSenderNotConfigured`, and an alphanumeric sender must also be permitted, and where required registered, for the destination country. Required on a free-text send and a workspace-template send, unless the profile in `messaging_profile_id` selects a sender for the destination country or has a default sender; omitting it otherwise returns `422`. A built-in template selects its sender itself and rejects `from`.","example":"+15557654321"},"text":{"type":"string","minLength":1,"description":"Message body. Required for direct content unless `media_urls` is nonempty. Text-only SMS allows up to 12 segments; longer SMS returns `422`. MMS text is sent without SMS segmentation or smart encoding.","example":"Your verification code is 123456."},"binary":{"allOf":[{"$ref":"#/components/schemas/SMSBinary"}],"description":"Send an 8-bit binary payload instead of `text` or `template`. Requires `category` `transactional` and refuses `options.smart_encoding`. It is sent and charged as one segment.\n"},"category":{"allOf":[{"$ref":"#/components/schemas/SMSMessageCategory"}],"description":"Content classification: why you are sending. Required on a free-text send unless the messaging profile in `messaging_profile_id` sets a default category; omit it on a template send, where the category is derived from the template. Where the destination country requires the sender to be registered, a category outside what that registration covers returns a `422` `SenderCategoryNotPermitted`.\n"},"validity_period":{"type":"integer","minimum":60,"maximum":172800,"description":"How long, in seconds (60-172800), the message may wait for delivery after acceptance. Bird does not submit it to the carrier after that deadline, and passes the remaining time to the carrier where the route supports it. A message that misses the deadline before reaching the carrier ends `rejected` or `failed`; `expired` comes only from a carrier report. Omit it to use the validity period of the profile in `messaging_profile_id`, or the carrier's own rules when the profile sets none."},"reference":{"allOf":[{"$ref":"#/components/schemas/MessageReference"}],"description":"An identifier you want to find this message by, such as an order or ticket number, matched exactly by the message list's `reference` filter. Set it only when you need to search on it, and put any other data in `metadata`. Stored on the message, returned on reads and echoed in webhook payloads. Several messages can share one.\n"},"cost_center":{"type":"string","minLength":1,"maxLength":64,"description":"Your accounting identifier for this message, such as a department code. Stored on the message and its usage record, returned on reads, and echoed in webhook payloads. Omit it to use the cost center of the messaging profile in `messaging_profile_id`. Accepting it does not change how the message is priced.\n","example":"CC001234"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"},"maxItems":20,"description":"Structured `{name, value}` labels, up to 20 per send. You can filter the list endpoint by tag name, slice analytics by tag, and read them in webhook payloads. Use them for low-cardinality dimensions such as `category` or `experiment_variant`, and `metadata` for context you do not filter by."},"metadata":{"type":"object","additionalProperties":true,"description":"Arbitrary JSON object stored on the message, returned on API reads, and echoed in webhook payloads. Maximum 2 KB serialized. Use metadata for per-send context like internal IDs and foreign keys. For low-cardinality filterable labels, use `tags` instead.\n"},"options":{"allOf":[{"$ref":"#/components/schemas/SMSSendOptions"}],"description":"What Bird does to this message on its way out, such as `smart_encoding`. The message being relayed stays at the top level: its recipient, sender, content, and the delivery instructions the carrier acts on.\n"},"media_urls":{"type":"array","items":{"type":"string","format":"uri"},"description":"Absolute HTTP(S) attachment URLs accessible without authentication. A nonempty list selects MMS. Keep URLs accessible through delivery retries. The carrier checks downloads after acceptance: each file may be at most 600 KiB and the total at most 900 KiB. Unreachable, nonpublic or oversized media fails asynchronously through delivery status.\n"},"subject":{"type":"string","description":"MMS subject. A nonempty subject selects MMS and requires text or media. Cannot accompany a template or binary payload."},"messaging_profile_id":{"type":"string","description":"The messaging profile that supplies this message's sender and defaults. Without `from`, Bird sends from the profile's sender for the destination country, or its default sender. An omitted `category` on a free-text send, `smart_encoding`, `cost_center`, `validity_period`, `options.callback_url` and `options.ignore_suppression` take the profile's settings, and values set on the message take precedence. A built-in template sends from Bird's system sender and ignores the profile's senders. A profile that does not exist in this workspace returns `422` `SMSMessagingProfileNotFound`, and a `from` bound to a different profile returns `422` `SMSMessagingProfileSenderBound`."},"scheduled_at":{"type":"string","format":"date-time","description":"Preview feature: send-later scheduling. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`."},"template":{"allOf":[{"$ref":"#/components/schemas/SMSTemplateSend"}],"description":"Send using a stored template instead of free text. The category is derived from the template, so `category`, `subject` and `media_urls` are rejected. A workspace template requires `from`; a built-in template selects its sender and rejects `from`.\n"},"broadcast_id":{"type":"string","description":"Preview feature: broadcast correlation. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`."},"campaign_id":{"type":"string","description":"Preview feature: campaign correlation for analytics. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`."},"audience_id":{"type":"string","description":"Preview feature: audience-targeted sends. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`."},"contact_id":{"type":"string","description":"Preview feature: contact-targeted sends. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`."},"topic_id":{"type":"string","description":"Preview feature: topic-gated sends. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`."},"personalization":{"type":"object","additionalProperties":true,"description":"Preview feature: per-recipient substitution for batch sends. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`."}},"example":{"to":"+14155550100","from":"+15557654321","text":"Your verification code is 123456.","category":"authentication","options":{"smart_encoding":true},"tags":[{"name":"campaign","value":"signup"}],"metadata":{"user_id":"usr_12345"}}},"SMSSenderType":{"type":"string","minLength":1,"enum":["long_code","short_code","alphanumeric","toll_free"],"description":"The kind of sender identity a message was sent from: a standard long-code number, a short code, an alphanumeric sender ID, or a toll-free number. Toll-free is its own value rather than a kind of long code, because it carries a separate regulatory regime and both sending policy and pricing key on it directly.\n"},"SMSMessageBatchRequest":{"type":"object","additionalProperties":false,"description":"Batch of SMS message send requests.","required":["messages"],"properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/SMSMessageSendRequest"},"minItems":1,"maxItems":100,"description":"SMS message send requests, up to 100. Each is an independent send; all are validated before any is queued."}}},"SMSBatchSummary":{"type":"object","additionalProperties":false,"readOnly":true,"required":["accepted_count"],"description":"Aggregate result for an SMS batch.","properties":{"accepted_count":{"type":"integer","minimum":0,"description":"Number of messages accepted in the batch. Acceptance is all-or-nothing, so this equals the number of messages submitted.\n","example":2}}},"SMSMessageBatchResponse":{"type":"object","additionalProperties":false,"required":["data","summary"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SMSMessage"},"description":"One entry per message in the batch, in submission order."},"summary":{"$ref":"#/components/schemas/SMSBatchSummary","description":"Aggregate result for the batch."}}},"SMSEvent":{"type":"object","additionalProperties":false,"required":["id","type","occurred_at"],"properties":{"id":{"type":"string","minLength":1,"readOnly":true,"pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"Unique identifier for this event, stable across repeated fetches of the message.","example":"evt_01krdgeqcxet5s7t44vh8rt9mg"},"type":{"type":"string","minLength":1,"readOnly":true,"x-extensible-enum":["sms.accepted","sms.sent","sms.delivered","sms.undelivered","sms.failed","sms.rejected","sms.expired"],"description":"Lifecycle event type. The `sms.accepted` event means the API accepted the request. The `sms.sent` event means the message reached the carrier. The `sms.delivered` event confirms delivery. The `sms.undelivered`, `sms.failed`, and `sms.expired` events describe delivery failures. The `sms.rejected` event means the message was refused before carrier handoff. This is an open enum. Accept unrecognized values.\n","example":"sms.delivered"},"occurred_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When this event occurred.","example":"2026-05-21T12:00:04Z"},"carrier":{"type":"string","readOnly":true,"description":"Carrier that handled the message. Present on `sms.sent` and `sms.delivered` once identified, absent otherwise.","example":"Verizon"},"mcc_mnc":{"type":"string","readOnly":true,"description":"Mobile country code and mobile network code of the carrier. Present on `sms.sent` and `sms.delivered` once identified, absent otherwise.","example":"311480"},"error":{"$ref":"#/components/schemas/SMSError","description":"Failure detail. Present only on `sms.failed`, `sms.undelivered`, `sms.rejected`, and `sms.expired` events."}}},"SMSEventList":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","description":"Timeline events for this SMS message, in chronological order. The bounded timeline is returned in full and is not paginated.","items":{"$ref":"#/components/schemas/SMSEvent"}}}},"TemplateScope":{"type":"string","minLength":1,"readOnly":true,"enum":["system","workspace"],"description":"Whether the template is one of our built-in templates (`system`) or one your workspace created (`workspace`).\n"},"SMSTemplateCategory":{"type":"string","minLength":1,"enum":["transactional","marketing","authentication"],"description":"Why messages use this template. Use `authentication` for one-time codes, `marketing` for promotions, and `transactional` for service messages.\n"},"TemplateStatus":{"type":"string","minLength":1,"readOnly":true,"enum":["draft","pending","active","rejected","inactive"],"description":"Where the template stands as a whole. The same five states on every channel.\n\n- `draft`: nothing has ever gone live.\n- `pending`: nothing is live and at least one language is in review.\n- `active`: at least one language is live, so something can be sent.\n- `rejected`: it was reviewed and every language was refused.\n- `inactive`: nothing is live and nothing is in review, so content was withdrawn or was blocked before anything went live.\n\nA template with one language live is `active` even while another is still\ndrafted or refused. Read `languages` for the state of each language and its\nreason.\n\nWhich values a channel reports follows its review model. A channel whose\ncontent a third party reviews uses all five. On email and SMS, where content\ngoes live on publish, a template is `draft`, `active` or `inactive`, and\n`pending` and `rejected` are reserved for the review stage coming to both, so\na template reaching either is not a breaking change.\n","example":"active"},"SMSTemplateSortField":{"type":"string","enum":["created_at"],"default":"created_at","description":"Field to sort SMS templates and their versions by."},"TemplateLanguageStatus":{"type":"string","minLength":1,"readOnly":true,"x-extensible-enum":["draft","live","superseded"],"description":"Status of one template language on channels without third-party review.\n\n- `draft`: it has never been published.\n- `live`: it is available to sends.\n- `superseded`: a later version replaced it.\n\nTreat an unknown value as not sendable.\n","example":"live"},"SMSTemplateLanguageState":{"type":"object","additionalProperties":false,"description":"Whether a language is live and whether its draft has unpublished changes.","required":["status"],"properties":{"status":{"readOnly":true,"$ref":"#/components/schemas/TemplateLanguageStatus"},"draft":{"type":"boolean","readOnly":true,"description":"Whether the draft has an unpublished change for this language. When true beside `live`, sends keep using the older published text until submit.\n"}}},"SMSTemplateSummary":{"type":"object","additionalProperties":false,"description":"An SMS template without content or draft concurrency settings.","required":["id","workspace_id","slug","name","description","scope","status","category","default_language","available_languages","languages","draft_version_id","live_version_id","published_version_id","last_submitted_at","created_at","updated_at"],"properties":{"id":{"readOnly":true,"description":"Template ID.","$ref":"#/components/schemas/SMSTemplateID"},"workspace_id":{"readOnly":true,"description":"The workspace that owns the template. Null for a built-in `system` template.","oneOf":[{"$ref":"#/components/schemas/WorkspaceID"},{"type":"null"}]},"slug":{"allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"readOnly":true,"description":"The immutable handle used to address and send the template."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"The template's display name."},"description":{"type":["string","null"],"description":"What the template is for. Null if it has no description."},"scope":{"$ref":"#/components/schemas/TemplateScope"},"status":{"$ref":"#/components/schemas/TemplateStatus"},"category":{"$ref":"#/components/schemas/SMSTemplateCategory"},"draft_version_id":{"readOnly":true,"description":"The permanent editable draft version. Null for a built-in template.","oneOf":[{"$ref":"#/components/schemas/SMSTemplateVersionID"},{"type":"null"}]},"live_version_id":{"readOnly":true,"description":"The version sends resolve to, or null before first publication.","oneOf":[{"$ref":"#/components/schemas/SMSTemplateVersionID"},{"type":"null"}]},"published_version_id":{"readOnly":true,"deprecated":true,"description":"Deprecated. Use `live_version_id`, which carries the same value.","oneOf":[{"$ref":"#/components/schemas/SMSTemplateVersionID"},{"type":"null"}]},"languages":{"type":"object","readOnly":true,"propertyNames":{"type":"string","minLength":2,"maxLength":35},"additionalProperties":{"$ref":"#/components/schemas/SMSTemplateLanguageState"},"description":"Each language and its live or draft state, keyed by canonical BCP-47 tag."},"default_language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The draft's default language."},"available_languages":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/LanguageTag"},"description":"Languages the live version can currently send. Empty before first publication."},"last_submitted_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was last published. Null before first publication and for built-in templates."},"created_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was created. Null for built-in templates."},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was last modified. Null for built-in templates."}}},"SMSTemplateList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"One page of SMS templates.","items":{"$ref":"#/components/schemas/SMSTemplateSummary"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"SMSTemplateText":{"type":["string"],"minLength":0,"description":"SMS template text, limited to 16 KiB of UTF-8 source. Blank text can be saved in a draft but cannot be published. Workspace templates support scalar variables, conditional text, and bounded filters. Loops, assignments, captures, partials, collections, and string-expanding filters are rejected.\n"},"TemplateOnMissingLanguage":{"type":"string","minLength":1,"enum":["fallback","fail"],"x-enum-varnames":["TemplateOnMissingLanguageFallback","TemplateOnMissingLanguageFail"],"description":"What a send or a preview does when it asks for a language the template\ncannot serve.\n\n`fallback` serves the closest match instead. It tries a broader form of the\nsame language first, so a request for `pt-BR` can be served by a stocked\n`pt`, and then the template's default language. A send never fails because a\nlanguage is missing.\n\n`fail` rejects the send rather than serving a different language, for content\nwhere sending the wrong language is worse than not sending at all. It matches\nthe requested tag or a broader form of it and refuses a sibling variant, so\n`pt-BR` is never served by `pt-PT`. A send that names no language still uses\nthe default language.\n\nThe default is per channel and stated on each channel's own field, because\nwhat a wrong-language send costs differs. Where every language is separately\nreviewed and separately priced, falling back silently would send content the\nrecipient did not expect at a rate the sender did not choose.\n","example":"fallback"},"SMSTemplate":{"type":"object","additionalProperties":false,"description":"One SMS template identity and its authoring state. Content and variables live on versions, so this resource stays shallow.\n","required":["id","workspace_id","slug","name","description","scope","status","category","default_language","available_languages","languages","on_missing_language","language_source_required","draft_version_id","live_version_id","published_version_id","revision","last_submitted_at","created_at","updated_at"],"properties":{"id":{"readOnly":true,"description":"Template ID.","$ref":"#/components/schemas/SMSTemplateID"},"workspace_id":{"readOnly":true,"description":"The workspace that owns the template. Null for a built-in `system` template.","oneOf":[{"$ref":"#/components/schemas/WorkspaceID"},{"type":"null"}]},"slug":{"allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"readOnly":true,"description":"The immutable handle used to address and send the template. A built-in template's slug starts with `bird_`.\n","example":"order-shipped"},"name":{"type":"string","minLength":1,"maxLength":255,"description":"The template's display name. It defaults to the slug and can be changed on workspace templates.","example":"Order shipped"},"description":{"type":["string","null"],"description":"What the template is for. Null if it has no description."},"scope":{"$ref":"#/components/schemas/TemplateScope"},"status":{"$ref":"#/components/schemas/TemplateStatus"},"category":{"$ref":"#/components/schemas/SMSTemplateCategory"},"draft_version_id":{"readOnly":true,"description":"The permanent editable draft version. Null for a built-in template.","oneOf":[{"$ref":"#/components/schemas/SMSTemplateVersionID"},{"type":"null"}]},"live_version_id":{"readOnly":true,"description":"The version sends resolve to, or null before a workspace template is first published. A built-in template points to a synthetic published version that projects its current catalogue content.\n","oneOf":[{"$ref":"#/components/schemas/SMSTemplateVersionID"},{"type":"null"}]},"published_version_id":{"readOnly":true,"deprecated":true,"description":"Deprecated. Use `live_version_id`, which carries the same value.","oneOf":[{"$ref":"#/components/schemas/SMSTemplateVersionID"},{"type":"null"}]},"revision":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"The draft revision to use for concurrent-edit checks. Null for a built-in template."},"languages":{"type":"object","readOnly":true,"propertyNames":{"type":"string","minLength":2,"maxLength":35},"additionalProperties":{"$ref":"#/components/schemas/SMSTemplateLanguageState"},"description":"Each language the template has, keyed by canonical BCP-47 tag, with its live state and whether the draft contains unpublished changes. Content is available from version reads.\n","example":{"en":{"status":"live"},"nl":{"status":"live","draft":true}}},"default_language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The draft's default language. Sends continue using the live version's default until the draft is published.\n"},"available_languages":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/LanguageTag"},"description":"Languages the live version can currently send. Empty before first publication.\n","example":["en"]},"on_missing_language":{"allOf":[{"$ref":"#/components/schemas/TemplateOnMissingLanguage"}],"readOnly":true,"description":"How a send handles a requested language that the live version does not have."},"language_source_required":{"type":"boolean","readOnly":true,"description":"Whether each send must name a language instead of using the live version's default."},"last_submitted_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was last published. Null before first publication and for built-in templates."},"created_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was created. Null for built-in templates."},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was last modified. Null for built-in templates."}}},"TemplateVariable":{"type":"object","additionalProperties":false,"description":"A single variable slot a template fills in when it sends. Most slots are filled from the values supplied when sending; a slot with `system` true is filled by Bird itself, per recipient. The same shape on email, SMS and WhatsApp, so reading what a template needs works the same way whichever channel you are sending on.\n","required":["key","type","required","constraint"],"properties":{"key":{"type":"string","minLength":1,"readOnly":true,"description":"The key this slot is filled by. When `system` is true it is the reserved `bird` key or a dotted path beneath it, such as `bird.contact.first_name`, and naming it in a send is rejected. Otherwise, on email and SMS it is the key you set in the send's `parameters` object, and on WhatsApp the key in the send's `template.parameters`, or the `name` on the matching parameter inside `components`. A WhatsApp template whose placeholders are positional uses the position itself as `1`, `2` and so on, and values with no placeholder use fixed keys: `header_url`, `header_filename`, `header_location` and `code`, plus `button_url` (or `button_url_1`, `button_url_2` for a carousel card) for a url button whose suffix is numbered.\n"},"type":{"type":"string","minLength":1,"readOnly":true,"x-extensible-enum":["code","ttl","count","ref","date","date_time","amount","currency","domain","app_hash","url","image","timestamp","timezone","location","text"],"description":"The value type this slot accepts. Each typed slot rejects a value that does not match its `constraint`. Built-in SMS templates use typed slots (`code`, `amount` and the rest); `domain` is a lowercase DNS domain name such as `example.com`, which the verification templates fill to bind a passcode to a website, and `app_hash` is an 11-character Android SMS Retriever app hash such as `FA+9qCX9VSu`, which they fill to bind it to an Android app. Apple Messages templates type a variable from its content: the field it fills (`url`, `image`, `timestamp`, `location`, `timezone`) or the formatting filter applied to it (`date`, `date_time`, `amount`, `currency`). Email and workspace SMS templates use `text`. WhatsApp templates use `text`, plus `url` for a media header's file and `location` for a location header. A `location` value is an object with `latitude` and `longitude`, and optionally `name` and `address`. On Apple Messages, `name` becomes the location's title and `address` is not shown. Workspace SMS parameters must be scalar values.\n"},"required":{"type":"boolean","readOnly":true,"description":"Whether the send must supply this variable. Omitting a required value returns `422` on every channel. On Apple Messages, a later time slot's start that is used nowhere else is optional: a send that omits it drops that slot. Always false when `system` is true, because you do not supply that slot's value.\n"},"constraint":{"type":"string","minLength":1,"readOnly":true,"description":"A plain-language description of what values this variable accepts. When `system` is true it names where Bird takes the value from instead, because there is no value for you to send.\n"},"sensitive":{"type":"boolean","readOnly":true,"default":false,"description":"Whether this slot requires redacted message history. Published email template sends that store recipient snapshots reject sensitive inputs before acceptance. Other channels retain their own sensitive-input delivery and retention rules.\n"},"system":{"type":"boolean","readOnly":true,"default":false,"description":"Whether the value comes from Bird rather than from the send. Absent means false. System slots are identified by the reserved `bird` key or a dotted path beneath it. They appear on email templates, and on WhatsApp templates whose parameter bindings read contact data; every SMS slot is yours to fill. A draft can also name a reserved key no Bird value fills, including `bird` itself: `constraint` says so, and publishing that draft is rejected.\n"}}},"SMSTemplateVersionStatus":{"type":"string","minLength":1,"readOnly":true,"enum":["draft","published"],"description":"Whether the version is the editable draft or published. Published workspace versions are immutable and remain `published` after a later version goes live. A built-in template's synthetic published version projects the current catalogue entry.\n","example":"published"},"SMSTemplateVersionSummary":{"type":"object","additionalProperties":false,"description":"One SMS template version without its text.","required":["id","template_id","version_number","status","revision","variables","default_language","available_languages","created_at","published_at"],"properties":{"id":{"readOnly":true,"description":"Template version ID.","$ref":"#/components/schemas/SMSTemplateVersionID"},"template_id":{"readOnly":true,"description":"The template this version belongs to.","$ref":"#/components/schemas/SMSTemplateID"},"version_number":{"type":["integer","null"],"minimum":1,"readOnly":true,"description":"Sequential publication number. Null for the draft; a built-in template reports 1."},"status":{"readOnly":true,"$ref":"#/components/schemas/SMSTemplateVersionStatus"},"revision":{"type":"integer","minimum":0,"readOnly":true,"description":"The version's revision counter."},"variables":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/TemplateVariable"},"description":"Variables inferred from the version's text and shared by each language."},"default_language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The language this version treats as its default."},"available_languages":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/LanguageTag"},"description":"Languages this version contains, without their text."},"created_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the version was created. Null for a built-in template's synthetic version."},"published_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the version was published. Null for the draft and for a built-in template's synthetic version."}},"example":{"id":"smv_01krdgeqcxet5s7t44vh8rt9mg","template_id":"smt_01krdgeqcxet5s7t44vh8rt9mg","version_number":1,"status":"published","revision":1,"variables":[{"key":"order_number","type":"text","required":true,"constraint":"A string, number, or boolean."}],"default_language":"en","created_at":"2026-09-10T09:00:00Z","published_at":"2026-09-10T09:00:00Z","available_languages":["en"]}},"SMSTemplateVersionList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"One page of the template's versions, newest first.","items":{"$ref":"#/components/schemas/SMSTemplateVersionSummary"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"SMSTemplateVersionLanguage":{"type":"object","additionalProperties":false,"description":"One language's content and revision metadata within a version.","required":["text","revision","content_hash","updated_at"],"properties":{"text":{"$ref":"#/components/schemas/SMSTemplateText","readOnly":true,"description":"Stored template text, including its `{{ variable }}` placeholders."},"revision":{"type":"integer","minimum":0,"readOnly":true,"description":"This language's revision counter."},"content_hash":{"readOnly":true,"$ref":"#/components/schemas/SMSTemplateContentHash"},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this language was last saved. Null for a built-in template."}},"example":{"text":"Your order {{ order_number }} is on its way.","revision":1,"content_hash":"sha256:3d948846f5f773fb7bed8ab81b57f3d0ff2cbff24cb549718f4d389f1ab0300a","updated_at":"2026-09-10T09:00:00Z"}},"SMSTemplateVersion":{"type":"object","additionalProperties":false,"description":"One SMS template version with its content. A workspace template keeps one editable draft and immutable published versions. A built-in template exposes its current catalogue content as one synthetic published version.\n","required":["id","template_id","version_number","status","revision","variables","languages","default_language","created_at","published_at"],"properties":{"id":{"readOnly":true,"description":"Template version ID.","$ref":"#/components/schemas/SMSTemplateVersionID"},"template_id":{"readOnly":true,"description":"The template this version belongs to.","$ref":"#/components/schemas/SMSTemplateID"},"version_number":{"type":["integer","null"],"minimum":1,"readOnly":true,"description":"Sequential publication number. Null for the draft; a built-in template reports 1."},"status":{"readOnly":true,"$ref":"#/components/schemas/SMSTemplateVersionStatus"},"revision":{"type":"integer","minimum":0,"readOnly":true,"description":"The version revision. A draft revision advances with each metadata or content change. Published workspace versions are frozen; a built-in template's synthetic version reports 0.\n"},"variables":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/TemplateVariable"},"description":"Variables inferred from the version's text. Every language in a publishable SMS version uses the same set. Built-in templates may apply additional typed constraints described by each variable.\n"},"languages":{"type":"object","readOnly":true,"propertyNames":{"type":"string","minLength":2,"maxLength":35},"additionalProperties":{"$ref":"#/components/schemas/SMSTemplateVersionLanguage"},"description":"Full content for each language, keyed by canonical BCP-47 tag."},"default_language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The language this version treats as its default."},"created_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the version was created. Null for a built-in template's synthetic version."},"published_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the version was published. Null for the draft and for a built-in template's synthetic version."}},"example":{"id":"smv_01krdgeqcxet5s7t44vh8rt9mg","template_id":"smt_01krdgeqcxet5s7t44vh8rt9mg","version_number":1,"status":"published","revision":1,"variables":[{"key":"order_number","type":"text","required":true,"constraint":"A string, number, or boolean."}],"languages":{"en":{"text":"Your order {{ order_number }} is on its way.","revision":1,"content_hash":"sha256:3d948846f5f773fb7bed8ab81b57f3d0ff2cbff24cb549718f4d389f1ab0300a","updated_at":"2026-09-10T09:00:00Z"}},"default_language":"en","created_at":"2026-09-10T09:00:00Z","published_at":"2026-09-10T09:00:00Z"}},"SMSTemplateLanguageSummary":{"type":"object","additionalProperties":false,"description":"One language of an SMS template version without its text.","required":["language","revision","content_hash","updated_at"],"properties":{"language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The language in canonical BCP-47 form."},"revision":{"type":"integer","minimum":0,"readOnly":true,"description":"This language's revision counter."},"content_hash":{"readOnly":true,"$ref":"#/components/schemas/SMSTemplateContentHash"},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this language was last saved. Null for a built-in template."}},"example":{"language":"en","revision":1,"content_hash":"sha256:3d948846f5f773fb7bed8ab81b57f3d0ff2cbff24cb549718f4d389f1ab0300a","updated_at":"2026-09-10T09:00:00Z"}},"SMSTemplateLanguageList":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","description":"The version's languages ordered by canonical tag, without text.","items":{"$ref":"#/components/schemas/SMSTemplateLanguageSummary"}}}},"SMSTemplateLanguage":{"type":"object","additionalProperties":false,"description":"One language's full SMS template text and revision metadata.","required":["language","text","revision","content_hash","updated_at"],"properties":{"language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The language in canonical BCP-47 form."},"text":{"$ref":"#/components/schemas/SMSTemplateText","readOnly":true,"description":"Stored template text, including its `{{ variable }}` placeholders."},"revision":{"type":"integer","minimum":0,"readOnly":true,"description":"This language's revision counter, used for concurrent-edit checks on draft writes."},"content_hash":{"readOnly":true,"$ref":"#/components/schemas/SMSTemplateContentHash"},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this language was last saved. Null for a built-in template."}},"example":{"language":"en","text":"Your order {{ order_number }} is on its way.","revision":1,"content_hash":"sha256:3d948846f5f773fb7bed8ab81b57f3d0ff2cbff24cb549718f4d389f1ab0300a","updated_at":"2026-09-10T09:00:00Z"}},"SMSSuppressionReasonFilter":{"type":"string","enum":["keyword_stop","carrier_opted_out","manual"]},"SMSSuppressionID":{"type":"string","minLength":1,"pattern":"^ssu_[0-9a-hjkmnp-tv-z]{26}$","example":"ssu_01krdgeqcxet5s7t44vh8rt9mg"},"SMSSuppressionReason":{"type":"string","minLength":1,"x-extensible-enum":["keyword_stop","carrier_opted_out","manual"],"description":"Reason this sender cannot message the subscriber:\n\n- `keyword_stop`: The subscriber sent a stop keyword. A start keyword clears it.\n- `carrier_opted_out`: The carrier reported the opt-out.\n- `manual`: Your workspace added the suppression through the API or dashboard.\n\nThis is an open enum. Accept unrecognized values.\n"},"SMSSuppressionOrigin":{"type":"string","minLength":1,"x-extensible-enum":["keyword","dlr_event","api_key","user"],"description":"How the opt-out reached us:\n\n- `keyword`: an inbound message from the subscriber.\n- `dlr_event`: a carrier delivery report.\n- `api_key`: an API call.\n- `user`: someone acting in the dashboard.\n\nKept beside the reason because one reason can arrive by more than one route.\n\nThis list grows over time, so treat an unknown value as informational rather than rejecting the\nrecord.\n"},"SMSSuppressionCoverage":{"type":"string","minLength":1,"x-extensible-enum":["all","non_transactional"],"description":"Message categories blocked for this sender and subscriber. `all` blocks every category, including authentication and transactional messages, except where Bird has agreed a STOP exemption for your workspace's authentication messages. Responses always use `all`; `non_transactional` is not used. Treat unrecognized values as blocking every category.\n"},"SMSSuppressionEndReason":{"type":"string","minLength":1,"x-extensible-enum":["keyword_start","api_key","user","carrier_cleared"],"description":"What ended it:\n\n- `keyword_start`: the subscriber texting a start keyword to the same sender.\n- `api_key`: an API call.\n- `user`: someone acting in the dashboard.\n- `carrier_cleared`: the carrier reporting its own opt-out cleared.\n\nThis list grows over time, so treat an unknown value as informational rather than rejecting the\nrecord.\n"},"SMSSuppression":{"type":"object","additionalProperties":false,"description":"One period during which a sender's messages to a subscriber are stopped: when it started, what started it, and what ended it. A subscriber who opts out, opts back in, and opts out again has two of these on record rather than one current state, and each keeps its own dates once it ends. The list returns the periods in force; fetch one by ID to read an ended one.\n","required":["id","destination","originator","reason","origin","applies_to","blocking","effective_at","created_at","last_asserted_at","source_sms_id","ended_at","ended_reason","ended_effective_at","source_end_sms_id"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/SMSSuppressionID"},"destination":{"type":"string","minLength":2,"maxLength":20,"description":"The subscriber, in E.164 format.","example":"+15550001234"},"originator":{"type":"string","minLength":1,"maxLength":20,"description":"The sender this stops. A suppression covers one sender, so your other senders still reach this subscriber. Opting out of one of your programs does not opt out of the others.\n","example":"+15557654321"},"reason":{"allOf":[{"$ref":"#/components/schemas/SMSSuppressionReason"}],"readOnly":true},"origin":{"allOf":[{"$ref":"#/components/schemas/SMSSuppressionOrigin"}],"readOnly":true},"applies_to":{"allOf":[{"$ref":"#/components/schemas/SMSSuppressionCoverage"}],"readOnly":true},"blocking":{"type":"boolean","readOnly":true,"description":"Whether this is stopping messages right now. Always true in a list, which carries only the suppressions in force; false when you fetch one by ID that has since ended, which is also when `ended_at` is set.\n"},"source_sms_id":{"oneOf":[{"$ref":"#/components/schemas/SMSMessageID"},{"type":"null"}],"readOnly":true,"description":"The inbound message the subscriber opted out with, or the outbound message whose delivery report reported the opt-out. Null when neither applies.\n"},"effective_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the subscriber opted out, as reported by whoever reported it. This is what orders one subscriber's history, and it can be earlier than `created_at` when a message reached us late.\n"},"ended_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this stopped applying. Null while it is still stopping messages."},"ended_reason":{"oneOf":[{"$ref":"#/components/schemas/SMSSuppressionEndReason"},{"type":"null"}],"readOnly":true,"description":"What ended it. Null while it is still stopping messages."},"ended_effective_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the subscriber opted back in, as reported. Null while it is still stopping messages."},"source_end_sms_id":{"oneOf":[{"$ref":"#/components/schemas/SMSMessageID"},{"type":"null"}],"readOnly":true,"description":"The inbound message the subscriber opted back in with, when there was one. Null while it is still stopping messages, and when something other than a start keyword ended it.\n"},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When we recorded it."},"last_asserted_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When we last recorded the subscriber opting out of this sender. Later than `created_at` when they texted a stop keyword again, or your workspace added it again, while already suppressed. A repeat adds no new record; a repeated stop keyword also earns another confirmation reply.\n"}}},"SMSSuppressionList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of suppressions, most recent opt-out first.","items":{"$ref":"#/components/schemas/SMSSuppression"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"SMSSuppressionCreate":{"type":"object","additionalProperties":false,"description":"Stops one sender's messages to one subscriber. Both ends are required, because a suppression covers a sender-and-subscriber pair rather than a subscriber alone.\n","required":["destination","originator"],"properties":{"destination":{"type":"string","minLength":2,"maxLength":20,"description":"The subscriber to stop messaging, in E.164 format.","example":"+15550001234"},"originator":{"type":"string","minLength":1,"maxLength":20,"description":"The sender to stop. Your other senders keep reaching this subscriber, so stopping every one of them means one call per sender.\n","example":"+15557654321"}}},"SMSKeywordOperation":{"type":"string","minLength":1,"x-extensible-enum":["stop","start","help","info","confirm","custom"],"description":"What Bird does when an inbound message matches the rule.\n\n- `stop` unsubscribes the sender from further messages.\n- `start` resubscribes them.\n- `help` replies with your support information.\n- `info` replies with your program information. It behaves exactly as `help` does and is\n  separate so a country whose INFO answer must differ from its HELP answer can carry both.\n  Where Bird ships no `info` rule for a country, INFO is one of that country's `help`\n  keywords and answers with the `help` reply.\n- `confirm` marks a double opt-in reply. It sends nothing today, so answer it from your own\n  handler.\n- `custom` replies with the text you configured and has no other effect.\n\nBird's built-in rules fix the operation for `stop`, `start` and `help`; you can change their\nreply but not what they do. The same holds for `info` in any country where Bird ships an\n`info` rule. This is an open enum. Accept unrecognized values.\n","example":"stop"},"SMSKeywordRuleScope":{"type":"string","minLength":1,"readOnly":true,"enum":["system","workspace"],"description":"Whether the rule is one of Bird's defaults (`system`) or one your workspace created (`workspace`). A `workspace` rule takes precedence over Bird's default for the same country, so it is how you replace a reply without losing the keywords Bird ships.\n"},"SMSKeywordRuleID":{"type":"string","minLength":1,"pattern":"^(sks|skw)_[0-9a-hjkmnp-tv-z]{26}$","example":"skw_01krdgeqcxet5s7t44vh8rt9mg","description":"Identifier of a keyword rule. An `sks_` id is one of Bird's defaults, which you can read but not change; an `skw_` id is a rule your workspace created.\n"},"SMSKeywordRule":{"type":"object","additionalProperties":false,"required":["id","scope","operation","keywords","effective_keywords","mandatory","created_at","updated_at"],"properties":{"id":{"$ref":"#/components/schemas/SMSKeywordRuleID"},"scope":{"$ref":"#/components/schemas/SMSKeywordRuleScope"},"operation":{"$ref":"#/components/schemas/SMSKeywordOperation"},"country":{"type":["string","null"],"minLength":2,"maxLength":2,"description":"The country the rule applies in, as an ISO 3166-1 alpha-2 code. A rule for `NL` covers messages received on your Dutch numbers, and messages from a subscriber whose own number is Dutch whichever of your numbers they text. Rules for the country a message arrives in always outrank rules for the country its sender is in; within each, your rule wins over Bird's keywords for that country. `number` confines a rule to one number. Null means the rule applies worldwide, which is allowed for `custom` operations only.\n","example":"NL"},"language":{"type":["string","null"],"minLength":2,"description":"The language this rule covers, in countries where Bird ships keywords in more than one. Canada has separate English and French rules, so a Canadian rule names which one it replaces and the other keeps Bird's reply. Null in countries with a single set.\n","example":"fr"},"number":{"type":["string","null"],"minLength":1,"description":"Narrows the rule to one of your numbers in E.164 format, instead of every number you hold in the country. Null means it applies to all of them.\n","example":"+18005551234"},"keywords":{"type":"array","description":"The keywords this rule adds. For one of Bird's defaults this is the full set Bird ships. For a rule you created it is only what you added on top. It never restates or removes Bird's keywords, so `effective_keywords` is what actually matches.\n","items":{"type":"string","minLength":1},"example":["pizza","menu"]},"effective_keywords":{"type":"array","readOnly":true,"description":"Every keyword that matches this rule: Bird's keywords for the same operation, country and language, plus the ones you added. This is what an inbound message is compared against. Keywords Bird adds later join it without you changing anything.\n","items":{"type":"string","minLength":1},"example":["stop","stoppen","afmelden"]},"reply":{"type":["string","null"],"minLength":1,"description":"The message sent back when one of the keywords matches, except on a `confirm` rule, which never sends one. Null when the auto-reply is switched off, which `reply_disabled_at` distinguishes from a rule that has not been given one.\n","example":"You have been unsubscribed and will receive no further messages."},"reply_suffix":{"type":["string","null"],"readOnly":true,"minLength":1,"description":"Text appended to your reply that you cannot change: the rates and opt-out wording carriers require on a help response. Your reply is sent in front of it, and both count against the length a single message allows. Null when the operation carries none.\n","example":"Msg&data rates may apply. Reply STOP to unsubscribe."},"reply_disabled_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the auto-reply for this rule was switched off, or null if it is on. Switching it off records that you send this reply from your own system, which is what Bird points to if a carrier asks why no reply went out.\n","example":"2026-08-12T09:00:00Z"},"mandatory":{"type":"boolean","readOnly":true,"description":"Whether what this operation does is fixed. When true you can change the reply but not the behavior. An opt-out keyword always unsubscribes the sender, whichever rule matched it, because carriers and regulators require it.\n","example":true},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the rule was created.","example":"2026-08-12T09:00:00Z"},"updated_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the rule was last changed. On one of Bird's defaults this is when Bird last changed the keywords or the reply for that country.","example":"2026-08-12T09:00:00Z"}}},"SMSKeywordRuleList":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","description":"The keyword rules that apply to your workspace, Bird's defaults included. Ordered most specific first, so the first rule whose keywords match an inbound message is the one that runs. The set is small and returned in full; this list is not paginated.\n","items":{"$ref":"#/components/schemas/SMSKeywordRule"}}}},"SMSKeywordRuleCreate":{"type":"object","additionalProperties":false,"required":["operation"],"properties":{"operation":{"$ref":"#/components/schemas/SMSKeywordOperation"},"country":{"type":["string","null"],"minLength":2,"maxLength":2,"description":"The country this rule applies in, as an ISO 3166-1 alpha-2 code. It matches a message two ways: one received on any of your numbers in this country, and one sent by a subscriber whose own number is in it, wherever they text you. Rules for the country a message arrives in always outrank rules for the country its sender is in; within each, your rule wins over Bird's keywords for that country. To confine a rule to one of your numbers, set `number` instead. Required for `stop`, `start` and `help`, because those replace what Bird ships for one country and a worldwide rule would replace every country's. Omit it only for `custom`, which then applies everywhere you send. Derived from `number` when you supply an E.164 number and leave this out; a short code carries no country, so a rule for one must name it.\n","example":"NL"},"language":{"type":["string","null"],"minLength":2,"description":"Which language this rule replaces, in countries where Bird ships keywords in more than one. Required there and rejected elsewhere. Listing the country's rules shows whether it applies and which languages are available.\n","example":"fr"},"number":{"type":["string","null"],"minLength":1,"description":"Narrows the rule to one number you hold, in E.164 format or as a short code. Omit to cover every number you hold in the country. The number must be one of yours and able to receive messages.\n","example":"+18005551234"},"keywords":{"type":"array","description":"Extra keywords to match, on top of the ones Bird already ships for this operation and country. Omit to keep Bird's keywords and change only the reply, including keywords Bird adds later. You cannot remove one of Bird's keywords, and a keyword Bird has bound to another operation cannot be reused here. Required for `custom`, which inherits none.\n","items":{"type":"string","minLength":1},"example":["pizza","menu"]},"reply":{"type":["string","null"],"minLength":1,"description":"The message to send back when a keyword matches, except on a `confirm` rule, which never sends one whatever this is set to. Set it to null together with `confirmed_self_managed` to send nothing at all.\n","example":"You have been unsubscribed and will receive no further messages."},"confirmed_self_managed":{"type":"boolean","description":"Set this with `reply: null` to confirm you send this reply from your own system, which switches Bird's auto-reply off for the rule. Required to send no reply, and rejected when a reply is given, so the two can never disagree.\n","example":true}}},"SMSKeywordRuleUpdate":{"type":"object","additionalProperties":false,"description":"Changes the reply and the added keywords. What a rule applies to (its operation, country, language and number) is fixed once created: those decide which inbound messages reach it, so changing one would make it a different rule. Delete it and create the one you want.\n","properties":{"keywords":{"type":"array","description":"Replaces the extra keywords this rule matches, on top of the ones Bird ships. Send an empty array to keep Bird's keywords only. Omit to leave the current ones unchanged.\n","items":{"type":"string","minLength":1},"example":["pizza","menu"]},"reply":{"type":["string","null"],"minLength":1,"description":"Replaces the message sent back when a keyword matches, except on a `confirm` rule, which never sends one whatever this is set to. Set it to null together with `confirmed_self_managed` to switch the auto-reply off. Omit to leave it unchanged.\n","example":"You have been unsubscribed and will receive no further messages."},"confirmed_self_managed":{"type":"boolean","description":"Set this with `reply: null` to confirm you send this reply from your own system. Required to switch the auto-reply off, and rejected when a reply is given.\n","example":true}}},"SMSMessagingProfileSortField":{"type":"string","enum":["created_at"],"default":"created_at","description":"Field to sort messaging profiles by."},"SMSSenderID":{"type":"string","minLength":1,"pattern":"^snd_[0-9a-hjkmnp-tv-z]{26}$","example":"snd_01krdgeqcxet5s7t44vh8rt9mg"},"SMSMessagingProfileSenderSelector":{"type":"object","additionalProperties":false,"required":["sender_id"],"description":"Chooses the sender for messages to one destination country, or the default sender when `country_code` is omitted.\n","properties":{"country_code":{"type":"string","description":"The destination country this sender is used for, as an uppercase ISO 3166-1 alpha-2 code. Omit it to make this the default sender, which is used for every destination country that has no entry of its own. A profile can have one entry per country and one default. An empty string is rejected rather than treated as the default.\n","example":"US"},"sender_id":{"$ref":"#/components/schemas/SMSSenderID","description":"The sender to use, as returned by the list SMS senders operation."}}},"SMSMessagingProfileInboundNumber":{"type":"object","additionalProperties":false,"required":["number"],"description":"A number that receives replies for a profile.","properties":{"country_code":{"type":"string","description":"The country of a short code, as an uppercase ISO 3166-1 alpha-2 code. Required for a short code. Omit it for a number in E.164 format, which receives replies from subscribers in any country.\n","example":"US"},"number":{"type":"string","minLength":1,"description":"A short code as digits, or a number in E.164 format. It must be a number your workspace holds that can receive SMS, and it can belong to one profile at a time.\n","example":"34001"}}},"SMSMessagingProfileTimeWindow":{"type":"string","minLength":1,"enum":["1h","1d","7d"],"description":"How long after a message is sent a reply can still be paired with it: one hour (`1h`), 24 hours (`1d`), or 168 hours (`7d`). `1d` is the default.\n","example":"1d"},"SMSMessagingProfileOutboundMatching":{"type":"object","additionalProperties":false,"required":["enabled","time_window"],"description":"Settings for pairing each reply with the message it answers, reported as the reply's `in_reply_to_message`. Bird pairs only messages sent from one of this profile's reply numbers while matching is on. Turning it off stops pairing, and turning it back on resumes it for messages still inside their window.\n","properties":{"enabled":{"type":"boolean","description":"Whether replies are paired with the messages they answer.","example":false},"time_window":{"$ref":"#/components/schemas/SMSMessagingProfileTimeWindow"}}},"SMSMessagingProfileInbound":{"type":"object","additionalProperties":false,"required":["numbers","callback_url","keyword","outbound_matching"],"description":"How the profile receives replies. A profile with neither numbers nor a keyword only sends.","properties":{"numbers":{"type":"array","maxItems":100,"description":"The numbers that receive replies for this profile.","items":{"$ref":"#/components/schemas/SMSMessagingProfileInboundNumber"}},"callback_url":{"type":["string","null"],"description":"The HTTPS URL that receives `sms.received` events for messages received on this profile's numbers or routed to it by `keyword`, signed with your workspace callback signing secret. Null when none is set, in which case replies use `options.callback_url`, then your webhook subscriptions. While a URL applies, a reply skips your plain webhook endpoints.\n","example":"https://receipts.example.com/bird/sms/inbound"},"keyword":{"type":["string","null"],"description":"The keyword that routes a received message to this profile. A message whose text opens with it, in any letter case and after any leading whitespace, belongs to this profile whichever of your workspace's numbers it arrives on, ahead of the profile bound to that number. The opening word ends at the first character that is not a letter, digit, hyphen or underscore, so `JOIN?source=web` opens with `JOIN`. Null when none is set.\n","example":"JOIN"},"outbound_matching":{"$ref":"#/components/schemas/SMSMessagingProfileOutboundMatching"}}},"SMSMessagingProfileOptions":{"type":"object","additionalProperties":false,"required":["smart_encoding","ignore_suppression","callback_url"],"description":"Sending options that messages from this profile use when a message does not set its own.","properties":{"smart_encoding":{"type":"boolean","description":"Whether text is converted to the GSM-7 character set where possible, to fit more characters in a segment.","example":false},"ignore_suppression":{"type":"boolean","description":"Whether messages are sent even if the recipient is suppressed for the sender, including after replying STOP. Messages that do not set `ignore_suppression` use this value. Only `authentication` and `transactional` messages can skip suppressions. It cannot be `true` while `default_category` is `marketing` or `service`. Bird must enable it for your workspace; until then, messages that use it are refused.\n","example":false},"callback_url":{"type":["string","null"],"description":"The HTTPS URL that receives this profile's message events instead of your webhook endpoints. Null when none is set. Messages that do not set `callback_url` use it, and so do replies on the profile's numbers that have no `inbound.callback_url`. Each event is a signed POST, signed with your workspace callback signing secret, which `rotateWebhookCallbackSigningSecret` creates and returns once. While a URL applies, a message's events skip your plain webhook endpoints. MCP Events subscriptions and connector endpoints still receive them.\n","example":"https://receipts.example.com/bird/sms/activation"}}},"SMSMessagingProfileCallbackEvent":{"type":"string","minLength":1,"description":"An outbound SMS event type. A write accepts only the listed values; a newer server can add events, so read an unknown one as a string.","x-extensible-enum":["sms.accepted","sms.sent","sms.delivered","sms.undelivered","sms.failed","sms.rejected","sms.expired"],"example":"sms.delivered"},"SMSMessagingProfile":{"type":"object","additionalProperties":false,"required":["id","name","senders","inbound","default_category","validity_period","cost_center","options","callback_events","created_at","updated_at"],"description":"A messaging profile: the senders, reply numbers, and defaults for one program in your workspace. A send that names the profile takes its sender, default category, smart encoding, validity period, cost center, and options from it when the send leaves them out. A message that names the profile sends its events to the profile's `options.callback_url`, filtered by `callback_events`, and a reply on one of the profile's numbers, or one whose text opens with `inbound.keyword` on any of your numbers, goes to `inbound.callback_url`, then `options.callback_url`. With outbound matching on, a reply on one of the profile's numbers is paired with the message this profile sent from that number.\n","properties":{"id":{"$ref":"#/components/schemas/SMSMessagingProfileID","description":"Identifier of this profile."},"name":{"type":"string","minLength":1,"maxLength":100,"description":"A label for the profile. Names are not unique, so two profiles can share one.","example":"device-activation"},"senders":{"type":"array","maxItems":300,"description":"The sender for each destination country, and the default sender when an entry has no `country_code`.","items":{"$ref":"#/components/schemas/SMSMessagingProfileSenderSelector"}},"inbound":{"$ref":"#/components/schemas/SMSMessagingProfileInbound"},"default_category":{"oneOf":[{"$ref":"#/components/schemas/SMSMessageCategory"},{"type":"null"}],"description":"The category a free-text send that names this profile uses when it sets none: `transactional`, `marketing`, `authentication`, or `service`. A template send takes the template's category. Null when none is set.\n","example":"authentication"},"validity_period":{"type":["integer","null"],"minimum":60,"maximum":172800,"description":"How many seconds a message stays valid before it expires undelivered. Null when none is set. A send that omits `validity_period` uses it.\n","example":3600},"cost_center":{"type":["string","null"],"minLength":1,"maxLength":64,"description":"A label for assigning the cost of this profile's messages. Null when none is set. A send that omits `cost_center` uses it.\n","example":"CC001234"},"options":{"$ref":"#/components/schemas/SMSMessagingProfileOptions"},"callback_events":{"type":["array","null"],"uniqueItems":true,"minItems":1,"items":{"$ref":"#/components/schemas/SMSMessagingProfileCallbackEvent"},"example":["sms.delivered","sms.failed"],"description":"The events of this profile's outbound messages that go to a callback URL: `sms.accepted`, `sms.sent`, `sms.delivered`, `sms.undelivered`, `sms.failed`, `sms.rejected`, and `sms.expired`. The list is fixed when a message is accepted, and applies only while the message has a callback URL: an event outside it then reaches neither the URL nor a plain webhook endpoint. Without a callback URL the list has no effect, and every event goes to your webhook endpoints. `sms.received` is never filtered. Null means every outbound event goes to the URL.\n"},"created_at":{"type":"string","format":"date-time","minLength":1,"description":"When the profile was created."},"updated_at":{"type":"string","format":"date-time","minLength":1,"description":"When the profile was last changed."}}},"SMSMessagingProfileList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Your workspace's messaging profiles, newest first.","items":{"$ref":"#/components/schemas/SMSMessagingProfile"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"SMSMessagingProfileOutboundMatchingInput":{"type":"object","additionalProperties":false,"description":"Settings for pairing each reply with the message it answers, reported as the reply's `in_reply_to_message`. Bird pairs only messages sent from one of this profile's reply numbers while matching is on. Turning it off stops pairing, and turning it back on resumes it for messages still inside their window.\n","properties":{"enabled":{"type":"boolean","description":"Whether replies are paired with the messages they answer. A new profile defaults to `false`.","example":false},"time_window":{"$ref":"#/components/schemas/SMSMessagingProfileTimeWindow"}}},"SMSMessagingProfileInboundCreate":{"type":"object","additionalProperties":false,"description":"How the profile receives replies. Omit it for a profile that only sends.","properties":{"numbers":{"type":"array","maxItems":100,"description":"The numbers that receive replies for this profile.","items":{"$ref":"#/components/schemas/SMSMessagingProfileInboundNumber"}},"callback_url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","description":"The HTTPS URL that receives `sms.received` events for messages received on this profile's numbers or routed to it by `keyword`, signed with your workspace callback signing secret. Without it, replies use `options.callback_url`, then your webhook subscriptions. While a URL applies, a reply skips your plain webhook endpoints. It must be an absolute HTTPS URL of at most 2048 characters with a public host: an HTTP URL, a malformed one, or a private, loopback or link-local host returns `422`.\n","example":"https://receipts.example.com/bird/sms/inbound"},"keyword":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z0-9_-]+$","description":"The keyword that routes a received message to this profile. It is 1 to 32 ASCII letters, digits, hyphens or underscores. A message whose text opens with it, in any letter case and after any leading whitespace, belongs to this profile whichever of your workspace's numbers it arrives on, ahead of the profile bound to that number. The opening word ends at the first character that is not a letter, digit, hyphen or underscore, so `JOIN?source=web` opens with `JOIN`. Only one profile in a workspace can hold a keyword, compared without regard to letter case: one that another profile holds returns `422`.\n","example":"JOIN"},"outbound_matching":{"$ref":"#/components/schemas/SMSMessagingProfileOutboundMatchingInput"}}},"SMSMessagingProfileOptionsCreate":{"type":"object","additionalProperties":false,"description":"Sending options for messages that do not set their own. Booleans default to `false`.","properties":{"smart_encoding":{"type":"boolean","description":"Whether text is converted to the GSM-7 character set where possible.","example":false},"ignore_suppression":{"type":"boolean","description":"Whether messages are sent even if the recipient is suppressed for the sender, including after replying STOP. Messages that do not set `ignore_suppression` use this value. Only `authentication` and `transactional` messages can skip suppressions. It cannot be `true` when `default_category` is `marketing` or `service`. Bird must enable it for your workspace; until then, messages that use it are refused.\n","example":false},"callback_url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","description":"The HTTPS URL that receives this profile's message events instead of your webhook endpoints. Messages that do not set `callback_url` use it, and so do replies on the profile's numbers that have no `inbound.callback_url`. Each event is a signed POST, signed with your workspace callback signing secret, which `rotateWebhookCallbackSigningSecret` creates and returns once. While a URL applies, a message's events skip your plain webhook endpoints. MCP Events subscriptions and connector endpoints still receive them. It must be an absolute HTTPS URL of at most 2048 characters with a public host: an HTTP URL, a malformed one, or a private, loopback or link-local host returns `422`.\n","example":"https://receipts.example.com/bird/sms/activation"}}},"SMSMessagingProfileCreate":{"type":"object","additionalProperties":false,"required":["name"],"description":"Parameters for creating a messaging profile. Omitted booleans are `false`, the matching window is `1d`, and everything else is unset.\n","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"A label for the profile. Names are not unique, so two profiles can share one.","example":"device-activation"},"senders":{"type":"array","maxItems":300,"description":"The sender for each destination country, and optionally a default sender. Each country appears at most once, and at most one entry omits `country_code`.\n","items":{"$ref":"#/components/schemas/SMSMessagingProfileSenderSelector"}},"inbound":{"$ref":"#/components/schemas/SMSMessagingProfileInboundCreate"},"default_category":{"allOf":[{"$ref":"#/components/schemas/SMSMessageCategory"}],"description":"The category a free-text send that names this profile uses when it sets none: `transactional`, `marketing`, `authentication`, or `service`. A template send takes the template's category.\n","example":"authentication"},"validity_period":{"type":"integer","minimum":60,"maximum":172800,"description":"How many seconds a message stays valid before it expires undelivered. A send that omits `validity_period` uses it.\n","example":3600},"cost_center":{"type":"string","minLength":1,"maxLength":64,"description":"A label for assigning the cost of this profile's messages. A send that omits `cost_center` uses it.\n","example":"CC001234"},"options":{"$ref":"#/components/schemas/SMSMessagingProfileOptionsCreate"},"callback_events":{"type":"array","uniqueItems":true,"minItems":1,"items":{"$ref":"#/components/schemas/SMSMessagingProfileCallbackEvent"},"example":["sms.delivered","sms.failed"],"description":"The events of this profile's outbound messages that go to a callback URL. The list is fixed when a message is accepted, and applies only while the message has a callback URL: an event outside it then reaches neither the URL nor a plain webhook endpoint. Without a callback URL the list has no effect, and every event goes to your webhook endpoints. A value other than `sms.accepted`, `sms.sent`, `sms.delivered`, `sms.undelivered`, `sms.failed`, `sms.rejected` or `sms.expired` returns `422`. `sms.received` is never filtered. Omit it to deliver every event.\n"}},"example":{"name":"device-activation","senders":[{"country_code":"US","sender_id":"snd_01krdgeqcxet5s7t44vh8rt9mg"}],"inbound":{"numbers":[{"number":"+14155550100"}]},"default_category":"authentication"}},"SMSMessagingProfileInboundUpdate":{"type":"object","additionalProperties":false,"description":"Changes how the profile receives replies. Omitted properties keep their value.","properties":{"numbers":{"type":"array","maxItems":100,"description":"Replaces the numbers that receive replies. Send an empty array to remove them all.","items":{"$ref":"#/components/schemas/SMSMessagingProfileInboundNumber"}},"callback_url":{"type":["string","null"],"minLength":1,"maxLength":2048,"format":"uri","description":"The HTTPS URL that receives `sms.received` events for messages received on this profile's numbers or routed to it by `keyword`, signed with your workspace callback signing secret. Send `null` to clear it, so replies use `options.callback_url`, then your webhook subscriptions. While a URL applies, a reply skips your plain webhook endpoints. It must be an absolute HTTPS URL of at most 2048 characters with a public host: an HTTP URL, a malformed one, or a private, loopback or link-local host returns `422`.\n","example":"https://receipts.example.com/bird/sms/inbound"},"keyword":{"type":["string","null"],"minLength":1,"maxLength":32,"pattern":"^[A-Za-z0-9_-]+$","description":"The keyword that routes a received message to this profile. It is 1 to 32 ASCII letters, digits, hyphens or underscores. A message whose text opens with it, in any letter case and after any leading whitespace, belongs to this profile whichever of your workspace's numbers it arrives on, ahead of the profile bound to that number. The opening word ends at the first character that is not a letter, digit, hyphen or underscore, so `JOIN?source=web` opens with `JOIN`. Only one profile in a workspace can hold a keyword, compared without regard to letter case: one that another profile holds returns `422`. Send `null` to clear it.\n","example":"JOIN"},"outbound_matching":{"$ref":"#/components/schemas/SMSMessagingProfileOutboundMatchingInput"}}},"SMSMessagingProfileOptionsUpdate":{"type":"object","additionalProperties":false,"description":"Changes the sending options for messages that do not set their own. Omitted properties keep their value.","properties":{"smart_encoding":{"type":"boolean","description":"Whether text is converted to the GSM-7 character set where possible.","example":false},"ignore_suppression":{"type":"boolean","description":"Whether messages are sent even if the recipient is suppressed for the sender, including after replying STOP. Messages that do not set `ignore_suppression` use this value. Only `authentication` and `transactional` messages can skip suppressions. It cannot be `true` when `default_category` is `marketing` or `service`. Bird must enable it for your workspace; until then, messages that use it are refused.\n","example":false},"callback_url":{"type":["string","null"],"minLength":1,"maxLength":2048,"format":"uri","description":"The HTTPS URL that receives this profile's message events instead of your webhook endpoints. Send `null` to clear it. Messages that do not set `callback_url` use it, and so do replies on the profile's numbers that have no `inbound.callback_url`. Each event is a signed POST, signed with your workspace callback signing secret, which `rotateWebhookCallbackSigningSecret` creates and returns once. While a URL applies, a message's events skip your plain webhook endpoints. MCP Events subscriptions and connector endpoints still receive them. It must be an absolute HTTPS URL of at most 2048 characters with a public host: an HTTP URL, a malformed one, or a private, loopback or link-local host returns `422`.\n","example":"https://receipts.example.com/bird/sms/activation"}}},"SMSMessagingProfileUpdate":{"type":"object","additionalProperties":false,"description":"Changes a messaging profile. Omitted properties keep their value, including inside `inbound` and `options`. Send `null` to clear a property that accepts it. `senders` and `inbound.numbers` replace the whole list.\n","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"A new label for the profile. Names are not unique, so two profiles can share one.","example":"device-activation"},"senders":{"type":"array","maxItems":300,"description":"Replaces the profile's senders. Each country appears at most once, and at most one entry omits `country_code`. Send an empty array to remove them all.\n","items":{"$ref":"#/components/schemas/SMSMessagingProfileSenderSelector"}},"inbound":{"$ref":"#/components/schemas/SMSMessagingProfileInboundUpdate"},"default_category":{"oneOf":[{"$ref":"#/components/schemas/SMSMessageCategory"},{"type":"null"}],"description":"The category a free-text send that names this profile uses when it sets none: `transactional`, `marketing`, `authentication`, or `service`. A template send takes the template's category. Send `null` to clear it.\n","example":"authentication"},"validity_period":{"type":["integer","null"],"minimum":60,"maximum":172800,"description":"How many seconds a message stays valid before it expires undelivered. Send `null` to clear it. A send that omits `validity_period` uses it.\n","example":3600},"cost_center":{"type":["string","null"],"minLength":1,"maxLength":64,"description":"A label for assigning the cost of this profile's messages. Send `null` to clear it. A send that omits `cost_center` uses it.\n","example":"CC001234"},"options":{"$ref":"#/components/schemas/SMSMessagingProfileOptionsUpdate"},"callback_events":{"type":["array","null"],"uniqueItems":true,"minItems":1,"items":{"$ref":"#/components/schemas/SMSMessagingProfileCallbackEvent"},"example":["sms.delivered","sms.failed"],"description":"The events of this profile's outbound messages that go to a callback URL. The list is fixed when a message is accepted, and applies only while the message has a callback URL: an event outside it then reaches neither the URL nor a plain webhook endpoint. Without a callback URL the list has no effect, and every event goes to your webhook endpoints. A value other than `sms.accepted`, `sms.sent`, `sms.delivered`, `sms.undelivered`, `sms.failed`, `sms.rejected` or `sms.expired` returns `422`. `sms.received` is never filtered. Send `null` to deliver every event.\n"}},"example":{"name":"device-activation","default_category":"transactional"}},"ComplianceDataType":{"type":"string","minLength":1,"enum":["string","text","enum","number","boolean","date","url","country","document"],"description":"The kind of value a requirement takes. The `string` value is a single line, while `text` runs to several. The `enum` value accepts only the values listed with the requirement. The `number`, `boolean`, and `date` values take their corresponding data types. The `url` value takes a link. The `country` value takes an uppercase ISO 3166-1 alpha-2 code, such as `NL`. The `document` value means a file you upload first and then reference. All other values are supplied inline.\n"},"ComplianceRequirementFieldOption":{"type":"object","additionalProperties":false,"required":["value","label"],"properties":{"value":{"type":"string","minLength":1,"description":"What to send."},"label":{"type":"string","minLength":1,"description":"What to show."}}},"ComplianceFieldValidation":{"type":"object","additionalProperties":false,"description":"Constraints a value must satisfy, where the requirement sets any. Which of these apply follows from its data type: `pattern`, `min_length` and `max_length` constrain `string` and `text` values, `minimum` and `maximum` constrain `number` values, and everything else is `null`. Check these before submitting and you avoid a round trip.\n","properties":{"pattern":{"type":["string","null"],"description":"A regular expression the value must match. `null` when the requirement takes neither `string` nor `text`, or sets no pattern."},"min_length":{"type":["integer","null"],"description":"Shortest accepted value. `null` when the requirement takes neither `string` nor `text`, or sets no minimum length."},"max_length":{"type":["integer","null"],"description":"Longest accepted value. `null` when the requirement takes neither `string` nor `text`, or sets no maximum length."},"minimum":{"type":["number","null"],"description":"Smallest accepted number. `null` when the requirement does not take `number`, or sets no minimum."},"maximum":{"type":["number","null"],"description":"Largest accepted number. `null` when the requirement does not take `number`, or sets no maximum."}}},"AttachmentID":{"type":"string","minLength":1,"pattern":"^tca_[0-9a-hjkmnp-tv-z]{26}$","example":"tca_01krdgeqcxet5s7t44vh8rt9mg"},"ComplianceItemState":{"type":"string","minLength":1,"x-extensible-enum":["not_supplied","supplied","in_review","approved","rejected","not_applicable","expired","awaiting_confirmation"],"description":"Where one requirement stands. The `not_supplied` state means nothing has been\ngiven for it yet. The `supplied` state means we have your answer and review\nhas not started. The `in_review` state means someone is looking at it. The\n`approved` and `rejected` states are decisions. You can replace a rejected\nitem without refiling the rest. The `not_applicable` state means this\nrequirement does not apply to you. The `expired` state means the value was\naccepted but has since gone stale. The `awaiting_confirmation` state is a\nbusiness contact we emailed a confirmation link to: nothing is reviewed until\nthey confirm, and you can resend the link or give another address.\n\nAn item only ever reports its state. Treat this as an open set because review\ncan gain stages. A value you do not recognise is a valid state that this\nserver added.\n"},"ComplianceRequirementField":{"type":"object","additionalProperties":false,"required":["key","label","help_text","data_type","required","section","section_label","options","validation","template_url","max_items","value","prefilled","attachment_id","values","attachment_ids","state","decided_at","expires_at","reason","editable_for_verifier_repair"],"properties":{"parent_key":{"type":"string","readOnly":true,"description":"Parent field grouping this named document. Absent for an ordinary field."},"document_key":{"type":"string","readOnly":true,"description":"Stable document key within the parent field. Absent for an ordinary field."},"parent_label":{"type":"string","readOnly":true,"description":"Display name of the parent field grouping this document. Absent for an ordinary field."},"parent_help_text":{"type":"string","readOnly":true,"description":"The parent field's own description, shared by every document in the group. Each document's `help_text` describes that document alone. Absent for an ordinary field and when the parent has no description.\n"},"key":{"type":"string","minLength":1,"readOnly":true,"description":"Identifies this requirement. Use it as the key when you submit a value."},"label":{"type":"string","minLength":1,"readOnly":true,"description":"What to call this requirement when you ask someone for it."},"help_text":{"type":["string","null"],"readOnly":true,"description":"Guidance on what a good answer looks like, including anything the destination country expects. `null` when the label speaks for itself.\n"},"data_type":{"allOf":[{"$ref":"#/components/schemas/ComplianceDataType"}],"readOnly":true},"required":{"type":"boolean","readOnly":true,"description":"Whether an answer is needed before the registration can be approved. Optional requirements are still reviewed when you supply them.\n"},"section":{"type":"string","minLength":1,"readOnly":true,"description":"A stable key grouping related requirements together. Use it to keep your own grouping consistent across requests; use section_label for what to show someone.\n"},"section_label":{"type":"string","minLength":1,"readOnly":true,"description":"What to call this requirement's group when you present it."},"options":{"type":"array","readOnly":true,"description":"The accepted values, already resolved, when the data type is `enum`. Empty for every other type.\n","items":{"$ref":"#/components/schemas/ComplianceRequirementFieldOption"}},"validation":{"allOf":[{"$ref":"#/components/schemas/ComplianceFieldValidation"}],"readOnly":true},"template_url":{"type":["string","null"],"readOnly":true,"description":"A blank form to download, complete and upload back, for requirements that need a signed document. `null` when the requirement has no form to download.\n"},"max_items":{"type":["integer","null"],"readOnly":true,"description":"How many answers this requirement takes, when it takes more than one. `null` for a requirement answered once, which is most of them. Where it is set, answer with `values` or `attachment_ids` and read your answer back from the same pair; `value` and `attachment_id` stay `null`. Order is kept as you send it, and it is part of the answer: a keyword list beginning with `STOP` is not the same declaration as one ending with it.\n"},"value":{"type":["string","null"],"readOnly":true,"description":"Your answer, for a requirement answered inline. Every answer travels as a string whatever its data type, so a number reads back as `\"1500\"` and a yes-or-no as `\"true\"`. Use the data type to parse it. `null` for a requirement that takes a document, and before you have answered.\n"},"prefilled":{"type":"boolean","readOnly":true,"description":"`true` when `value` comes from the party this registration is for. Accept it as it stands or replace it; either way it becomes your answer when you submit. Only a requirement that asks about the party is ever prefilled.\n"},"attachment_id":{"readOnly":true,"description":"The document you supplied, for a requirement that takes one. `null` otherwise.\n","oneOf":[{"$ref":"#/components/schemas/AttachmentID"},{"type":"null"}]},"values":{"type":["array","null"],"readOnly":true,"description":"Your answers, for a requirement that takes several and is answered inline. Set only when `max_items` is, and `null` otherwise, including before you have answered. Each answer travels as a string whatever the data type, the same as `value`.\n","items":{"type":"string","minLength":1}},"attachment_ids":{"type":["array","null"],"readOnly":true,"description":"The documents you supplied, for a requirement that takes several. Set only when `max_items` is and the requirement takes documents, and `null` otherwise.\n","items":{"$ref":"#/components/schemas/AttachmentID"}},"state":{"allOf":[{"$ref":"#/components/schemas/ComplianceItemState"}],"readOnly":true},"decided_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this was decided. `null` while no decision has been made."},"expires_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this answer goes stale and must be supplied again. `null` when it does not expire."},"editable_for_verifier_repair":{"type":"boolean","readOnly":true,"description":"Whether you may replace this accepted answer to correct the submission after external verification or update an approved emergency service address. This permission does not change its `state` or `reason`. Submit only answers whose content or attachment identity you change.\n"},"reason":{"type":["string","null"],"readOnly":true,"description":"Why this requirement was rejected, when it was. `null` otherwise."}}},"AttachmentStatus":{"type":"string","minLength":1,"enum":["draft","attached"],"description":"Lifecycle of an attachment. `draft` is a file that has been uploaded but nothing\nhas been registered or submitted with it yet, and it is discarded at its\n`expires_at`. `attached` means at least one registration has cited it, so it is\nkept permanently and can no longer be deleted.\n"},"Attachment":{"description":"A supporting document uploaded for compliance answers or SMS registrations, including number ownership evidence, 10DLC campaign evidence and toll-free verification opt-in screenshots. Reference its ID from the relevant answer or registration attachment field to submit it as evidence.","unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/Timestamps"},{"type":"object","required":["id","filename","content_type","size_bytes","download_url","download_url_expires_at","status","expires_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/AttachmentID"},"filename":{"type":"string","minLength":1,"readOnly":true,"description":"The uploaded file's name."},"content_type":{"type":"string","minLength":1,"readOnly":true,"description":"The file's content type, determined from its contents."},"size_bytes":{"type":"integer","format":"int64","readOnly":true,"description":"The file's size in bytes."},"description":{"type":"string","maxLength":255,"readOnly":true,"description":"A short note describing what the file shows."},"status":{"readOnly":true,"$ref":"#/components/schemas/AttachmentStatus"},"download_url":{"type":"string","format":"uri","minLength":1,"readOnly":true,"x-sensitive":true,"description":"Short-lived signed URL for downloading or previewing the attachment. Valid for 24 hours from when the resource was fetched; request a fresh resource to obtain a new URL after expiry. Do not cache beyond `download_url_expires_at`. Registration authorities (10DLC and toll-free carriers) retrieve evidence via a separate, longer-lived token; this URL is not that token."},"preview_url":{"type":"string","format":"uri","readOnly":true,"x-sensitive":true,"description":"Optional signed URL for inline viewing on an isolated storage origin. Valid for one hour; fetch the attachment again to refresh it."},"download_url_expires_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When `download_url` expires. Both fields are always present; the server returns an error rather than omitting them."},"expires_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this attachment is discarded if nothing is registered or submitted with it. Null once its status is `attached`."}}}]},"ComplianceIdentitySortField":{"type":"string","enum":["created_at","name"],"default":"created_at","description":"Field to sort identities by."},"ComplianceIdentityAnswer":{"type":"object","additionalProperties":false,"required":["value","submitted_at"],"description":"One business detail this party last submitted, and when it was filed.","properties":{"value":{"type":"string","minLength":1,"readOnly":true,"description":"The detail as last submitted. Every value travels as a string whatever the requirement's data type, so a number reads back as `\"1500\"`."},"submitted_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this party last filed the detail. Filing it is what records it here, so it is never a statement that a reviewer agreed with the value. Filing the same value again can carry a previous approval of it forward instead of putting it in front of a reviewer. `null` for a detail recorded before the container began tracking submissions."},"state":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ComplianceItemState"}],"description":"Where review has got to on this exact value. Absent when no registration has ruled on it, which covers a detail nobody has reached yet and one filed before the container recorded which submission it came from.\n\nOne value can be filed on several registrations and decided differently on each, and one verdict is reported for it. A live approval wins, because it is proof the value is acceptable. Failing that a refusal wins over a registration still waiting, since waiting is nobody having looked yet rather than evidence against a refusal. An approval past its validity period is neither: it reads as `expired` and ranks below a refusal, above anything still waiting. `not_applicable` is reported last, because it is a statement about a requirement rather than about the value.\n"},"reason":{"type":["string","null"],"readOnly":true,"description":"What has to change, when `state` is one a reviewer refused. `null` otherwise, and `null` on a refusal recorded without one."},"decided_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the verdict in `state` was reached. `null` while nobody has decided, and on a state no reviewer set."}}},"ComplianceIdentity":{"type":"object","additionalProperties":false,"description":"A party you register on behalf of: your own business, or one of your clients. Reusing an identity across registrations is what stops you retyping the same business details for every country, and lets a fact reviewed once stand for the registrations that follow.","required":["id","name","answers","created_at","updated_at"],"properties":{"id":{"$ref":"#/components/schemas/ComplianceIdentityID"},"name":{"type":"string","minLength":1,"description":"What you call this party. Yours to choose; it is never sent to a carrier.","example":"Goldcrest Communications SAS"},"answers":{"type":"object","readOnly":true,"additionalProperties":{"$ref":"#/components/schemas/ComplianceIdentityAnswer"},"description":"The business details this party has supplied, keyed by requirement. Filled in for you: a single-value detail lands here the moment you file it on one of your registrations, so the next one prefills it rather than asking again. Only requirements a country marks as being about the party appear; anything about a specific sender is asked fresh each time."},"created_at":{"type":"string","minLength":1,"format":"date-time"},"updated_at":{"type":"string","minLength":1,"format":"date-time"}}},"ComplianceIdentityList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ComplianceIdentity"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"ComplianceIdentityCreate":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"What you call this party. Yours to choose; it is never sent to a carrier.","example":"Goldcrest Communications SAS"}}},"ValidationError":{"description":"Field validation error. Uses the standard error envelope with `type` set to `validation_error` and `details` always present.","allOf":[{"$ref":"#/components/schemas/Error"}]},"ComplianceIdentityUpdate":{"type":"object","additionalProperties":false,"required":["name"],"description":"Renames the party. Single-value identity answers are filled in when you submit or resupply a registration, regardless of its review outcome. Edit those answers through the registration.","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"What you call this party. Yours to choose; it is never sent to a carrier.","example":"Goldcrest Communications SAS"}}},"AttachmentSortField":{"type":"string","enum":["created_at"],"default":"created_at","description":"Field to sort registration attachments by."},"AttachmentList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"AttachmentUpload":{"description":"The file to upload, sent as a `multipart/form-data` body.","type":"object","additionalProperties":false,"required":["file"],"properties":{"file":{"type":"string","format":"binary","minLength":1,"description":"The file to attach. PNG, JPEG, or PDF, up to 10 MB. The file's contents determine its type; a declared content type is ignored."},"description":{"type":"string","maxLength":255,"description":"A short note describing what the file shows."}}},"AssetUploadFile":{"type":"object","additionalProperties":false,"description":"Exact properties of the active source file. Calculate size and SHA-256 from its bytes before creating a session or preparing a browser-selected source. Images allow up to 5,242,880 bytes; other supported media allow up to 25,000,000 bytes.","required":["filename","content_type","size_bytes","sha256"],"properties":{"filename":{"type":"string","minLength":1,"maxLength":255,"example":"invoice.pdf","description":"Source filename, including its extension."},"content_type":{"type":"string","minLength":1,"example":"application/pdf","description":"Media type of the source file. Supported values are `image/png`, `image/jpeg`, `image/gif`, `video/mp4`, `video/webm`, `video/quicktime`, `audio/mpeg`, `audio/mp4`, `audio/ogg`, `audio/wav`, and `application/pdf`.\n\nSupply the exact value without parameters. Unsupported values return `E20001`. Completion checks this against the file's contents.\n"},"size_bytes":{"type":"integer","format":"int64","minimum":1,"maximum":25000000,"example":1024,"description":"Exact size of the source file in bytes."},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","minLength":64,"maxLength":64,"x-sensitive":true,"example":"4e2090a479f7ce6b17ad31f991988f12571bcafbd4a441cc4063644fc1400ae0","description":"SHA-256 of the source bytes, encoded as lowercase hexadecimal."}}},"AssetFolderID":{"type":"string","minLength":1,"pattern":"^asf_[0-9a-hjkmnp-tv-z]{26}$","example":"asf_01krdgeqcxet5s7t44vh8rt9mg"},"AssetUploadSessionCreate":{"type":"object","additionalProperties":false,"description":"Start one upload intent. Keep client_reference unchanged when retrying this request. Changing the file or metadata requires a new reference. Optional folder_id must identify an existing folder in this workspace.","required":["client_reference","file"],"properties":{"client_reference":{"type":"string","format":"uuid","minLength":36,"maxLength":36,"example":"4ca4145c-782a-4d03-bc80-a27e3e431780","description":"Caller-generated UUID for this upload intent. Retries with identical input recover the same session while its receipt is retained."},"file":{"$ref":"#/components/schemas/AssetUploadFile"},"name":{"type":"string","maxLength":255,"description":"Display name. Omitted or blank names default to the sanitized filename."},"alt_text":{"type":"string","maxLength":1000,"description":"Default alternative text for the asset."},"folder_id":{"description":"Destination folder in this workspace. Omit it to use the library root.","$ref":"#/components/schemas/AssetFolderID"}}},"AssetUploadSessionID":{"type":"string","minLength":1,"pattern":"^aus_[0-9a-hjkmnp-tv-z]{26}$","example":"aus_01krdgeqcxet5s7t44vh8rt9mg"},"AssetUploadSessionState":{"type":"string","minLength":1,"description":"Upload progress. Pending accepts a transfer; finalizing is checking and publishing it. Completed has a saved result. Rejected, cancelled and expired allow no new upload instruction or publication. An already issued upload URL can remain usable until its expiry.","enum":["pending","finalizing","completed","rejected","cancelled","expired"]},"AssetID":{"type":"string","minLength":1,"pattern":"^ast_[0-9a-hjkmnp-tv-z]{26}$","example":"ast_01krdgeqcxet5s7t44vh8rt9mg"},"AssetUploadReceipt":{"readOnly":true,"type":"object","additionalProperties":false,"description":"Saved publication result. Retrying completion returns this receipt even if the asset has since been removed or become unavailable.","required":["asset_id","reused_existing","completed_at"],"properties":{"asset_id":{"$ref":"#/components/schemas/AssetID"},"reused_existing":{"type":"boolean","description":"Whether the upload reused an existing active asset with identical source bytes. Reused assets keep their original metadata and folder."},"completed_at":{"type":"string","format":"date-time","minLength":1,"description":"When publication completed."}}},"AssetUploadSessionError":{"type":"object","additionalProperties":false,"description":"Stable error code from the most recent failed completion attempt. The operation's error response carries its message and recovery steps.","required":["code"],"properties":{"code":{"type":"string","minLength":1,"description":"Bird error code for the failed attempt."}}},"AssetUploadSession":{"readOnly":true,"type":"object","description":"An upload session owned by the workspace and the OAuth connection or API key that created it. Its metadata is frozen. The file identifies the active upload source; a signed-in person can bind their selected file when preparing the browser fallback. Completion validates the bytes against the active source. Sessions expire after one hour; receipts remain available for at least 24 hours after expiry while cleanup finishes.","required":["id","state","expires_at","name","alt_text","folder_id","file","result","last_error","next"],"properties":{"id":{"$ref":"#/components/schemas/AssetUploadSessionID"},"state":{"$ref":"#/components/schemas/AssetUploadSessionState"},"expires_at":{"type":"string","format":"date-time","minLength":1,"description":"Absolute session expiry. Completion must finish before this deadline; starting it or refreshing an upload instruction does not extend it."},"name":{"type":"string","minLength":1,"description":"Frozen display name for a newly published asset."},"alt_text":{"type":["string","null"],"description":"Frozen alternative text, or null when omitted."},"folder_id":{"oneOf":[{"$ref":"#/components/schemas/AssetFolderID"},{"type":"null"}],"description":"Frozen destination folder, or null for the library root."},"file":{"$ref":"#/components/schemas/AssetUploadFile"},"result":{"oneOf":[{"$ref":"#/components/schemas/AssetUploadReceipt"},{"type":"null"}],"description":"Saved publication receipt, or null until completed."},"last_error":{"oneOf":[{"$ref":"#/components/schemas/AssetUploadSessionError"},{"type":"null"}],"description":"Last completion error, or null when no failure is recorded."},"next":{"type":"array","items":{"$ref":"#/components/schemas/NextAction"},"description":"Available next steps for this session."}}},"AssetUploadInstruction":{"readOnly":true,"type":"object","additionalProperties":false,"description":"Send the active source bytes described by the session to this URL with the exact headers and content length. Send no Bird credentials or cookies. Keep the URL private and call complete after the PUT succeeds.","required":["method","url","required_headers","content_length","expires_at"],"properties":{"method":{"type":"string","const":"PUT","minLength":3,"description":"HTTP method for transferring the file."},"url":{"type":"string","format":"uri","minLength":1,"x-sensitive":true,"description":"Temporary HTTPS upload URL. It can be reused for the same fixed file until expiry."},"required_headers":{"type":"object","additionalProperties":{"type":"string"},"x-sensitive":true,"description":"Headers the upload request must send exactly as provided."},"content_length":{"type":"integer","format":"int64","minimum":1,"description":"Required HTTP content length in bytes."},"expires_at":{"type":"string","format":"date-time","minLength":1,"description":"Upload instruction expiry, bounded by the session and signing credentials."}}},"AssetUploadSessionInstruction":{"readOnly":true,"description":"The session and an optional upload instruction. A create replay omits upload when the session is no longer pending or instruction issuance is cooling down. Read its state, result and next steps before proceeding.","unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/AssetUploadSession"},{"type":"object","readOnly":true,"properties":{"upload":{"$ref":"#/components/schemas/AssetUploadInstruction"}}}]},"AssetKind":{"type":"string","minLength":1,"description":"The category a media-library asset's type falls into. Use it to group or filter a\nmixed library.\n\n- `image`: covers PNG, JPEG, and GIF.\n- `video`: covers MP4, WebM, and QuickTime.\n- `audio`: covers MP3, M4A, Ogg, and WAV.\n- `document`: covers PDF.\n","x-extensible-enum":["image","video","audio","document"],"example":"image"},"Asset":{"description":"A file in the workspace's media library, hosted at a permanent public URL. Embed or link `url` in your content. Metadata changes and removing a library entry preserve the URL and bytes; an abuse or security takedown can make the file unavailable.","unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/Timestamps"},{"type":"object","required":["id","url","thumbnail_url","name","content_type","kind","size_bytes","width","height","alt_text","folder_id","deleted_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/AssetID"},"url":{"type":"string","format":"uri","minLength":1,"readOnly":true,"description":"The asset's permanent public URL. Safe to embed or link in sent messages; for a document the usable form is a link."},"thumbnail_url":{"type":["string","null"],"format":"uri","minLength":1,"readOnly":true,"description":"A small preview of the asset, for rendering a picker or a grid. Intended for your own interfaces rather than for embedding in messages. Null for every kind but `image`: generating a preview of a video, an audio file, or a document would mean rendering its contents, which the library does not do. Show an icon for the `kind` instead."},"name":{"type":"string","minLength":1,"description":"The asset's display name. Defaults to the uploaded file's name."},"content_type":{"type":"string","minLength":1,"readOnly":true,"description":"The stored file's media type, determined from its contents."},"kind":{"readOnly":true,"$ref":"#/components/schemas/AssetKind"},"size_bytes":{"type":"integer","format":"int64","readOnly":true,"description":"The stored file's size in bytes. Images are re-encoded on upload, so for those this can differ from the size of the file you sent. Every other kind is stored byte-for-byte."},"width":{"type":["integer","null"],"readOnly":true,"description":"The stored image's width in pixels. Null for every kind but `image`."},"height":{"type":["integer","null"],"readOnly":true,"description":"The stored image's height in pixels. Null for every kind but `image`."},"alt_text":{"type":["string","null"],"maxLength":1000,"description":"Default alternative text for the asset. Use it as the starting point for an image description when inserting the asset into content. Updating this field does not update descriptions already copied into saved content."},"folder_id":{"oneOf":[{"$ref":"#/components/schemas/AssetFolderID"},{"type":"null"}],"description":"The folder the asset is filed in, or null when it sits at the top level of the library. Filing an asset never changes its URL."},"deleted_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the asset was removed from the library, or null if it is still listed. A removed asset keeps serving at its original URL."}}}],"example":{"id":"ast_01krdgeqcxet5s7t44vh8rt9mg","url":"https://us1.assets.birdusercontent.com/6fcy8y6a483sewgnjk2g35y2qz/01krdgeqcxet5s7t44vh8rt9mg/document.pdf","thumbnail_url":null,"name":"document.pdf","content_type":"application/pdf","kind":"document","size_bytes":48210,"width":null,"height":null,"alt_text":null,"folder_id":null,"deleted_at":null,"created_at":"2026-05-20T09:14:52Z","updated_at":"2026-05-20T09:14:52Z"}},"AssetUploadSessionDetails":{"readOnly":true,"description":"The session and its available media-library asset. A removed or unavailable result never causes another publication.","unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/AssetUploadSession"},{"type":"object","readOnly":true,"required":["asset"],"properties":{"asset":{"oneOf":[{"$ref":"#/components/schemas/Asset"},{"type":"null"}],"description":"Canonical asset when available, or null before completion or when unavailable."}}}]},"AssetUploadSessionPrepared":{"readOnly":true,"description":"A pending session with an upload instruction. A successful prepare returns the instruction; a session that cannot accept a transfer or a refresh during the cooldown returns an error.","unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/AssetUploadSession"},{"type":"object","readOnly":true,"required":["state","upload"],"properties":{"state":{"type":"string","minLength":1,"const":"pending","description":"The session is awaiting transfer and completion."},"upload":{"allOf":[{"$ref":"#/components/schemas/AssetUploadInstruction"}]}}}]},"AssetUploadBrowserHandoff":{"type":"object","readOnly":true,"additionalProperties":false,"required":["session","browser_url","next"],"properties":{"session":{"allOf":[{"$ref":"#/components/schemas/AssetUploadSessionDetails"}],"description":"The original upload session and any saved publication receipt. In this response, `session.next` is empty; follow the top-level `next` steps."},"browser_url":{"type":["string","null"],"format":"uri","minLength":1,"description":"Bird page for a pending session, or null when it no longer accepts an upload. The link grants no access; the person must sign in and have asset write permission in the workspace."},"next":{"type":"array","items":{"$ref":"#/components/schemas/NextAction"},"description":"Ordered steps to finish the fallback or read its outcome."}},"example":{"session":{"id":"aus_01krdgeqcxet5s7t44vh8rt9mg","state":"pending","expires_at":"2026-11-04T23:00:00Z","name":"Invoice","alt_text":null,"folder_id":null,"file":{"filename":"invoice.pdf","content_type":"application/pdf","size_bytes":1024,"sha256":"4e2090a479f7ce6b17ad31f991988f12571bcafbd4a441cc4063644fc1400ae0"},"result":null,"last_error":null,"next":[],"asset":null},"browser_url":"https://bird.com/dashboard/w/ws_01krdgeqcxet5s7t44vh8rt9mg/media-library/uploads/aus_01krdgeqcxet5s7t44vh8rt9mg","next":[{"kind":"external","description":"Open browser_url and have a person with asset write access select the local file they want to publish. The browser uses the selected bytes, which can differ from the chat attachment. Their browser must reach the storage hostname. Opening the page does not complete the upload."},{"kind":"operation","operation":"getAssetUploadSession","params":{"upload_id":"aus_01krdgeqcxet5s7t44vh8rt9mg"},"description":"After the person finishes, read the saved result using the original workspace and connection."}]}},"AssetSortField":{"type":"string","description":"Field used to order media-library records.","enum":["created_at"],"default":"created_at"},"AssetKindFilter":{"type":"string","minLength":1,"description":"The media category to select when listing assets.\n\n- `image`: covers PNG, JPEG, and GIF.\n- `video`: covers MP4, WebM, and QuickTime.\n- `audio`: covers MP3, M4A, Ogg, and WAV.\n- `document`: covers PDF.\n","enum":["image","video","audio","document"],"example":"image"},"AssetContentTypeFilter":{"type":"string","description":"Stored media type to match.","enum":["image/png","image/jpeg","image/gif","video/mp4","video/webm","video/quicktime","audio/mpeg","audio/mp4","audio/ogg","audio/wav","application/pdf"]},"AssetDeletedFilter":{"type":"string","description":"Whether to include assets removed from the library.","enum":["exclude","include","only"],"default":"exclude"},"AssetList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Asset"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"AssetUpload":{"description":"The file to upload, sent as a `multipart/form-data` body. Include each field at most once. Each text field is limited to 8 KiB before surrounding whitespace is trimmed; its character limit also applies. When provided, `folder_id` must identify an existing folder even when the upload matches an active asset in this workspace. A duplicate keeps its existing folder.","type":"object","additionalProperties":false,"required":["file"],"properties":{"file":{"type":"string","format":"binary","minLength":1,"description":"The file to upload. The file's contents determine its type; a declared content\ntype is ignored.\n\nImages: PNG, JPEG, GIF, or static WebP, up to 5 MiB (5,242,880 bytes). Every image\nis re-encoded. Static WebP becomes JPEG or PNG; animated GIF keeps its animation.\nAnimated WebP is not supported.\n\nVideo (MP4, WebM, QuickTime), audio (MP3, M4A, Ogg, WAV), and PDF: up to 25 MB,\nvalidated for container structure and stored byte-for-byte. Validation does not scan for malware.\n"},"name":{"type":"string","maxLength":255,"description":"A display name for the asset. Defaults to the uploaded file's name when omitted or empty after trimming."},"alt_text":{"type":"string","maxLength":1000,"description":"Default alternative text to use when inserting the asset into content."},"folder_id":{"$ref":"#/components/schemas/AssetFolderID","description":"The folder to file the asset in. Omit it to place the asset at the top level of the library. Must name an existing folder even when the upload matches an active asset in this workspace. A duplicate keeps its existing folder."}}},"AssetUpdate":{"description":"Fields to change on an asset. Omit a field to leave it as it is. The asset's bytes and URL are fixed and cannot be changed.","type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"The asset's display name."},"alt_text":{"type":["string","null"],"maxLength":1000,"description":"Default alternative text describing the image. Send null to clear it."},"folder_id":{"oneOf":[{"$ref":"#/components/schemas/AssetFolderID"},{"type":"null"}],"description":"The folder to file the asset in. Send null to move it to the top level of the library. Moving an asset never changes its URL."}},"example":{"name":"Summer banner","alt_text":"Sunset over the ocean"}},"AssetReferenceUsage":{"description":"Which copy of a resource uses an asset.\n\n- `draft`: it is not reaching anyone yet.\n- `published`: the change has to be published before recipients see it.\n- `both`: the asset is used in both copies.\n","type":"string","minLength":1,"x-extensible-enum":["draft","published","both"]},"AssetReference":{"description":"A resource that uses an asset, so you can find everything to update before replacing an image.","type":"object","additionalProperties":false,"required":["resource_type","resource_id","resource_name","usage"],"properties":{"resource_type":{"type":"string","minLength":1,"readOnly":true,"x-extensible-enum":["email_template","email_block"],"description":"What kind of resource this is. New kinds appear as other products start using the media library, so treat an unfamiliar value as a resource this client does not know how to link to rather than as an error."},"resource_id":{"type":"string","minLength":1,"readOnly":true,"description":"The resource's own identifier, carrying that resource's prefix: `emt_` for an email template, `ebl_` for a reusable email block. A reusable block is identified here by ID and name; the API does not yet return its content.","example":"emt_01j9zyq8k7f0ra2m6c4x5w8pv3"},"resource_name":{"type":"string","minLength":1,"readOnly":true,"description":"The resource's current display name, read when you list references."},"usage":{"readOnly":true,"$ref":"#/components/schemas/AssetReferenceUsage"}}},"AssetReferenceList":{"type":"object","additionalProperties":false,"required":["data","truncated"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AssetReference"}},"truncated":{"type":"boolean","readOnly":true,"description":"True when more resources use this asset than one response can carry, so the list is a partial answer. Replace the asset's usages you can see, then list again to find the rest."}}},"AssetFolder":{"description":"A folder in the workspace's media library. Folders organize assets for the people browsing them and never appear in an asset's URL, so moving an asset between folders leaves every message that already embeds it untouched.","unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/Timestamps"},{"type":"object","required":["id","name","parent_id","path"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/AssetFolderID"},"name":{"type":"string","minLength":1,"maxLength":255,"description":"The folder's display name. Unique among folders sharing the same parent, compared without regard to case."},"parent_id":{"oneOf":[{"$ref":"#/components/schemas/AssetFolderID"},{"type":"null"}],"description":"The folder this one sits in, or null when it sits at the top level of the library."},"path":{"type":"string","minLength":1,"readOnly":true,"description":"The folder's location written out from the top level, such as `/Marketing/Logos`. Provided so a caller can display a folder without walking its parents."}}}]},"AssetFolderList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AssetFolder"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"AssetFolderCreate":{"description":"The folder to create.","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"The folder's display name. Must be unique among folders sharing the same parent, compared without regard to case. Cannot contain `/`."},"parent_id":{"oneOf":[{"$ref":"#/components/schemas/AssetFolderID"},{"type":"null"}],"description":"The folder to create this one in. Omit it, or send null, to create the folder at the top level of the library."}},"example":{"name":"Campaign images"}},"AssetFolderUpdate":{"description":"Fields to change on a folder. Omit a field to leave it as it is. Renaming a folder or moving it changes nothing about the assets inside it, including their URLs.","type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"The folder's display name. Must be unique among folders sharing the same parent, compared without regard to case. Cannot contain `/`."},"parent_id":{"oneOf":[{"$ref":"#/components/schemas/AssetFolderID"},{"type":"null"}],"description":"The folder to move this one into. Send null to move it to the top level of the library. A folder cannot be moved into itself or into one of its own subfolders."}},"example":{"name":"Brand images"}},"ComplianceSubjectKind":{"type":"string","minLength":1,"enum":["sms_sender","number","number_emergency","identity"],"description":"What is being registered.\n\n- `sms_sender`: a sender registered to send to one country.\n- `number`: a phone number you hold that needs ownership paperwork before it\n  can carry traffic.\n- `number_emergency`: emergency calling on a dedicated number you hold. The\n  subject is created by turning emergency calling on for the number.\n- `identity`: a business you operate as, registered once and reused by\n  later registrations that name it.\n"},"ComplianceSubjectID":{"type":"string","minLength":1,"pattern":"^(scr|nda|nes|cid)_[0-9a-hjkmnp-tv-z]{26}$","example":"scr_01krdgeqcxet5s7t44vh8rt9mg","description":"What is being registered. For `sms_sender` this is the `scr_` id returned when you register a sender for a country. For `number` it is the `nda_` id of a dedicated number you hold, as returned by `GET /v1/numbers`. For `number_emergency`, it is the `nes_` ID of the emergency service being registered. A shared short code (`nal_`) is not accepted: it is shared, so its ownership paperwork is not yours to file. For `identity` it is the `cid_` id of the party being registered, picked from the parties your workspace holds, as returned by `GET /v1/compliance/identities`.\n"},"ComplianceProgram":{"type":"string","minLength":1,"x-extensible-enum":["alpha","numeric","mobile","local","national","short_code","short_code_fteu","toll_free","business"],"description":"The registration program a country runs. Available programs depend on the registered resource. An SMS sender registers under an authority regime (`alpha` or `numeric`). A phone number proves ownership under its number type (`mobile`, `local`, `national`, `short_code`, `short_code_fteu`, or `toll_free`), matching the values of `NumberType`. An identity registers your business itself under `business`, internationally: its coordinate's country is always `ZZ`. A value is therefore only meaningful alongside the subject it describes. More are added as coverage grows, so treat this as an open set rather than a fixed list.\n"},"ComplianceSubmissionID":{"type":"string","minLength":1,"pattern":"^csb_[0-9a-hjkmnp-tv-z]{26}$","example":"csb_01krdgeqcxet5s7t44vh8rt9mg"},"ComplianceObligationReason":{"type":"string","minLength":1,"x-extensible-enum":["policy_change","evidence_expiry","verdict_withdrawn","verifier_rejected"],"description":"Why a registration that is already authorised has been asked for something\nmore.\n\n- `policy_change` means the country published a newer version of its form and\n  your answers were given under an older one.\n- `evidence_expiry` means an answer we accepted has gone stale and needs\n  supplying again.\n- `verdict_withdrawn` means this registration was relying on an approval earned\n  on another registration, and that approval has since been taken back, so the\n  answer needs checking again here. Your answer has not changed and has not\n  expired.\n- `verifier_rejected` means an outside party we filed your details with reviewed\n  them and refused them. Your answer has not changed and has not expired, and\n  we did not overrule it.\n\nTreat this as an open set rather than a fixed list. More reasons are added as\nmore of a registration is kept under review, so a value you do not recognise is\none this server added rather than an error.\n"},"ComplianceObligationState":{"type":"string","minLength":1,"x-extensible-enum":["open","satisfied","lapsed","extended"],"description":"Where an obligation stands.\n\n- `open`: the due date has not passed and nothing has been supplied.\n- `satisfied`: you supplied what was asked.\n- `lapsed`: the date passed unmet and the registration is no longer\n  authorised.\n- `extended`: someone here gave you more time, and `due_at` reports the later\n  date.\n"},"ComplianceObligation":{"type":"object","additionalProperties":false,"required":["reason","state","due_at","target_version"],"properties":{"reason":{"allOf":[{"$ref":"#/components/schemas/ComplianceObligationReason"}],"readOnly":true},"state":{"allOf":[{"$ref":"#/components/schemas/ComplianceObligationState"}],"readOnly":true},"due_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"The date to supply this by. Where more time has been given, this is the later date rather than the one first asked for.\n"},"target_version":{"type":"integer","minimum":1,"readOnly":true,"description":"The version of the country's form your answers have to reach. For an expiry it is the version you already answered, filled in again.\n"}}},"ComplianceGeneralReasons":{"type":"array","readOnly":true,"description":"Feedback about the submission as a whole from an external verifier. It can remain visible while corrections are under review. Empty when no unresolved verifier feedback applies. On requirements responses, read `needs_input` to determine whether action is needed and `editable_for_verifier_repair` on each field to determine whether an approved or not-applicable answer can be replaced.\n","items":{"type":"string"}},"ComplianceRequirement":{"type":"object","additionalProperties":false,"required":["subject_kind","subject_id","program","country_code","satisfied","needs_input","review_pending","answers_editable","resubmission_allowed","submission_id","obligation","fields","general_reasons","reason","guidance"],"properties":{"next":{"type":"array","readOnly":true,"description":"What to do next about this country's requirements, given the state it is in. Each entry names one action and says\nwhy it is worth taking, so you can act on this response without working out the order\nyourself. Present on reads that compute it: an empty list means there is nothing to do,\nand the field is absent entirely on responses that do not report next actions.\n\nWhether anything is asked of you is `needs_input`, and this says what to do about it: send your\nanswers where none have been filed, or replace the ones that were refused. Which items those\nare, and why each was refused, is on the item in `fields`. For feedback about the\nwhole submission, read `reason` and `general_reasons` and update the details that need correction.\n","items":{"$ref":"#/components/schemas/NextAction"}},"subject_kind":{"allOf":[{"$ref":"#/components/schemas/ComplianceSubjectKind"}],"readOnly":true},"subject_id":{"readOnly":true,"description":"The registration these requirements are for, the same one you asked about. `null` when you asked without one, which is how a form read on its own says it is answering for nothing yet.\n","oneOf":[{"$ref":"#/components/schemas/ComplianceSubjectID"},{"type":"null"}]},"program":{"readOnly":true,"description":"The registration program these requirements belong to. `null` when the country runs no registration program at all, in which case nothing is required and the field list is empty.\n","oneOf":[{"$ref":"#/components/schemas/ComplianceProgram"},{"type":"null"}]},"country_code":{"allOf":[{"$ref":"#/components/schemas/CountryCode"}],"readOnly":true},"satisfied":{"type":"boolean","readOnly":true,"description":"Whether this country's requirements are met. `true` when no requirements apply, or once the submission is approved and every required requirement is approved or marked not applicable. This can remain true when an external verifier requests a correction. Once you submit that correction, it must pass review before this becomes true again, including any optional answers you change.\n"},"needs_input":{"type":"boolean","readOnly":true,"description":"Whether anything is waiting on you. True when a required requirement has no answer, its answer was refused or has gone stale, a business contact has not yet confirmed its emailed link (`awaiting_confirmation`), the registration needs correction as described by `reason`, or a closed submission accepts corrected details (`resubmission_allowed`). False does not imply that review is pending: a closed verifier correction can leave the requirements unsatisfied with no editable answers. Read `review_pending` to determine whether an answer is awaiting review. Read this independently of `satisfied`, which reports whether your paperwork is accepted. An unresolved verifier correction also sets it while the matching grant is live and the correction deadline has not passed, until you supply updated details. At the deadline or after grant withdrawal, an unresolved rejection alone does not set it because accepted answers can no longer be replaced. A corrected optional answer that is rejected or expires still needs your input through ordinary resupply, including after that deadline.\n"},"review_pending":{"type":"boolean","readOnly":true,"description":"Whether any submitted answer is awaiting or undergoing review. False after all answers have received verdicts. A closed verifier correction can remain unsatisfied with no review pending and no editable answers.\n"},"answers_editable":{"type":"boolean","readOnly":true,"description":"Whether you may change any answer, not only one that was refused or has gone stale. True for a number, emergency calling service, business identity or SMS sender registration whose submission has not been approved yet, including answers awaiting review or already accepted, and for a closed submission when `resubmission_allowed` is true. An SMS sender registration goes to the carrier or registry when it is approved, so it stays editable only until then. A changed answer loses its verdict and is reviewed again. Send only the answers you change. False once the submission is approved: replace only answers in `fields` whose state is `not_supplied`, `rejected`, `expired` or `awaiting_confirmation`, or those marked `editable_for_verifier_repair`.\n"},"resubmission_allowed":{"type":"boolean","readOnly":true,"description":"Whether Bird closed the previous submission but accepts corrected details for this registration. When `submission_id` is set, update that submission with your corrected answers and it is reviewed again. When `submission_id` is `null`, the form has changed since: create a new submission. `reason` says why the previous one was closed. False when nothing was closed, and when a closed submission cannot be sent again; contact support then.\n"},"reason":{"type":["string","null"],"readOnly":true,"description":"What to correct about the registration as a whole, or null when no registration-wide correction is requested. Reasons about individual answers are on the entries in fields.\n"},"guidance":{"type":["string","null"],"readOnly":true,"description":"What this country expects of you before and while you fill in the form, written by Bird's compliance team. It may point you to a registration you must complete elsewhere first. `null` when the form needs no introduction, or when no program applies.\n"},"submission_id":{"readOnly":true,"description":"The submission carrying your answers, once you have made one. `null` before that.","oneOf":[{"$ref":"#/components/schemas/ComplianceSubmissionID"},{"type":"null"}]},"obligation":{"readOnly":true,"description":"What this registration has to do to keep sending, and by when. Null when nothing is outstanding. An obligation does not stop you sending: the registration stays authorised until the date passes, and supplying what is asked for before then closes it with no interruption.\n","oneOf":[{"$ref":"#/components/schemas/ComplianceObligation"},{"type":"null"}]},"general_reasons":{"$ref":"#/components/schemas/ComplianceGeneralReasons","readOnly":true},"fields":{"type":"array","readOnly":true,"description":"Every requirement for this country, in the order to present them.","items":{"$ref":"#/components/schemas/ComplianceRequirementField"}},"closed_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the submission for these requirements was closed. Null while open or not yet submitted."}}},"ComplianceTemplateID":{"type":"string","minLength":1,"pattern":"^cmt_[0-9a-hjkmnp-tv-z]{26}$","example":"cmt_01krdgeqcxet5s7t44vh8rt9mg"},"ComplianceSubmissionIdentity":{"type":"object","additionalProperties":false,"description":"Registers this on behalf of a party you have not stored yet, creating it as part\nof the submission so you do not need a separate call. Exclusive with\n`identity_id`.\n\nEach time you send this you get a new party. Single-value identity answers filed for one\nare reused by registrations naming the same party. Documents and lists are\nsupplied separately for each registration. Send this once and use the\n`identity_id` from the response for the countries that follow.\n","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"What to call the party. Optional: left out, it takes the legal entity name you supplied. If this country's form does not ask for one, send a name here.","example":"Goldcrest Communications SAS"}}},"ComplianceAnswer":{"type":"object","additionalProperties":false,"example":{"key":"business_registration_number","value":"90012768"},"required":["key"],"description":"One answer. Which field carries it follows from the requirement, as the\nrequirements read reports it:\n\n- answered once, inline: `value`\n- answered once, with a document: `attachment_id`\n- `max_items` set, inline: `values`\n- `max_items` set, with documents: `attachment_ids`\n\nSend exactly one of the four. Order in a list is preserved and is part of the\nanswer.\n","properties":{"key":{"type":"string","minLength":1,"description":"The requirement this answers, as given by its key in the requirements read.","example":"business_registration_number"},"value":{"type":"string","minLength":1,"description":"The answer, for a requirement answered inline. Send every answer as a string whatever its data type, so a number goes as `\"1500\"` and a yes-or-no as `\"true\"`.\n","example":"90012768"},"attachment_id":{"allOf":[{"$ref":"#/components/schemas/AttachmentID"}],"description":"The uploaded document, for a requirement that takes one. Upload the file as an attachment first, then send the id it returns.\n"},"values":{"type":"array","minItems":1,"maxItems":50,"description":"The answers, for a requirement whose `max_items` is set and which is answered inline. Send each as a string whatever its data type, and send them in the order you mean them to be read. At most `max_items` of them.\n","items":{"type":"string","minLength":1}},"attachment_ids":{"type":"array","minItems":1,"maxItems":50,"uniqueItems":true,"description":"The uploaded documents, for a requirement whose `max_items` is set and which takes documents. Upload each file first and send the ids it returns, in order. At most `max_items` of them.\n","items":{"$ref":"#/components/schemas/AttachmentID"}}},"oneOf":[{"required":["value"]},{"required":["attachment_id"]},{"required":["values"]},{"required":["attachment_ids"]}]},"ComplianceSubmissionCreate":{"type":"object","additionalProperties":false,"required":["subject_kind","subject_id","program","country_code","answers"],"properties":{"subject_kind":{"$ref":"#/components/schemas/ComplianceSubjectKind"},"subject_id":{"$ref":"#/components/schemas/ComplianceSubjectID"},"program":{"$ref":"#/components/schemas/ComplianceProgram"},"country_code":{"$ref":"#/components/schemas/CountryCode"},"identity_id":{"allOf":[{"$ref":"#/components/schemas/ComplianceIdentityID"}],"description":"An existing party this registration is for. It fills in the business details you left out from what that party already holds (except `business_website` on a business verification), and each single-value answer you file about the party is written back onto it for next time, whatever the verdict. Documents and multi-value answers are asked fresh each time. Send this or `identity`, never both. An id belonging to another organization is rejected; nothing is created here. When `subject_kind` is `identity`, send neither: `subject_id` already names the party."},"identity":{"$ref":"#/components/schemas/ComplianceSubmissionIdentity"},"answers":{"type":"array","minItems":1,"description":"Every answer at once. Because submissions have no multi-call draft, send a complete set. Anything missing or malformed comes back named. A requirement the named party already answers may be left out; one you send anyway wins over what the party holds. A business verification never fills in `business_website`: when you send it, its domain is the one your organization proves and `contact_email` must be on, so leave it out if the business's website is on another domain.\n","items":{"$ref":"#/components/schemas/ComplianceAnswer"}}}},"ComplianceDomainProofMethod":{"type":"string","minLength":1,"x-extensible-enum":["member_login","sso_domain","contact_confirmation"],"description":"How the domain was proven.\n\n- `member_login`: a member of this workspace signs in with a verified address at the domain.\n- `sso_domain`: the domain is your organization's verified single sign-on domain.\n- `contact_confirmation`: the business contact confirmed a link we emailed to their address at the domain.\n"},"ComplianceDomainProof":{"type":"object","additionalProperties":false,"readOnly":true,"description":"How your organization proved it controls the business's domain, for a business verification.","required":["method","domain"],"properties":{"method":{"$ref":"#/components/schemas/ComplianceDomainProofMethod"},"domain":{"type":"string","minLength":1,"description":"The business's registrable domain, such as `acme.com`.","example":"acme.com"}}},"ComplianceItemID":{"type":"string","minLength":1,"pattern":"^cit_[0-9a-hjkmnp-tv-z]{26}$","example":"cit_01krdgeqcxet5s7t44vh8rt9mg"},"ComplianceSubmissionItem":{"type":"object","additionalProperties":false,"required":["id","key","state","value","attachment_id","values","attachment_ids","reason","decided_at","expires_at","inherited"],"properties":{"inherited":{"type":"boolean","readOnly":true,"description":"`true` when this answer was accepted without a fresh review, because the same answer to the same requirement had already been approved for this party in this country. It carries the original verdict, including when that verdict expires.\n"},"id":{"allOf":[{"$ref":"#/components/schemas/ComplianceItemID"}],"readOnly":true},"key":{"type":"string","minLength":1,"readOnly":true,"description":"The requirement this answers."},"state":{"allOf":[{"$ref":"#/components/schemas/ComplianceItemState"}],"readOnly":true},"value":{"type":["string","null"],"readOnly":true,"description":"Your answer, for a requirement answered inline. Every answer travels as a string whatever its data type, so a number reads back as `\"1500\"` and a yes-or-no as `\"true\"`. Use the data type to parse it. `null` for a requirement that takes a document.\n"},"attachment_id":{"readOnly":true,"description":"The document you supplied, for a requirement that takes one. `null` otherwise.","oneOf":[{"$ref":"#/components/schemas/AttachmentID"},{"type":"null"}]},"values":{"type":["array","null"],"readOnly":true,"description":"Your answers, for a requirement that takes several and is answered inline. `null` for one answered once. Order is as you sent it.\n","items":{"type":"string","minLength":1}},"attachment_ids":{"type":["array","null"],"readOnly":true,"description":"The documents you supplied, for a requirement that takes several. `null` otherwise.\n","items":{"$ref":"#/components/schemas/AttachmentID"}},"reason":{"type":["string","null"],"readOnly":true,"description":"Why this was rejected, when it was. `null` otherwise."},"decided_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this was decided. `null` while no decision has been made."},"expires_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this answer goes stale and must be supplied again. `null` when it does not expire."}}},"ComplianceSubmission":{"type":"object","additionalProperties":false,"required":["id","subject_kind","subject_id","program","country_code","identity_id","satisfied","items","created_at","updated_at"],"properties":{"next":{"type":"array","readOnly":true,"description":"What to do next about this submission, given the state it is in. Each entry names one action and says\nwhy it is worth taking, so you can act on this response without working out the order\nyourself. Present on reads that compute it: an empty list means there is nothing to do,\nand the field is absent entirely on responses that do not report next actions.\n\nA submission reports the answers you filed; whether the country's requirements are met is\nreported by the requirements read. So this points there rather than repeating a verdict it\ndoes not own.\n","items":{"$ref":"#/components/schemas/NextAction"}},"id":{"allOf":[{"$ref":"#/components/schemas/ComplianceSubmissionID"}],"readOnly":true},"subject_kind":{"allOf":[{"$ref":"#/components/schemas/ComplianceSubjectKind"}],"readOnly":true},"subject_id":{"allOf":[{"$ref":"#/components/schemas/ComplianceSubjectID"}],"readOnly":true},"program":{"allOf":[{"$ref":"#/components/schemas/ComplianceProgram"}],"readOnly":true},"country_code":{"allOf":[{"$ref":"#/components/schemas/CountryCode"}],"readOnly":true},"identity_id":{"oneOf":[{"$ref":"#/components/schemas/ComplianceIdentityID"},{"type":"null"}],"readOnly":true,"description":"The party this registration was filed for, or `null` if none was named."},"domain_proof":{"allOf":[{"$ref":"#/components/schemas/ComplianceDomainProof"}],"readOnly":true,"description":"For a business verification, how your organization proved it controls the business's domain. Absent otherwise."},"verifying_user_id":{"allOf":[{"$ref":"#/components/schemas/UserID"}],"readOnly":true,"description":"For a business verification, the member who acts for the business. Absent otherwise."},"satisfied":{"type":"boolean","readOnly":true,"description":"Whether this country's requirements are met. `true` once the submission is approved and every required requirement is approved or marked not applicable. This can remain true when an external verifier requests a correction. Once you submit that correction, it must pass review before this becomes true again, including any optional answers you change.\n"},"items":{"type":"array","readOnly":true,"description":"Every answer and where it stands. Each is decided on its own.","items":{"$ref":"#/components/schemas/ComplianceSubmissionItem"}},"created_at":{"type":"string","minLength":1,"format":"date-time","readOnly":true,"description":"When this was submitted."},"updated_at":{"type":"string","minLength":1,"format":"date-time","readOnly":true,"description":"When it last changed."},"closed_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this submission was closed. Null while it remains open."},"closure_reason":{"type":["string","null"],"readOnly":true,"description":"The decline reason for a closed submission, or null while open."}}},"ComplianceSubmissionResupply":{"type":"object","additionalProperties":false,"required":["answers"],"description":"Replacement answers for an existing submission. Rejected, expired, or missing answers can\nbe supplied again; accepted answers normally cannot be changed. While the requirements\nresponse reports `answers_editable` with a `submission_id`, you can change any answer on that\nsubmission; send only the ones you change. With `submission_id` null, create a new submission instead.\n\nWhen the requirements response marks an accepted answer as `editable_for_verifier_repair`,\nyou can replace it during an open correction and before its deadline, or update an\napproved emergency service address. Accepted-answer\nrepairs must change content; unchanged accepted entries are ignored. Rejected, expired,\nor missing answers follow the ordinary resupply rules, including same-value retries\nafter a grant is withdrawn. Supplied replacements are reviewed again.\n","properties":{"answers":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/ComplianceAnswer"}}}},"StatsGrain":{"type":"string","minLength":1,"enum":["day","hour"],"readOnly":true,"description":"The bucket grain of the series, either `day` or `hour`.","example":"day"},"SMSStatsSeriesPeriod":{"type":"object","additionalProperties":false,"description":"The window and bucket grain the response covers, echoed from the request, plus the freshness boundary the data is current to.\n","required":["from","to","grain"],"properties":{"from":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive start of the window. A calendar day (YYYY-MM-DD) on the day grain, an RFC 3339 instant rounded to the hour on the hour grain.","example":"2026-05-01"},"to":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive end of the window. A calendar day (YYYY-MM-DD) on the day grain, an RFC 3339 instant rounded to the hour on the hour grain.","example":"2026-05-31"},"grain":{"$ref":"#/components/schemas/StatsGrain","readOnly":true},"data_as_of":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"Latest time reflected in the statistics. More recent events might not be included yet. Null when the freshness boundary is unavailable.\n","example":"2026-05-25T14:03:10Z"}}},"SMSStatsResponse":{"type":"object","additionalProperties":false,"description":"Time-series stats payload. `period` echoes the range and bucket grain the server computed against; `data` is one row per bucket in chronological order.\n","required":["period","data"],"properties":{"period":{"$ref":"#/components/schemas/SMSStatsSeriesPeriod"},"data":{"type":"array","readOnly":true,"description":"One row per day or hour in chronological order. Buckets with no activity contain zero counts.","items":{"$ref":"#/components/schemas/SMSStatsPoint"}}}},"StatsTrendGrain":{"type":"string","enum":["daily","hourly"],"default":"daily","description":"Bucket grain for a stats trend series."},"SMSOriginatorStatsPoint":{"type":"object","additionalProperties":false,"description":"Aggregate delivery and latency stats for a single originator (the sender address messages were sent from) over the requested period.","required":["originator","delivery","latency"],"properties":{"originator":{"type":"string","minLength":1,"readOnly":true,"description":"Sender address this row aggregates, either an alphanumeric sender ID or a phone number. Matches the message `from` value.","example":"BirdSMS"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSDeliveryStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSLatencyStats"}]},"trend":{"type":"array","readOnly":true,"description":"Per-bucket lifecycle counts for this originator, using `trend_grain`. Includes only buckets with activity. Present when `include_trend=true`.","items":{"$ref":"#/components/schemas/SMSStatsPoint"}}}},"SMSStatsByOriginatorResponse":{"type":"object","additionalProperties":false,"description":"Per-originator breakdown for the requested period, ranked by the `sort` metric (default `accepted`) descending and capped at the requested `limit` (default 50, max 200).","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/SMSStatsSummaryPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Originator breakdown rows, ranked by the `sort` metric (default `accepted`) descending. Empty when no messages were sent in the period.","items":{"$ref":"#/components/schemas/SMSOriginatorStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct originators with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.\n","example":42}}},"SMSCostCenterStatsPoint":{"type":"object","readOnly":true,"additionalProperties":false,"description":"Aggregate delivery and latency stats for a single cost center over the requested period.","required":["cost_center","delivery","latency"],"properties":{"cost_center":{"type":"string","minLength":1,"maxLength":64,"description":"The cost center this row aggregates, as set on the message or taken from its messaging profile at send time.","example":"CC001234"},"delivery":{"allOf":[{"$ref":"#/components/schemas/SMSDeliveryStats"}]},"latency":{"allOf":[{"$ref":"#/components/schemas/SMSLatencyStats"}]},"trend":{"type":"array","description":"Per-bucket lifecycle counts for this cost center, using `trend_grain`. Includes only buckets with activity. Present when `include_trend=true`.","items":{"$ref":"#/components/schemas/SMSStatsPoint"}}}},"SMSStatsByCostCenterResponse":{"type":"object","readOnly":true,"additionalProperties":false,"description":"Per-cost-center breakdown for the requested period, ranked by the `sort` metric (default `accepted`) descending and capped at the requested `limit` (default 50, max 200).","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/SMSStatsSummaryPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","description":"Cost center breakdown rows, ranked by the `sort` metric (default `accepted`) descending. Empty when no messages with a cost center were sent in the period.","items":{"$ref":"#/components/schemas/SMSCostCenterStatsPoint"}},"total":{"type":"integer","minimum":0,"description":"Total number of distinct cost centers with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.\n","example":8}}},"SMSStatusStatsPoint":{"type":"object","additionalProperties":false,"description":"The number of messages that ended the requested period in a single lifecycle status. This transposes the lifecycle counts into one row per status, so it carries no rates or latency.","required":["status","count"],"properties":{"status":{"type":"string","minLength":1,"readOnly":true,"description":"The lifecycle status this row counts. These are successive lifecycle stages. The `accepted` status was admitted for sending, `sent` was handed to the carrier, and `delivered` was confirmed by the carrier. The `undelivered`, `failed`, and `expired` statuses are failure outcomes. The `rejected` status was refused before a send attempt. Counted outcomes are a subset of the full message status vocabulary. The pre-send `scheduled`, cancellation `canceled`, and inbound-only `received` statuses are not send outcomes, so they never appear here.\n","enum":["accepted","sent","delivered","undelivered","failed","rejected","expired"],"example":"delivered"},"count":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages that reached this lifecycle status in the period, attributed to the message's send time rather than the event's own.","example":14720}}},"SMSStatsByStatusResponse":{"type":"object","additionalProperties":false,"description":"Lifecycle-status breakdown for the requested period, ordered by message count descending. Statuses with no activity are omitted.","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/SMSStatsSummaryPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Status breakdown rows, one per lifecycle status with activity, ordered by count descending. Empty when no messages had activity in the period.","items":{"$ref":"#/components/schemas/SMSStatusStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Number of distinct lifecycle statuses with activity in the period (at most seven). Equal to the number of rows returned, since this breakdown is never capped.","example":5}}},"SMSInboundStatsResponse":{"type":"object","additionalProperties":false,"description":"Received-message time series. `period` echoes the range and bucket grain the server computed against; `data` is one row per bucket in chronological order.\n","required":["period","data"],"properties":{"period":{"$ref":"#/components/schemas/SMSStatsSeriesPeriod"},"data":{"type":"array","readOnly":true,"description":"One row per bucket (day or hour, per the grain) in the period, in chronological order. Buckets with no activity are included with a count of zero, so the series charts continuously without client-side gap handling.","items":{"$ref":"#/components/schemas/SMSInboundStatsPoint"}}}},"SMSInboundNumberStatsPoint":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Received-message volume for one of your numbers.\n","required":["number","received"],"properties":{"number":{"type":"string","minLength":1,"readOnly":true,"description":"The Bird number the messages arrived on, in E.164, or the short code they were sent to. This is the same value the message resource exposes as `to`.","example":"+14155557701"},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages received on this number during the period.","example":412}}},"SMSInboundStatsByNumberResponse":{"type":"object","additionalProperties":false,"description":"Received-message volume broken down by number, ranked by volume.\n","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/SMSStatsSummaryPeriod"},"data":{"type":"array","readOnly":true,"description":"One row per number with activity in the period, most messages first, capped at the requested `limit`. A number with no messages in the period is absent rather than zero-filled, because unlike a time bucket it is not part of a continuous axis.\n","items":{"$ref":"#/components/schemas/SMSInboundNumberStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct numbers with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.","example":6}}},"DestinationSuperRegion":{"type":["string","null"],"minLength":1,"x-extensible-enum":["europe","americas","middle_east_africa","asia_pacific"],"example":"europe","description":"The continent-scale group the region rolls up into. Derived from `region`, and `null` whenever that is. Treat the set as open.\n"},"SMSSenderSourceKind":{"type":"string","minLength":1,"x-extensible-enum":["number","shared_number","alpha"],"description":"What backs an SMS sender: a dedicated number, a shared shortcode, or an alphanumeric sender string.\n"},"SMSSenderSortField":{"type":"string","enum":["created_at","sender"]},"SMSSenderStatus":{"type":"string","minLength":1,"enum":["active","pending_number_ownership","pending_registrations"],"description":"Where a sender stands on its own setup: the ownership paperwork its number owes, and whether\nany destination is active yet.\n\n- `active`: at least one destination is active.\n- `pending_number_ownership`: the paperwork proving you own this sender's number is not in\n  place, either because it has not been supplied or because the country that issued the\n  number has not accepted it yet. Every send from this sender is refused until it does.\n- `pending_registrations`: no destination is active yet, whether because the sender has not\n  registered where a registration is required, its registration is under review, or it was\n  refused.\n  Follow `next` to the requirements read to see which, country by country.\n\nThis is not whether a message will be accepted. That is decided per destination country, and\n[Get sender requirements](/docs/api/reference/list-workspace-sms-sender-requirements) is the\nonly read that answers it. A country that requires a registration, where you have not\nregistered, is in none of the three `destinations` lists. Read `next` for where to go from here.\n"},"SMSSenderDestinations":{"type":"object","additionalProperties":false,"required":["active","pending","needs_attention"],"description":"Where this sender stands with the destinations it is set up for, grouped by whose move is\nnext.\n\nThese are not every country the sender could reach. `pending` and `needs_attention` cover\nonly countries you hold a registration for, so a country you could register for but have not,\nor one you have simply not switched on, appears in none of the three: there is nothing\noutstanding there. To see everything reachable and what each country would take, read\n[Get sender requirements](/docs/api/reference/list-workspace-sms-sender-requirements).\n","properties":{"active":{"type":"array","readOnly":true,"description":"Countries you can send to today: switched on in your SMS destination settings, and either asking for no registration or holding an approved one. A country counts here however it became usable, including one enabled for you automatically when your organization set its business address.\n","items":{"$ref":"#/components/schemas/CountryCode"}},"pending":{"type":"array","readOnly":true,"description":"Countries whose registration is under way and waiting on us or on a carrier. Nothing is asked of you for these; they move to `active` when the registration is approved.\n","items":{"$ref":"#/components/schemas/CountryCode"}},"needs_attention":{"type":"array","readOnly":true,"description":"Countries you have registered for that are not working, and so are waiting on you: the registration was refused or withdrawn, or it is approved but the destination is switched off in your SMS destination settings. While this sender's number is missing the paperwork proving you own it, every country you have registered for is listed here, because none of them can carry a message until that is settled.\n","items":{"$ref":"#/components/schemas/CountryCode"}}}},"SMSSender":{"type":"object","additionalProperties":false,"required":["id","sender","source_kind","status","destinations","created_at","updated_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/SMSSenderID","description":"Identifier of this sender."},"sender":{"type":"string","minLength":1,"readOnly":true,"description":"The value messages are sent from: a number in E.164 format, a shortcode, or an alphanumeric sender string.\n"},"source_kind":{"allOf":[{"$ref":"#/components/schemas/SMSSenderSourceKind"}],"readOnly":true},"sender_type":{"allOf":[{"$ref":"#/components/schemas/SMSSenderType"}],"readOnly":true,"description":"The kind of sender identity this is, which decides what each destination country asks of it. It is finer than source_kind: a short code and an ordinary long code are both numbers but follow different rules.\n"},"country_code":{"readOnly":true,"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}],"description":"The country of the number this sender sends from. Null for an alphanumeric sender."},"number_id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/AllocatedNumberID"}],"description":"The number this sender sends from, as returned in the `id` field of `GET /v1/numbers`. Present only when `source_kind` is `number` or `shared_number`; an alphanumeric sender has no number behind it. Exactly one sender exists per number, so this is also how you go the other way: `GET /v1/sms/senders?number_id={id}` returns this sender.\n"},"status":{"allOf":[{"$ref":"#/components/schemas/SMSSenderStatus"}],"readOnly":true},"next":{"type":"array","readOnly":true,"description":"What to do next about this sender, given the state it is in. Present on reads that\ncompute it: an empty list means there is nothing to do, and the field is absent entirely\non responses that do not report next actions.\n\nThis routes rather than advises. A sender only knows about itself, so where the work is\nper-country it names the requirements read rather than guessing which country you meant.\n","items":{"$ref":"#/components/schemas/NextAction"}},"destinations":{"allOf":[{"$ref":"#/components/schemas/SMSSenderDestinations"}],"readOnly":true},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true},"updated_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true}}},"SMSSenderList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Your workspace's dedicated numbers and alphanumeric senders, newest first.","items":{"$ref":"#/components/schemas/SMSSender"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"SMSSenderCreate":{"type":"object","additionalProperties":false,"required":["type","sender"],"properties":{"type":{"type":"string","minLength":1,"enum":["alpha"],"description":"The kind of sender to create. Only `alpha` (an alphanumeric sender string) is customer-creatable. Dedicated numbers become senders when you allocate them from inventory. This endpoint cannot create their senders.\n"},"sender":{"type":"string","minLength":3,"maxLength":11,"description":"The alphanumeric sender string to create, for example \"BIRD\". 3–11 letters, digits, spaces, dashes, underscores, or dots, at least one of them a letter, and no separator at either end.\n","example":"BIRD"}}},"SMSRegistrationStatus":{"type":"string","minLength":1,"x-extensible-enum":["pending","under_review","bird_approved","carrier_pending","approved","rejected","suspended","registration_required","not_required"],"description":"Country-registration lifecycle state:\n\n- `pending`: Registration work has started.\n- `under_review`: Everything this country requires has been submitted and is being reviewed. Nothing is asked of you while it is.\n- `bird_approved`: Our review passed and carrier approval is still pending.\n- `carrier_pending`: Submitted to the approving carrier or registry.\n- `approved`: Approved for sending.\n- `rejected`: Registration was refused.\n- `suspended`: A previously active registration is suspended.\n- `registration_required`: No required registration has been started.\n- `not_required`: The country does not require registration.\n"},"SMSCountryRegistrationID":{"type":"string","minLength":1,"pattern":"^scr_[0-9a-hjkmnp-tv-z]{26}$","example":"scr_01krdgeqcxet5s7t44vh8rt9mg"},"SMSSenderProgramEntry":{"type":"string","minLength":1,"x-extensible-enum":["none","10dlc_brand","10dlc_campaign","10dlc_campaign_number_link","tfn_verification","compliance_submission"],"description":"The resource this country's walk continues at. `none` means the first one is still to be\ncreated; every other value names what to read next, whose id is `program_entry_ref`.\n\nEvery programme names its entry. US 10DLC enters at a `10dlc_brand` or a `10dlc_campaign` and\ncontinues at the `10dlc_campaign_number_link` a number hangs off. US toll-free both enters and\ncontinues at its `tfn_verification`. A programme answered by filling in a form enters at the\n`compliance_submission` holding your answers, the only entry that names something you filled in\nrather than something a carrier holds. Read the entry whenever you need the detail behind a\ncountry: it carries why a registration was refused, which this row reports only as a status.\n\nThe values are programme-prefixed where a programme owns them, so one vocabulary reads the same\nwherever an entry is reported. Tolerate a value you do not recognize: read `program_entry_ref`\nas the id of a resource to fetch, and read `next` for what to do about the country.\n\nComputed on this read, so it is never stale and never absent. That matters most where a row\ncannot answer for itself: a toll-free verification you have started but not submitted is named\nhere even though no registration exists for it yet, which is what tells you to finish that one\nrather than start a second.\n"},"SMSSenderRequirement":{"type":"object","additionalProperties":false,"required":["sender_id","country_code","registration_mode","sender_id_behavior","status","destination_enabled","has_compliance_requirements","program_entry"],"properties":{"sender_id":{"allOf":[{"$ref":"#/components/schemas/SMSSenderID"}],"readOnly":true,"description":"The sender these requirements are for, the same one you asked about. It is repeated on every row so a row is complete on its own: what a country needs is addressed by the sender and the country together, and a step that registers this sender needs both.\n"},"country_code":{"allOf":[{"$ref":"#/components/schemas/CountryCode"}],"readOnly":true},"registration_mode":{"allOf":[{"$ref":"#/components/schemas/SMSRegistrationMode"}],"readOnly":true,"description":"Whether country registration is absent, optional, or required before sending."},"sender_id_behavior":{"allOf":[{"$ref":"#/components/schemas/SMSSenderIDBehavior"}],"readOnly":true,"description":"The effective sender ID behavior for this sender and destination. An approved optional registration changes `overwritten` to `preserved` for its permitted message categories. Required registration does not change the configured sender ID behavior after approval. `unknown` means no behavior is published. This is expected behavior, not confirmation of what a recipient saw. Overwrite details are published in the country messaging context.\n"},"program":{"readOnly":true,"description":"The registration program available for this destination, including optional registration. An existing registration retains its own program.\n","oneOf":[{"$ref":"#/components/schemas/SMSRegistrationProgram"},{"type":"null"}]},"status":{"allOf":[{"$ref":"#/components/schemas/SMSRegistrationStatus"}],"readOnly":true,"description":"Where this sender stands with this country's registration programme. The `approved` and `not_required` statuses satisfy it. Every other status leaves it unsatisfied: the `registration_required` status means the required registration has not started, the `pending` status means something required is still owed by you, and `under_review` means it is all with us. Read `next` for what to do about any of it.\n\nRegistration blocks sending when `registration_mode` is `required`. Optional registration can be pending while sending remains available with `sender_id_behavior` set to `overwritten`. Check `destination_enabled` too, which is independent of registration progress.\n"},"next":{"type":"array","readOnly":true,"description":"What to do next about this country, given the state it is in. Each entry names one action\nand says why it is worth taking, so you can act on this response without working out the\norder yourself. Present on reads that compute it: an empty list means there is nothing to\ndo, and the field is absent entirely on responses that do not report next actions.\n\nThis routes rather than advises: it names where to go to act on this country, and the\nresource it names carries what to do there. So a country under carrier review names the\nverification to read, rather than restating a verdict that resource owns.\n","items":{"$ref":"#/components/schemas/NextAction"}},"destination_enabled":{"type":"boolean","readOnly":true,"description":"Whether your workspace has this destination country turned on. This is a workspace setting rather than anything about this sender, and it is checked before the sender is even considered, so a country can be fully registered and still refuse your messages because it is switched off here. Turn it on with [Update SMS destinations](/docs/api/reference/update-workspace-sms-destinations).\n"},"has_compliance_requirements":{"type":"boolean","readOnly":true,"description":"Whether registering this sender for this country continues at compliance requirements you answer with a submission. When true, read them with [Get what a registration needs](/docs/api/reference/get-workspace-compliance-requirements) once the registration exists; the one-off setup fee is charged when you submit, and the monthly charge starts once the registration is approved. False in three cases: the country takes no registration (`registration_mode` is `none`); its programme runs its own flow, such as US 10DLC, toll-free, and short codes, which `next` routes to; or the registration goes to review with nothing to submit, and both charges are made once it is approved.\n"},"category":{"type":["string","null"],"minLength":1,"readOnly":true,"x-extensible-enum":["transactional","marketing","authentication","service"],"description":"Message category the registration covering this country is approved for. Null when the registration admits any category, and null before you register.\n"},"registration_id":{"readOnly":true,"description":"The registration covering this country, once one exists. Null before you register. Where the country's requirements are collected as a form, this is the `subject_id` to pass to `GET /v1/compliance/requirements`.\n","oneOf":[{"$ref":"#/components/schemas/SMSCountryRegistrationID"},{"type":"null"}]},"program_entry":{"$ref":"#/components/schemas/SMSSenderProgramEntry"},"program_entry_ref":{"type":["string","null"],"minLength":1,"readOnly":true,"description":"The id of the resource `program_entry` names, or null when it names none. Where the workspace holds several to choose from, this is the one to start from: the only brand or campaign if there is one, otherwise the most recently approved, and otherwise the most recent.\n"},"rejection_reason":{"type":["string","null"],"minLength":1,"readOnly":true,"description":"Why the registration was rejected, when it was. Null otherwise."},"obligation_due_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this country's registration must be brought up to date by, if it must. Null when nothing is outstanding, which is the ordinary case. The sender keeps sending until the date passes; `GET /v1/compliance/requirements` says what is being asked for.\n"},"timeline_min_days":{"type":["integer","null"],"readOnly":true,"description":"Shortest time approval usually takes, in business days. Null when the country publishes no estimate."},"timeline_max_days":{"type":["integer","null"],"readOnly":true,"description":"Longest time approval usually takes, in business days. Null when the country publishes no estimate."},"registration_types":{"type":"array","readOnly":true,"items":{"type":"string","minLength":1},"description":"Registration categories this country's program accepts."}}},"SMSSenderProgram":{"type":"object","additionalProperties":false,"required":["program","program_ref","countries","status"],"properties":{"program":{"readOnly":true,"description":"The program this registration runs. Null for the countries that asked for no registration at all, which are grouped together because the only thing they have in common is that you registered nothing for them.\n","oneOf":[{"$ref":"#/components/schemas/SMSRegistrationProgram"},{"type":"null"}]},"program_ref":{"type":["string","null"],"minLength":1,"readOnly":true,"description":"The resource this registration produced, which `program` tells you how to read: a toll-free verification for `tfn`, or a campaign number link for `10dlc`. The link connects this number to its campaign. Get the campaign from `GET /v1/sms/10dlc/campaign-number-links/{link_id}`. Null for a program that issues none, and for one you have not registered yet. Follow it when the status is under_review, because only that resource distinguishes a carrier still reviewing from one waiting on more information from you.\n"},"countries":{"type":"array","minItems":1,"readOnly":true,"description":"Every country this one registration covers. Some programs open several at once, so a single toll-free verification or campaign registration can be what permits four destinations.\n","items":{"$ref":"#/components/schemas/CountryCode"}},"status":{"readOnly":true,"description":"Where this registration stands, for all of the countries it covers. `registration_required` means you have not made it yet and every country listed is waiting on it. Null in the one case where the countries have diverged and no single answer is true: read those countries individually.\n","oneOf":[{"$ref":"#/components/schemas/SMSRegistrationStatus"},{"type":"null"}]}}},"SMSSenderRequirementList":{"type":"object","additionalProperties":false,"required":["data","programs"],"properties":{"data":{"type":"array","description":"One entry per destination country this sender can reach, which is the level the decision to carry your message is made at. Ask this list whether you can send somewhere, and what it takes first. A country missing from it is one this sender has no route to at all, so no registration would open it.\n","items":{"$ref":"#/components/schemas/SMSSenderRequirement"}},"programs":{"type":"array","description":"The same countries seen as the registrations they belong to, one entry per registration, with the countries each one covers. Ask this list what to do next: an entry whose status is `registration_required` is a registration you still have to make, and its countries are the ones it would open. Every other entry is a registration you have already made, so this list is the whole picture rather than only the part you have finished.\n","items":{"$ref":"#/components/schemas/SMSSenderProgram"}}}},"SMSCountryRegistrationCreate":{"type":"object","additionalProperties":false,"required":["country_code"],"properties":{"country_code":{"$ref":"#/components/schemas/CountryCode"},"category":{"allOf":[{"$ref":"#/components/schemas/SMSMessageCategory"}],"description":"Message category to register the sender for. Omit to register the sender for all categories.\n"}}},"SMSCountryRegistration":{"type":"object","additionalProperties":false,"required":["id","country_code","status","created_at","updated_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/SMSCountryRegistrationID","description":"Identifier of this country registration."},"country_code":{"allOf":[{"$ref":"#/components/schemas/CountryCode"}],"readOnly":true},"registration_mode":{"allOf":[{"$ref":"#/components/schemas/SMSRegistrationMode"}],"readOnly":true,"description":"Current registration policy for this destination and sender type. Omitted if the policy or sender is no longer available."},"sender_id_behavior":{"allOf":[{"$ref":"#/components/schemas/SMSSenderIDBehavior"}],"readOnly":true,"description":"Expected sender ID behavior for this registration's message categories. Optional registration preserves the sender ID once approved. Required registration can still use an overwritten sender ID after approval. Omitted if the policy or sender is no longer available.\n"},"program":{"readOnly":true,"description":"The registration program behind this row. Null for a country that required none, which is the state a row records rather than a program called \"none\".\n","oneOf":[{"$ref":"#/components/schemas/SMSRegistrationProgram"},{"type":"null"}]},"category":{"type":["string","null"],"minLength":1,"readOnly":true,"x-extensible-enum":["transactional","marketing","authentication","service"],"description":"Message category this registration is approved for. Null means the registration is unrestricted and admits any category.\n"},"status":{"allOf":[{"$ref":"#/components/schemas/SMSRegistrationStatus"}],"readOnly":true},"program_ref":{"type":["string","null"],"minLength":1,"readOnly":true,"description":"The program artifact that decided this registration, null where none produced it. Which resource it names follows from `program`, and its id prefix tells you too: a toll-free verification for `tfn`, or a campaign number link for `10dlc`. The link connects this number to its campaign. Get the campaign from [Get a 10DLC campaign number link](/docs/api/reference/get-tcr-campaign-number-link). Worth following when the status is `under_review`, because that value covers both the carrier still reviewing and the carrier waiting on more information from you, and only the program's own resource tells those apart.\n"},"rejection_reason":{"type":["string","null"],"minLength":1,"readOnly":true,"description":"Reason the registration was rejected, shown when the status is `rejected`. Null for registrations that were never rejected.\n"},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true},"updated_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true}}},"LookupProperty":{"type":"string","minLength":1,"enum":["classification","porting","presence","roaming","sim_swap","score"],"description":"An intelligence property you can add to a base phone number lookup.\n\n- `classification`: the property resolves `line_type` to its precise\n  allocated service (premium rate, satellite, machine-to-machine,\n  payphone) where the base lookup only distinguishes broad categories.\n- `porting`: the property returns when the number last moved network and\n  its full porting record.\n- `presence`: the property reports whether the number is currently live\n  on the network.\n- `roaming`: the property reports whether it is roaming and on which\n  network.\n- `sim_swap`: the property returns when its SIM last changed.\n- `score`: the property returns a credibility score from 0 to 100.\n\nEach property you request is billed separately, and only when it is\ndelivered.\n","example":"classification"},"PhoneNumberLookupRequest":{"type":"object","additionalProperties":false,"required":["phone_number"],"properties":{"phone_number":{"type":"string","minLength":1,"description":"The phone number to look up, in international format: the country calling code, then the national number. The leading `+` is optional, and `00` works in its place, so `+31612345678`, `31612345678` and `0031612345678` are all the same number. A number written for dialling inside one country, with no country code, is rejected rather than guessed at."},"type":{"type":"array","description":"Properties to add to the base lookup. Omit this field or send an empty\narray to request only the base lookup.\n\nEach delivered property is billed in addition to the base lookup. A\nproperty that could not be answered is returned with its status and is\nnot billed.\n","items":{"$ref":"#/components/schemas/LookupProperty"}}},"example":{"phone_number":"+31612345678","type":["classification","presence"]}},"LookupNetworkInfo":{"type":"object","additionalProperties":false,"description":"The network a number belongs to.","properties":{"carrier_name":{"type":["string","null"],"readOnly":true,"description":"The carrier's name, absent when the carrier could not be identified."},"mcc":{"type":["string","null"],"readOnly":true,"description":"The mobile country code, absent for a network that has none or could not be identified."},"mnc":{"type":["string","null"],"readOnly":true,"description":"The mobile network code, absent for a network that has none or could not be identified."}},"example":{"carrier_name":"KPN","mcc":"204","mnc":"08"}},"LookupFlag":{"type":"string","minLength":1,"x-extensible-enum":["ported"],"description":"A notable characteristic of a number. `ported` means the number has moved\nfrom the network that issued it to another one, so `network_info` and\n`original_network_info` name different carriers.\n\nOpen enum: more flags may be added over time, so treat an unrecognized value\nas a future flag rather than an error.\n","example":"ported"},"LookupLineType":{"type":"string","minLength":1,"enum":["mobile","fixed_line","voip","toll_free","premium_rate","satellite","pager","payphone","m2m","service","other","unknown"],"description":"What kind of line the number is, as reported by the carrier platform.\n\nThis is included in every base lookup, regardless of which properties you\nrequest.\n\n- `unknown`: the carrier platform holds no classification for the\n  range.\n- `other`: it holds a classification with no equivalent here.\n- `m2m`: a range reserved for machine-to-machine traffic, belonging to no\n  individual subscriber.\n\nFor the allocated service of the range at finer precision, request the\n`classification` property. That answers from a different source, with its own\nwider vocabulary, and is reported separately so you can always tell the two\napart.\n","example":"mobile"},"LookupPropertyStatus":{"type":"string","minLength":1,"x-extensible-enum":["ok","unavailable","inconclusive"],"description":"How a requested property resolved.\n\n- `ok`: the property was answered and its value is in the response.\n- `unavailable`: no answer arrived, so the property adds nothing: its\n  block is `null`, or for `classification`, `line_type` retains the value\n  from the base lookup. The property is not billed.\n- `inconclusive`: an answer arrived but does not resolve the\n  property, either because the number is outside the coverage of the data\n  behind it or because the source returned a value this property does not\n  report. It is a real answer rather than a missing one, and it is not\n  billed either.\n\nOpen enum: further statuses may be added over time, so treat an unrecognized\nvalue as a future one rather than an error. Only `ok` carries a value and only\n`ok` is billed, so branching on `ok` and treating everything else as \"not\nanswered\" stays correct however the vocabulary grows.\n","example":"ok"},"LookupClassificationValue":{"type":"string","minLength":1,"enum":["mobile","fixed_line","fixed_line_or_mobile","voip","toll_free","premium_rate","shared_cost","local_rate","national_rate","personal_number","universal_access","satellite","pager","payphone","m2m","isp","vpn","voice_mail","calling_cards","short_codes","service","other"],"description":"The allocated service of the number's range, at the precision the\nintelligence source publishes it.\n\nThis is a finer vocabulary than `line_type`, which reports what the carrier\nplatform alone can tell. Some values have no carrier equivalent. For example,\na number the carrier calls `service` may be classified as `premium_rate`,\n`shared_cost`, `universal_access`, or a voicemail platform. Where the fields\noverlap, they remain independent results rather than one refining the other.\n\nThree values in particular have no carrier-side concept at all:\n\n- `m2m` is a range reserved for machine-to-machine traffic, belonging to no\n  individual subscriber.\n- `national_rate` is a non-geographic landline number charged above the\n  local rate.\n- `fixed_line_or_mobile` is a range a country allocates so a number can port\n  between the two.\n","example":"premium_rate"},"LookupClassification":{"type":"object","additionalProperties":false,"description":"The allocated service of the number's range. Returned when you request the\n`classification` property.\n\nThis sits beside `line_type` rather than replacing it, so you can always see\nwhich source answered. The `line_type` property is included in the base lookup\nand comes from the carrier platform. The `classification` property is\nseparately billed and comes from an intelligence source.\n","required":["status"],"properties":{"status":{"allOf":[{"$ref":"#/components/schemas/LookupPropertyStatus"}],"readOnly":true},"value":{"allOf":[{"$ref":"#/components/schemas/LookupClassificationValue"}],"readOnly":true,"description":"The allocated service of the range. Present only when `status` is `ok`."}},"example":{"status":"ok","value":"premium_rate"}},"LookupPresence":{"type":"object","additionalProperties":false,"description":"Whether the number is live on its network right now. Returned when you\nrequest the `presence` property.\n\nThe result reflects a real-time query to the network where the number is\nregistered.\n","required":["status"],"properties":{"status":{"allOf":[{"$ref":"#/components/schemas/LookupPropertyStatus"}],"readOnly":true},"reachable":{"type":"boolean","readOnly":true,"description":"Whether the number is registered on a network and able to receive traffic. A `false` value means the network answered and reported the number as currently unreachable. This differs from the API being unable to find out. Present only when `status` is `ok`.\n"}},"example":{"status":"ok","reachable":true}},"LookupRoaming":{"type":"object","additionalProperties":false,"description":"Whether the number is roaming, and on which network. Returned when you request the `roaming` property.","required":["status"],"properties":{"status":{"allOf":[{"$ref":"#/components/schemas/LookupPropertyStatus"}],"readOnly":true},"is_roaming":{"type":"boolean","readOnly":true,"description":"Whether the number is currently roaming outside its home network. Present only when `status` is `ok`."},"mcc":{"type":["string","null"],"readOnly":true,"description":"The mobile country code of the visited network. Absent when the number is not roaming or the visited network is not reported."},"mnc":{"type":["string","null"],"readOnly":true,"description":"The mobile network code of the visited network. Absent when the number is not roaming or the visited network is not reported."}},"example":{"status":"ok","is_roaming":true,"mcc":"262","mnc":"01"}},"LookupSimSwap":{"type":"object","additionalProperties":false,"description":"When the number's SIM last changed. Returned when you request the `sim_swap` property.","required":["status"],"properties":{"status":{"allOf":[{"$ref":"#/components/schemas/LookupPropertyStatus"}],"readOnly":true},"last_swapped_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the SIM was last changed. Absent when only a recency band is known."},"min_days":{"type":["integer","null"],"readOnly":true,"description":"The lower bound, in days, of how long ago the SIM was last changed. Networks that do not release an exact date report a band instead; absent when no lower bound is known."},"max_days":{"type":["integer","null"],"readOnly":true,"description":"The upper bound, in days, of how long ago the SIM was last changed. Absent when no upper bound is known; with a lower bound present, that means the change was at least `min_days` ago."}},"example":{"status":"ok","last_swapped_at":"2026-07-02T09:14:00Z","min_days":0,"max_days":7}},"LookupPortingEvent":{"type":"object","additionalProperties":false,"description":"One recorded move of a number between networks.","required":["occurred_at","action"],"properties":{"occurred_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the move was recorded, `null` when the record carries no date."},"action":{"type":["string","null"],"readOnly":true,"description":"What the record describes, as the number's registry reports it. Registries use their own short codes rather than a shared vocabulary, so treat this as a label to display rather than a value to branch on."}},"example":{"occurred_at":"2023-02-08T00:00:00Z","action":"A"}},"LookupPorting":{"type":"object","additionalProperties":false,"description":"Whether the number has ever moved network, when it last did, and its full porting record. Returned when you request the `porting` property. The base lookup only reports whether the number has ever ported, through the `ported` flag.\n","required":["status"],"properties":{"status":{"allOf":[{"$ref":"#/components/schemas/LookupPropertyStatus"}],"readOnly":true},"ported":{"type":"boolean","readOnly":true,"description":"Whether the number has ever moved network. `false` is a positive finding rather than a lack of one: the registry was consulted and holds no move for this number. Present only when `status` is `ok`.\n"},"last_ported_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the number last moved network. Absent when it has never ported or when no date is on record."},"last_ported_at_is_approximate":{"type":"boolean","readOnly":true,"description":"Whether `last_ported_at` is an approximation. Some registries record the period of a move without its exact day."},"history":{"type":"array","readOnly":true,"description":"Every move on record, oldest first. Absent when the number has never ported or when its registry publishes no history.","items":{"$ref":"#/components/schemas/LookupPortingEvent"}}},"example":{"status":"ok","ported":true,"last_ported_at":"2023-02-08T00:00:00Z","last_ported_at_is_approximate":false,"history":[{"occurred_at":"2023-02-08T00:00:00Z","action":"A"}]}},"LookupScore":{"type":"object","additionalProperties":false,"description":"A credibility score for the number. Returned when you request the `score` property.","required":["status"],"properties":{"status":{"allOf":[{"$ref":"#/components/schemas/LookupPropertyStatus"}],"readOnly":true},"value":{"type":"integer","minimum":0,"maximum":100,"readOnly":true,"description":"Credibility from 0 (low) to 100 (high). A low score means the number looks less credible than a typical subscriber line in the same range. Treat it as one signal instead of a verdict. It is a composite and is not derivable from the other properties. Present only when `status` is `ok`.\n"}},"example":{"status":"ok","value":84}},"PhoneNumberLookup":{"type":"object","additionalProperties":false,"description":"Information about a phone number.\n\nThe number, its flags, and its line type are included in the base lookup and\nare always present. The country and two networks are present when identified.\nEach property you request through `type` is returned in a block with the same\nname and its own `status`. A property you did not request is absent. A\nproperty that could not be answered is present with only its `status`. Each\nrequested property is billed only when its status is `ok`.\n\nFields with no value are omitted rather than returned as `null`.\n","required":["phone_number","flags","line_type"],"properties":{"phone_number":{"type":"string","minLength":1,"readOnly":true,"description":"The number that was looked up, in E.164 format."},"country_code":{"readOnly":true,"description":"The ISO 3166-1 alpha-2 country of the number. Absent when the number belongs to no single country, as a non-geographic range does.","oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]},"network_info":{"readOnly":true,"oneOf":[{"$ref":"#/components/schemas/LookupNetworkInfo"},{"type":"null"}],"description":"The network that serves the number today. Absent when no network could be identified."},"original_network_info":{"readOnly":true,"oneOf":[{"$ref":"#/components/schemas/LookupNetworkInfo"},{"type":"null"}],"description":"The network that issued the number's range. It differs from `network_info` when the number has been ported. Absent when the issuing network could not be identified."},"flags":{"type":"array","readOnly":true,"description":"Notable characteristics of the number. Empty when none apply.","items":{"$ref":"#/components/schemas/LookupFlag"}},"line_type":{"allOf":[{"$ref":"#/components/schemas/LookupLineType"}],"readOnly":true},"classification":{"allOf":[{"$ref":"#/components/schemas/LookupClassification"}],"readOnly":true,"description":"The allocated service of the number's range. Absent unless you requested the `classification` property."},"presence":{"allOf":[{"$ref":"#/components/schemas/LookupPresence"}],"readOnly":true,"description":"Whether the number is live on its network. Absent unless you requested the `presence` property."},"roaming":{"allOf":[{"$ref":"#/components/schemas/LookupRoaming"}],"readOnly":true,"description":"Whether the number is roaming. Absent unless you requested the `roaming` property."},"sim_swap":{"allOf":[{"$ref":"#/components/schemas/LookupSimSwap"}],"readOnly":true,"description":"When the number's SIM last changed. Absent unless you requested the `sim_swap` property."},"porting":{"allOf":[{"$ref":"#/components/schemas/LookupPorting"}],"readOnly":true,"description":"The number's porting record. Absent unless you requested the `porting` property."},"score":{"allOf":[{"$ref":"#/components/schemas/LookupScore"}],"readOnly":true,"description":"The number's credibility score. Absent unless you requested the `score` property."}},"example":{"phone_number":"+441904123456","country_code":"GB","network_info":{"carrier_name":"BT","mcc":"234","mnc":"00"},"original_network_info":null,"flags":[],"line_type":"service","classification":{"status":"ok","value":"premium_rate"},"score":{"status":"ok","value":48},"presence":{"status":"ok","reachable":true},"roaming":{"status":"unavailable"}}},"EmailLookupRequest":{"type":"object","additionalProperties":false,"required":["email"],"properties":{"email":{"type":"string","minLength":3,"maxLength":254,"description":"The email address to look up. Send it exactly as you hold it. The part before the `@` is case-sensitive, so the API does not lowercase it. A display-name form such as `Aisha <aisha@example.com>` is rejected rather than unwrapped.\n"}},"example":{"email":"aisha.khan@example.com"}},"EmailLookupResult":{"type":"string","minLength":1,"x-extensible-enum":["valid","neutral","risky","undeliverable","typo"],"description":"The verdict on the address, and the one field to decide on.\n\n- `valid`: the address exists and accepts mail.\n- `neutral`: it could not be confirmed either way, usually because the\n  receiving domain answers every recipient the same.\n- `risky`: it probably accepts mail but is likelier than most to\n  bounce or complain. Examples include role, disposable, and low-reputation\n  addresses.\n- `undeliverable`: it does not accept mail, and `reason` says why.\n- `typo`: the address looks misspelled, and `did_you_mean` contains\n  the correction.\n\nOpen enum: further verdicts may be added over time, so treat an unrecognized\nvalue as a future one rather than an error. Branch on the values you know and\nfall back on `delivery_confidence`, which is always present and always\ncomparable.\n","example":"risky"},"EmailLookupFlag":{"type":"string","minLength":1,"x-extensible-enum":["role","disposable","free_provider"],"description":"A notable characteristic of an email address.\n\n- `role`: it addresses a function rather than a person (`support@`,\n  `info@`). Replies and consent are therefore ambiguous, and complaints are\n  more likely.\n- `disposable`: it belongs to a throwaway-address provider and\n  typically stops existing.\n- `free_provider`: it belongs to a consumer mailbox provider such as\n  Gmail or Outlook.com. This is ordinary for consumer mail and a signal when\n  you expected a business address.\n\nOpen enum: more flags may be added over time, so treat an unrecognized value\nas a future flag rather than an error.\n","example":"role"},"EmailLookupReason":{"type":"string","minLength":1,"x-extensible-enum":["invalid_syntax","invalid_domain","invalid_recipient","disposable_domain"],"description":"An explanation for the assessment, when available.\n\n- `invalid_syntax`: the address is malformed.\n- `invalid_domain`: the domain does not accept mail.\n- `invalid_recipient`: the domain accepts mail but this mailbox does\n  not exist.\n\n- `disposable_domain`: the domain belongs to a disposable-address provider.\n\nOpen enum: further reasons may be added over time, so treat an unrecognized\nvalue as a future one rather than an error. `result` is what to branch on; this\nfield explains it.\n","example":"invalid_recipient"},"EmailLookup":{"type":"object","additionalProperties":false,"description":"Assessment of whether an email address accepts mail, the confidence and reason for that\nassessment, and a suggested correction when the address appears misspelled.\n\n`result` is the field to decide on; `delivery_confidence` grades it, and\n`flags` describes the address itself rather than its deliverability, so a\nperfectly valid address can still have `role` or `disposable`.\n\nFields without resolved values are omitted rather than sent as null. Every\nfield present in the response was resolved.\n","required":["email","valid","result","delivery_confidence","flags"],"properties":{"email":{"type":"string","minLength":3,"maxLength":254,"readOnly":true,"description":"The address that was looked up, exactly as you sent it."},"valid":{"type":"boolean","readOnly":true,"description":"The provider's validity assessment for the address. Read it with `result` and `delivery_confidence` when deciding whether to send; it does not guarantee delivery."},"result":{"allOf":[{"$ref":"#/components/schemas/EmailLookupResult"}],"readOnly":true},"delivery_confidence":{"type":"integer","minimum":0,"maximum":100,"readOnly":true,"description":"How likely mail to this address is to be delivered, from 0 (certain not to be) to 100 (certain to be). Read it alongside `result` rather than instead of it, because the same score can sit under `neutral` or `risky` for different reasons."},"flags":{"type":"array","readOnly":true,"description":"Notable characteristics of the address. Empty when none apply.","items":{"$ref":"#/components/schemas/EmailLookupFlag"}},"reason":{"allOf":[{"$ref":"#/components/schemas/EmailLookupReason"}],"readOnly":true,"description":"An explanation for the assessment. Can accompany an undeliverable, risky, or typo result; omitted when no recognized reason is available."},"did_you_mean":{"type":"string","minLength":3,"maxLength":254,"readOnly":true,"description":"The address this one looks like a misspelling of. Absent unless a correction was found, which in practice means `result` is `typo`. Offer it to whoever typed the original rather than sending to it unasked, because it is a guess and the address they meant may be neither one."}},"example":{"email":"aisha.khan@example.com","valid":true,"result":"risky","delivery_confidence":42,"flags":["role","free_provider"]}},"EmailLookupBatchRequest":{"type":"object","additionalProperties":false,"required":["emails"],"properties":{"emails":{"type":"array","minItems":1,"maxItems":1000,"description":"Addresses to assess in submission order. Surrounding whitespace is trimmed and case is preserved. Malformed addresses receive individual assessments. Duplicates are assessed and billed at each position. The request must also fit within the 128 KiB request-body limit.","items":{"type":"string","minLength":0,"maxLength":254}}},"example":{"emails":["aisha.khan@example.com","not-an-email"]}},"EmailLookupBatchItem":{"type":"object","additionalProperties":false,"description":"Assessment of whether an email address accepts mail, the confidence and reason for that\nassessment, and a suggested correction when the address appears misspelled.\n\n`result` is the field to decide on; `delivery_confidence` grades it, and\n`flags` describes the address itself rather than its deliverability, so a\nperfectly valid address can still have `role` or `disposable`.\n\nFields without resolved values are omitted rather than sent as null. Every\nfield present in the response was resolved.\n","required":["email","valid","result","delivery_confidence","flags"],"properties":{"email":{"type":"string","minLength":0,"maxLength":254,"readOnly":true,"description":"The submitted value after trimming surrounding whitespace. May be empty or malformed."},"valid":{"type":"boolean","readOnly":true,"description":"The provider's validity assessment for the address. Read it with `result` and `delivery_confidence` when deciding whether to send; it does not guarantee delivery."},"result":{"allOf":[{"$ref":"#/components/schemas/EmailLookupResult"}],"readOnly":true},"delivery_confidence":{"type":"integer","minimum":0,"maximum":100,"readOnly":true,"description":"How likely mail to this address is to be delivered, from 0 (certain not to be) to 100 (certain to be). Read it alongside `result` rather than instead of it, because the same score can sit under `neutral` or `risky` for different reasons."},"flags":{"type":"array","readOnly":true,"description":"Notable characteristics of the address. Empty when none apply.","items":{"$ref":"#/components/schemas/EmailLookupFlag"}},"reason":{"allOf":[{"$ref":"#/components/schemas/EmailLookupReason"}],"readOnly":true,"description":"An explanation for the assessment. Can accompany an undeliverable, risky, or typo result; omitted when no recognized reason is available."},"did_you_mean":{"type":"string","minLength":3,"maxLength":254,"readOnly":true,"description":"The address this one looks like a misspelling of. Absent unless a correction was found, which in practice means `result` is `typo`. Offer it to whoever typed the original rather than sending to it unasked, because it is a guess and the address they meant may be neither one."}},"example":{"email":"aisha.khan@example.com","valid":true,"result":"risky","delivery_confidence":42,"flags":["role","free_provider"]}},"EmailLookupBatchResponse":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","minItems":1,"maxItems":1000,"readOnly":true,"description":"One assessment per submitted address, in submission order, including duplicates.","items":{"$ref":"#/components/schemas/EmailLookupBatchItem"}}}},"VerificationID":{"type":"string","minLength":1,"pattern":"^vrf_[0-9a-hjkmnp-tv-z]{26}$","example":"vrf_01krdgeqcxet5s7t44vh8rt9mg"},"VerificationTo":{"type":"object","additionalProperties":false,"minProperties":1,"description":"The recipient to verify. Provide an `email`, a `phone_number`, or both; at least one is required. The addresses also identify the verification: a check must supply exactly the set used on the create call, so a verification created with both addresses is not found by either one alone.\n","properties":{"email":{"type":"string","minLength":1,"format":"email","description":"The recipient's email address. Case does not matter; the address is lowercased before use.","example":"user@example.com"},"phone_number":{"type":"string","minLength":1,"description":"The recipient's phone number in E.164 format, with the leading `+` and country code (for example `+15551234567`). A number in any other format is rejected as an invalid recipient (`422`).","example":"+15551234567"}}},"VerificationChannelEntry":{"type":"object","additionalProperties":false,"required":["channel"],"properties":{"channel":{"$ref":"#/components/schemas/VerificationChannel"}}},"WhatsAppTemplateCategory":{"type":"string","minLength":1,"x-extensible-enum":["authentication","utility","marketing"],"description":"Meta's content classification for a template.\n\n- `authentication`: delivers one-time passcodes.\n- `utility`: delivers transaction-triggered updates (receipts, order status).\n- `marketing`: carries promotional content.\n\nThe category determines the sender number and price. This is an open enum.\nAccept unrecognized values.\n"},"Verification":{"example":{"id":"vrf_01krdgeqcxet5s7t44vh8rt9mg","status":"pending","reason":null,"to":{"email":"user@example.com"},"channels":[{"channel":"email"}],"last_channel":"email","expires_at":"2026-05-20T09:24:52Z","created_at":"2026-05-20T09:14:52Z","updated_at":"2026-05-20T09:14:52Z"},"allOf":[{"type":"object","required":["id","status","to","channels","expires_at","created_at","updated_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/VerificationID"},"status":{"type":"string","minLength":1,"enum":["pending","verified","failed","expired","canceled","blocked"],"readOnly":true,"description":"The verification's current state:\n\n- `pending`: Awaiting a correct passcode.\n- `verified`: A correct passcode was submitted.\n- `failed`: The verification cannot be completed. Either too many\n  incorrect passcodes were submitted, or no planned channel could\n  deliver one. Read `reason` to tell those apart.\n- `expired`: The validity window elapsed before a correct passcode.\n- `canceled`: The verification was canceled before completion.\n- `blocked`: A fraud or abuse control stopped the verification."},"reason":{"readOnly":true,"oneOf":[{"$ref":"#/components/schemas/VerificationTerminalReason"},{"type":"null"}],"description":"Why the verification reached its final state, or `null` while `pending` and once `verified`. See the enum for the values it can take."},"to":{"readOnly":true,"$ref":"#/components/schemas/VerificationTo"},"channels":{"type":"array","readOnly":true,"minItems":1,"description":"The channels this verification uses to deliver the passcode, in attempt order: the first entry is tried first and later entries are fallbacks. An email recipient is verified over email; a phone recipient is verified over the phone channels enabled for its destination country, in the order that country's configuration sets.","items":{"$ref":"#/components/schemas/VerificationChannelEntry"}},"last_channel":{"type":["string","null"],"x-extensible-enum":["email","sms","whatsapp","telegram","voice"],"readOnly":true,"description":"The channel the most recent passcode was sent on, or `null` before the first send. Open enum; new channels may be added over time, so treat any unrecognized value as a future channel rather than an error."},"metadata":{"type":"object","additionalProperties":true,"readOnly":true,"description":"The key/value pairs attached when the verification was created."},"expires_at":{"type":"string","minLength":1,"format":"date-time","readOnly":true,"description":"When the verification expires if no correct passcode is submitted first. After this time its status reports `expired`."},"verified_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the verification was completed, or `null` if it is not yet verified."}}},{"$ref":"#/components/schemas/Timestamps"}]},"VerificationCheckResult":{"type":"object","additionalProperties":false,"required":["success","verification"],"properties":{"success":{"type":"boolean","readOnly":true,"example":false,"description":"Whether the submitted passcode verified this verification. `true` means the passcode was correct and the verification is now complete; `false` means it did not verify, and `reason` says why. A verification that has already reached a final state is no longer checkable and returns `404`."},"reason":{"type":["string","null"],"x-extensible-enum":["incorrect_code","expired","attempts_exhausted"],"readOnly":true,"description":"Why the check did not succeed:\n\n- `incorrect_code`: The passcode was wrong and attempts remain.\n- `expired`: The validity window elapsed.\n- `attempts_exhausted`: Too many incorrect attempts were submitted.\n\n`null` when `success` is `true`. Treat unrecognized values as reasons added\nlater."},"verification":{"$ref":"#/components/schemas/Verification"},"attempts_remaining":{"type":["integer","null"],"minimum":0,"readOnly":true,"example":2,"description":"The number of check attempts left while the verification is still pending, or `null` once it has reached a final state."}}},"VerificationOptions":{"type":"object","additionalProperties":false,"description":"Per-request overrides applied to this verification only. `language` picks one of Bird's built-in translations; a custom sender that carries its own template renders the language that template stocks instead. An email template pinned to a custom email sender falls back to its own default language rather than to English (Verify only accepts templates whose language settings fall back). A WhatsApp authentication template follows its own missing-language policy: it falls back to its default or, when set to fail, refuses the send for a language it does not stock. The requested tag stays fixed for the verification.","properties":{"code_length":{"type":"integer","minimum":4,"maximum":8,"description":"Passcode length for this verification. Omit to use the configured length."},"channels":{"type":"array","description":"Reorder or narrow the delivery channels for this request. List channel names in the order to try them; a channel you omit is not used for this request, and a channel not already enabled for the recipient is ignored. A list that leaves no usable channel fails the request with `422`. Omit the field to use the configured order.","items":{"$ref":"#/components/schemas/VerificationChannel"}},"language":{"$ref":"#/components/schemas/LanguageTag","description":"Which of the built-in message translations to send. It applies to SMS, email and WhatsApp, and has no effect on a Telegram verification. A tag with no translation of its own falls back to its base language, and then to English. The attempt's `template_language` reports which translation was used. The tag is fixed for the verification, so a resend arrives in the same language as the first message.\n\nOmit it and the language is read from the recipient phone number's country, so a French number gets French without you asking. Set it to override that. A verification with no phone number, and one whose country has no translation here, sends English.\n\nSupported: en, ar, bg, cs, da, de, el, es, fi, fr, he, hi, hr, hu, id, it, ja, ko, lt, lv, mk, mn, ms, nb-NO, nl, no, pl, pt, ro, ru, sk, sl, sr, sv, th, tr, uk, vi, zh, zh-TW. Every one of them is available on SMS and on Bird's built-in email. Mongolian (mn) is the one WhatsApp cannot carry, so a WhatsApp passcode falls back to English for it.\n\nA custom sender that carries its own template sends that template's content instead: a custom WhatsApp sender uses its authentication template's approved languages under that template's missing-language policy, and a custom email sender pinned to one of your email templates uses the template's published languages, falling back to the template's default language rather than to English. The requested tag stays fixed for the verification; the dashboard's verification detail shows the language each attempt actually rendered.\n"},"autofill_origin":{"type":"string","description":"The website this verification's passcodes are entered on, such as `https://login.example.com`, replacing the configured origin for this verification only. Write it as `https://` and a lowercase host, with no port, path or trailing slash; an internationalized host uses its `xn--` form. Any other form is rejected with `422`, naming the form to send when there is one. Each SMS passcode then ends with a line such as `@login.example.com #123456`, which browsers read to offer the code on that site and which can add an SMS segment in languages that need Unicode encoding. Each email passcode carries an `OTP-Token` header with the code and this website, unless `autofill_top_level_origin` is set. An `android_app_hash` replaces the SMS line. A retry of a verification still in progress keeps the origin it started with."},"autofill_top_level_origin":{"type":"string","description":"For a passcode entered in a cross-origin frame, such as a payment form embedded in a shop's checkout, the website of the top-level page in the browser tab. `autofill_origin` then names the frame. The SMS line names both sites, as in `@shop.example #123456 @pay.example`, and email passcodes carry no `OTP-Token` header, which can name only one site. It uses the same format as `autofill_origin`. The request is rejected with `422` when the value is not in that format, when no `autofill_origin` is set in the request or the configuration, or when it equals that origin. Autofill works only when this page embeds the frame directly."},"android_app_hash":{"type":"string","description":"The Android app that reads this verification's SMS passcodes through Google's SMS Retriever API, replacing the configured hash for this verification only. Send the 11-character app hash computed from the app's package name and signing certificate, such as `FA+9qCX9VSu`; any other form is rejected with `422`. Each SMS passcode is then a short message ending with the hash on its own line, within the API's 140-byte limit, and names no website. Email passcodes don't change: they carry the `OTP-Token` header exactly as they would without a hash. A retry of a verification still in progress keeps the hash it started with."}}},"VerificationCreateRequest":{"type":"object","additionalProperties":false,"required":["to"],"properties":{"to":{"$ref":"#/components/schemas/VerificationTo"},"options":{"$ref":"#/components/schemas/VerificationOptions"},"metadata":{"type":"object","additionalProperties":true,"description":"Optional key/value pairs to attach to the verification, for example a correlation id. Returned on the verification and copied onto the SMS, WhatsApp or email message that carries the code, so reads of that message and its webhooks return it too. The copy is skipped when the object is larger than 2 KB serialized."}},"example":{"to":{"phone_number":"+15551234567"},"metadata":{"correlation_id":"signup-7f3a"}}},"VerificationCheckRequest":{"type":"object","additionalProperties":false,"required":["to","code"],"properties":{"to":{"$ref":"#/components/schemas/VerificationTo"},"code":{"type":"string","minLength":4,"maxLength":12,"description":"The passcode the recipient received. Passcodes are numeric; submit the digits exactly as delivered. An incorrect value is a normal `200` outcome with `success: false`. It does not return an error.","example":"123456"}},"example":{"to":{"phone_number":"+15551234567"},"code":"123456"}},"VerificationNextChannelRequest":{"type":"object","additionalProperties":false,"required":["to"],"properties":{"to":{"$ref":"#/components/schemas/VerificationTo"}},"example":{"to":{"phone_number":"+15551234567"}}},"DomainID":{"type":"string","minLength":1,"pattern":"^dom_[0-9a-hjkmnp-tv-z]{26}$","example":"dom_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppMessageID":{"type":"string","minLength":1,"pattern":"^wam_[0-9a-hjkmnp-tv-z]{26}$","example":"wam_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppTemplateParameterType":{"type":"string","minLength":1,"x-extensible-enum":["text","image","video","gif","document","location"],"description":"The kind of value a template parameter carries, which follows the block it fills. The `text` type is a plain string substituted into a placeholder. This includes a coupon button's code, which the recipient copies from the button. The `image`, `video`, `gif`, and `document` types carry a media header's file in `url`. Each matches its header's `format`. The `location` type fills a location header and carries a point on the map. Open enum: more kinds may be added over time.\n"},"WhatsAppTemplateExampleParameter":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateParameterType"}],"readOnly":true,"description":"The kind of value this parameter accepts."},"text":{"type":"string","minLength":1,"readOnly":true,"description":"An example value for a text parameter. Present when `type` is `text`.","example":"123456"},"url":{"type":"string","format":"uri","readOnly":true,"description":"The address of the file a media header shows, as it was given when the header was authored rather than WhatsApp's copy of it. Present when `type` is `image`, `video`, `gif` or `document`.\n","example":"https://www.example.com/holiday/banner.jpg"},"name":{"type":"string","minLength":1,"readOnly":true,"description":"The named placeholder this example fills. Present whenever the template declares named parameters, which is what a send must name; absent only for a positional template, whose values go in `{{n}}` order.\n","example":"first_name"}}},"WhatsAppTemplateButton":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"type":"string","minLength":1,"readOnly":true,"x-extensible-enum":["url","quick_reply","phone_number","otp","copy_code","request_contact_info"],"description":"The button's behavior.\n\n- `url`: opens a link.\n- `quick_reply`: sends its own label back to you as an inbound message.\n- `phone_number`: dials the number it carries.\n- `otp`: copies a one-time passcode. It belongs only on an authentication\n  template, and that template takes no other button type.\n- `copy_code`: copies a coupon code to the recipient's clipboard. It\n  belongs only on a marketing template, which takes at most one.\n- `request_contact_info`: asks the recipient to share the phone number\n  their WhatsApp account carries. It belongs only on a utility or\n  marketing template, as that template's only button.\n\nThis is an open enum. Accept unrecognized values.\n","example":"url"},"otp_type":{"type":"string","minLength":1,"readOnly":true,"x-extensible-enum":["copy_code"],"description":"How the recipient receives the one-time passcode. Present on authentication-template OTP buttons.","example":"copy_code"},"text":{"type":"string","minLength":1,"readOnly":true,"description":"The button's label. Absent on an authentication template's passcode button until the language has been submitted, since WhatsApp writes that label itself. Absent on a `request_contact_info` draft for a related reason: WhatsApp fixes that label, so a draft that carried it reads back without it. Once the language is submitted, this carries the label WhatsApp wrote, which is `Share Contact Info` in every language today.\n","example":"Copy code"},"url":{"type":"string","minLength":1,"readOnly":true,"description":"The address the button opens, with any variable placeholder shown inline. Present on link buttons.","example":"https://www.example.com/orders/{{1}}"},"phone_number":{"type":"string","minLength":1,"readOnly":true,"description":"The number the button dials. Present on dial buttons.","example":"+14155550100"},"example_parameters":{"type":"array","readOnly":true,"description":"Example values for this button's variables, in placeholder order. Present when the button address has variables, and on a `copy_code` button, where the single value is the sample coupon code WhatsApp reviewed.\n","items":{"$ref":"#/components/schemas/WhatsAppTemplateExampleParameter"}}}},"WhatsAppTemplateCardComponent":{"type":"object","additionalProperties":false,"required":["type"],"description":"One content block inside a carousel card.","properties":{"type":{"type":"string","minLength":1,"readOnly":true,"x-extensible-enum":["header","body","buttons"],"description":"The card block's type.","example":"header"},"format":{"type":"string","minLength":1,"readOnly":true,"x-extensible-enum":["image","video"],"description":"The card header's content type. Present on a card's header block.","example":"image"},"text":{"type":"string","minLength":1,"readOnly":true,"description":"The block's text content, with any variable placeholders shown inline.","example":"Chronograph, brown leather"},"example_parameters":{"type":"array","readOnly":true,"description":"Example values for this block's variables, in placeholder order.","items":{"$ref":"#/components/schemas/WhatsAppTemplateExampleParameter"}},"buttons":{"type":"array","readOnly":true,"description":"The buttons this card carries. Present on a card's buttons block.","items":{"$ref":"#/components/schemas/WhatsAppTemplateButton"}}}},"WhatsAppTemplateCard":{"type":"object","additionalProperties":false,"required":["components"],"description":"One card in a carousel.","properties":{"components":{"type":"array","readOnly":true,"description":"This card's content blocks, in display order.","items":{"$ref":"#/components/schemas/WhatsAppTemplateCardComponent"}}}},"WhatsAppTemplateComponent":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"type":"string","minLength":1,"readOnly":true,"x-extensible-enum":["header","body","footer","buttons","carousel"],"description":"The content block's type within the template.","example":"body"},"format":{"type":"string","minLength":1,"readOnly":true,"x-extensible-enum":["text","image","video","gif","document","location"],"description":"The header block's content type. Present on a header block. A `text` header carries a line of copy. The `image`, `video`, `gif`, and `document` formats each show a file whose address is in the block's `example_parameters`. The `location` format shows a map. It carries no content because the coordinates belong to the message rather than the template.\n","example":"text"},"text":{"type":"string","minLength":1,"readOnly":true,"description":"The block's text content, with any variable placeholders shown inline. Present when the block carries text. An authentication template's body and footer are written by WhatsApp from the two settings below rather than by you, so their text is absent until the language has been submitted and WhatsApp has supplied it.\n","example":"Your verification code is {{1}}."},"add_security_recommendation":{"type":"boolean","readOnly":true,"description":"Whether this authentication template's body ends with WhatsApp's advice not to share the code. Present on an authentication template's body block.\n"},"code_expiration_minutes":{"type":"integer","readOnly":true,"description":"How long the passcode stays valid, which WhatsApp states in this footer. Present on an authentication template's footer block. Omitting it on a write leaves the footer off entirely.\n","example":60},"example_parameters":{"type":"array","readOnly":true,"description":"Example values for this block's variables, in placeholder order (one per `{{n}}`). Use them to see what a filled message looks like. Present when the block has variables.","items":{"$ref":"#/components/schemas/WhatsAppTemplateExampleParameter"}},"buttons":{"type":"array","readOnly":true,"description":"The buttons attached to this block. Present when the block carries buttons.","items":{"$ref":"#/components/schemas/WhatsAppTemplateButton"}},"cards":{"type":"array","readOnly":true,"description":"The cards this block scrolls through, in display order. Present on a `carousel` block.\n","items":{"$ref":"#/components/schemas/WhatsAppTemplateCard"}}}},"WhatsAppMessageStatus":{"type":"string","minLength":1,"enum":["scheduled","accepted","sent","delivered","failed","rejected","canceled","received"],"description":"Delivery status:\n\n- `accepted`: Accepted and queued for sending.\n- `sent`: Handed to the WhatsApp network.\n- `delivered`: Confirmed as delivered to the recipient's device.\n- `failed`: Permanently failed.\n- `rejected`: Refused before sending and not charged.\n- `received`: Received as an inbound message.\n- `scheduled`: Reserved and not returned.\n- `canceled`: Reserved and not returned.\n\nRead receipts appear in `read_at` and `whatsapp.read` events, in both\ndirections: the recipient opening an outbound message, and the business\nacknowledging an inbound one.\n"},"WhatsAppGroupID":{"type":"string","minLength":1,"pattern":"^wag_[0-9a-hjkmnp-tv-z]{26}$","example":"wag_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppAddress":{"type":"object","additionalProperties":false,"description":"Sender or recipient of a WhatsApp message: a phone number, a business-scoped user ID, or both. A message received from a WhatsApp user carries whatever profile they publish, which may be neither.","properties":{"phone_number":{"type":"string","minLength":1,"description":"Phone number in E.164 format, when known.","example":"+15550001111"},"bsuid":{"type":"string","minLength":1,"description":"Business-scoped user ID, Meta's identifier for the WhatsApp user. Present only on the WhatsApp-user side of the message.\n","example":"NL.xxxx"},"group_id":{"allOf":[{"$ref":"#/components/schemas/WhatsAppGroupID"}],"description":"The group this address was addressed as, or reached through. It appears on a message's `to` and nowhere else: never on `from`, and never on an event's `recipient`. Outbound, it stands in for the recipient, because a group send names no single phone number. Inbound, it qualifies one: `to` carries the business `phone_number` that received the message and the group it arrived through, while `from` stays the participant who wrote it. Its presence on `to` is what tells a group message from a one-to-one one, in either direction.\n"},"username":{"type":"string","minLength":1,"description":"Present only on a message received from a WhatsApp user, on `from`; never on an outbound send's `to`, where the profile is not known. Absent when the contact has not adopted one, and on a message received before this workspace started recording them. Same form as a number's own username (`WhatsAppNumberProfile.username`), without a leading `@`; a message cannot be addressed by it.\n"},"display_name":{"type":"string","minLength":1,"description":"Present only on a message received from a WhatsApp user, on `from`; never on an outbound send's `to`, where the profile is not known. Absent when the message carries no profile, and on a message received before this workspace started recording them.\n"}}},"WhatsAppLocationSend":{"type":"object","additionalProperties":false,"required":["latitude","longitude"],"description":"A free-form location to send: a point on the map the recipient can open in their maps app. Deliverable only inside an open 24-hour customer service window; outside one, send a template instead.\n","properties":{"latitude":{"type":"number","format":"double","minimum":-90,"maximum":90,"description":"Latitude in decimal degrees.","example":37.7955},"longitude":{"type":"number","format":"double","minimum":-180,"maximum":180,"description":"Longitude in decimal degrees.","example":-122.3937},"name":{"type":"string","maxLength":1000,"description":"Place name, shown above the address.","example":"Ferry Building"},"address":{"type":"string","maxLength":1000,"description":"Street address; shown only with `name`.","example":"1 Ferry Building, San Francisco, CA 94111"}},"example":{"latitude":37.7955,"longitude":-122.3937,"name":"Ferry Building","address":"1 Ferry Building, San Francisco, CA 94111"}},"WhatsAppMessageTemplateComponentParameter":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateParameterType"}],"description":"Value kind; determines which field to supply."},"text":{"type":"string","minLength":1,"description":"Placeholder value for a `text` parameter."},"url":{"type":"string","format":"uri","minLength":1,"description":"Public HTTPS media-header URL, fetched at send time. For `image`, `video`, `gif`, or `document` parameters.","example":"https://cdn.example.com/receipts/a1b2c3.png"},"filename":{"type":"string","minLength":1,"maxLength":100,"description":"Document name with extension; rejected on other parameter types.","example":"invoice-a1b2c3.pdf"},"location":{"allOf":[{"$ref":"#/components/schemas/WhatsAppLocationSend"}],"description":"Map point for a `location` header parameter."},"name":{"type":"string","minLength":1,"description":"Placeholder name, such as `first_name`; required on every named parameter. Omit for positional templates and supply values in `{{n}}` order."}}},"WhatsAppMessageTemplateCardComponent":{"type":"object","additionalProperties":false,"required":["type"],"description":"The values that fill one block of one carousel card.","properties":{"type":{"type":"string","minLength":1,"x-extensible-enum":["header","body","button"],"description":"Which part of the card this fills in.\n\n- `header`: the card's image or video.\n- `body`: its text.\n- `button`: a button's variable.\n","example":"header"},"parameters":{"type":"array","description":"The values that fill this part's placeholders, in placeholder order.","items":{"$ref":"#/components/schemas/WhatsAppMessageTemplateComponentParameter"}}}},"WhatsAppMessageTemplateCard":{"type":"object","additionalProperties":false,"required":["components"],"description":"Placeholder values for one carousel card. Supply one entry per approved card, in approval order.","properties":{"components":{"type":"array","description":"The values that fill this card's blocks.","items":{"$ref":"#/components/schemas/WhatsAppMessageTemplateCardComponent"}}}},"WhatsAppMessageTemplateComponent":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"type":"string","minLength":1,"x-extensible-enum":["header","body","button","carousel"],"description":"Which part of the template this fills in.\n\n- `body`: the main text.\n- `button`: one button's variable, a part per button; there is no `buttons` part.\n- `header`: the header's text, media or location.\n- `carousel`: the cards.\n"},"parameters":{"type":"array","description":"Placeholder values in `{{n}}` order, or named. Required except for `carousel`, which uses `cards`. Omit button parts without variables.","items":{"$ref":"#/components/schemas/WhatsAppMessageTemplateComponentParameter"}},"cards":{"type":"array","minItems":2,"maxItems":10,"description":"For `carousel` only: one entry per approved card, in approval order.","items":{"$ref":"#/components/schemas/WhatsAppMessageTemplateCard"}}}},"WhatsAppMessageTemplate":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The template a message was sent from. On reads `slug`, `language`, `category`, and `components` are always present; `components` is an empty array for an authentication template (the filled-in values, for example a verification code, are never returned).\n","required":["slug","language","category","components"],"properties":{"slug":{"allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"readOnly":true,"description":"The template's stable handle (for example `bird_otp`).","example":"bird_otp"},"category":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateCategory"}],"readOnly":true,"description":"The category this message was priced at, recorded as it stood when the message was sent. For a template you authored this is the category Meta applies to the language the send resolved to, which can differ from the category declared on the template: Meta categorizes each language separately and may move one. A built-in `bird_` template is priced at the single category the built-in declares, the same in every language.\n"},"language":{"allOf":[{"$ref":"#/components/schemas/LanguageTag"}],"readOnly":true,"description":"The canonical BCP-47 tag of the template variant that was sent.","example":"en-US"},"bid_multiplier":{"type":"number","format":"double","readOnly":true,"description":"The `bid_multiplier` the message was sent with. Absent when the send named none, which bids at 1. Also absent on messages sent before Bird stored it.\n","example":0.8},"parameters":{"type":"object","readOnly":true,"additionalProperties":true,"description":"The `template.parameters` map the message was sent with, keeping only the keys the template language reads; keys the send ignored are dropped. `components` shows the values the template rendered from it. Absent for a `components` send, for an authentication template, and for messages sent before Bird stored it.\n","example":{"order_id":"A-4192","first_name":"Ava"}},"components":{"type":"array","readOnly":true,"description":"The values that filled the template's placeholders. Empty for an authentication template, whose content is never returned.\n","items":{"$ref":"#/components/schemas/WhatsAppMessageTemplateComponent"}}}},"WhatsAppText":{"type":"object","additionalProperties":false,"description":"Text content of a WhatsApp message.","required":["body"],"properties":{"body":{"type":"string","minLength":1,"description":"The message text.","example":"Does it come in another color?"}},"example":{"body":"Does it come in another color?"}},"WhatsAppFileID":{"type":"string","minLength":1,"pattern":"^waf_[0-9a-hjkmnp-tv-z]{26}$","example":"waf_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppMedia":{"type":"object","description":"Fields shared by every media content object on a WhatsApp message.","properties":{"id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppFileID"}],"description":"ID of the stored file, to pass as `media_id` when fetching it. Absent on a message sent through Bird, whose file we never stored.\n"},"url":{"type":"string","format":"uri","description":"Where to fetch the media. On an inbound message, or one from the WhatsApp Business app, this is a Bird URL you fetch with your API key. The file expires with the message, 30 days after it arrives, and the link returns `404` from then on. If the file is gone while the message is still readable, the link returns `410`. On a message sent through Bird it is the URL the sender supplied, whose availability is the sender's to guarantee.\n","example":"https://platform.bird.com/v1/whatsapp/messages/wam_01kya19eknftrs2s6p82asmvnh/media/waf_01kyb2m4xq7whs0d8n3prv6tez"},"mime_type":{"type":"string","description":"Media type WhatsApp reported for the file, for example `image/jpeg`. Absent on messages sent through Bird.\n","example":"image/jpeg"}}},"WhatsAppImage":{"type":"object","description":"Image content of a WhatsApp message.\n","allOf":[{"$ref":"#/components/schemas/WhatsAppMedia"},{"type":"object","properties":{"caption":{"type":"string","description":"Text shown beneath the image. Absent when the sender wrote none.","example":"Your receipt for order A1B2C3"}}}]},"WhatsAppVideo":{"type":"object","description":"Video content of a WhatsApp message.\n","allOf":[{"$ref":"#/components/schemas/WhatsAppMedia"},{"type":"object","properties":{"caption":{"type":"string","description":"Text shown beneath the video. Absent when the sender wrote none.","example":"How to set it up"}}}]},"WhatsAppAudio":{"type":"object","description":"Audio content of a WhatsApp message.\n","allOf":[{"$ref":"#/components/schemas/WhatsAppMedia"},{"type":"object","properties":{"voice":{"type":"boolean","description":"Whether this is a voice note rather than an attached audio file. A voice note auto-downloads in the WhatsApp client and can be transcribed for the recipient.\n","example":true}}}]},"WhatsAppSticker":{"type":"object","description":"Sticker content of a WhatsApp message.\n","allOf":[{"$ref":"#/components/schemas/WhatsAppMedia"},{"type":"object","properties":{"animated":{"type":"boolean","description":"Whether the sticker is animated. Absent on an outbound message.\n","example":false}}}]},"WhatsAppDocument":{"type":"object","description":"Document content of a WhatsApp message.\n","allOf":[{"$ref":"#/components/schemas/WhatsAppMedia"},{"type":"object","properties":{"caption":{"type":"string","description":"Text shown beneath the document. Absent when the sender wrote none.","example":"Signed contract"},"filename":{"type":"string","description":"The sender's own name for the file.","example":"contract-a1b2c3.pdf"}}}]},"WhatsAppLocation":{"type":"object","additionalProperties":false,"description":"Location content of a WhatsApp message: a point on the map the recipient can open in their maps app.\n","properties":{"latitude":{"type":"number","format":"double","description":"Latitude in decimal degrees.","example":52.3702},"longitude":{"type":"number","format":"double","description":"Longitude in decimal degrees.","example":4.8952},"name":{"type":"string","description":"Name of the place. Absent when the sender shared a plain pin.","example":"Bird HQ"},"address":{"type":"string","description":"Street address of the place. Shown only when `name` is also set.","example":"Keizersgracht 117, Amsterdam"},"url":{"type":"string","format":"uri","description":"Link to the place, which WhatsApp includes mainly for business locations. Present on an inbound message when the sender's client supplied one, and absent on a message you sent, since sending a location does not support this field.\n","example":"https://www.google.com/maps/place/Statue+of+Liberty/@40.6246301,-74.5291919,124716m/"}}},"WhatsAppContactName":{"type":"object","additionalProperties":false,"description":"The contact's name, in the parts their device supplied. Every part is optional: WhatsApp sends what the card holds and omits the rest.\n","properties":{"formatted_name":{"type":"string","description":"The whole name as the contact's device renders it.","example":"Barbara J. Johnson"},"first_name":{"type":"string","example":"Barbara"},"middle_name":{"type":"string","example":"Joana"},"last_name":{"type":"string","example":"Johnson"},"prefix":{"type":"string","example":"Dr."},"suffix":{"type":"string","example":"Esq."}}},"WhatsAppContactOrg":{"type":"object","additionalProperties":false,"description":"Where the contact works, as their card records it.","properties":{"company":{"type":"string","example":"Lucky Shrub"},"department":{"type":"string","example":"Engineering"},"title":{"type":"string","example":"Software Engineer"}}},"WhatsAppContactPhone":{"type":"object","additionalProperties":false,"description":"One phone number on a shared contact card.","properties":{"phone_number":{"type":"string","description":"The number as the card holds it, normalized to E.164 where we can parse it. A card is whatever the contact's device stored, so a number that no country's numbering plan accepts, an extension among them, is passed through exactly as it arrived rather than dropped. Parse defensively: most values are E.164 and none is guaranteed to be.\n","example":"+16505551234"},"type":{"type":"string","description":"The label attached to this value, for example `CELL`, `Home` or `iPhone`. Free text: WhatsApp defines no vocabulary. A label on a received card is lowercased; one this workspace sent reads back exactly as sent.\n","example":"cell"}}},"WhatsAppContactEmail":{"type":"object","additionalProperties":false,"description":"One email address on a shared contact card.","properties":{"email":{"type":"string","example":"barbara@example.com"},"type":{"type":"string","description":"The label attached to this value, for example `CELL`, `Home` or `iPhone`. Free text: WhatsApp defines no vocabulary. A label on a received card is lowercased; one this workspace sent reads back exactly as sent.\n","example":"Personal"}}},"WhatsAppContactUrl":{"type":"object","additionalProperties":false,"description":"One website on a shared contact card.","properties":{"url":{"type":"string","description":"The address as the card holds it, which is often bare rather than a full URL, so it is passed through as text rather than validated.\n","example":"luckyshrub.example.com"},"type":{"type":"string","description":"The label attached to this value, for example `CELL`, `Home` or `iPhone`. Free text: WhatsApp defines no vocabulary. A label on a received card is lowercased; one this workspace sent reads back exactly as sent.\n","example":"Company"}}},"WhatsAppContactAddress":{"type":"object","additionalProperties":false,"description":"One postal address on a shared contact card.","properties":{"street":{"type":"string","example":"1 Hacker Way"},"city":{"type":"string","example":"Menlo Park"},"state":{"type":"string","example":"CA"},"zip":{"type":"string","example":"94025"},"country":{"type":"string","example":"United States"},"country_code":{"type":"string","description":"The country as the card holds it, left exactly as WhatsApp sent it: it describes a postal address rather than a routing destination.\n","example":"US"},"type":{"type":"string","description":"The label attached to this value, for example `CELL`, `Home` or `iPhone`. Free text: WhatsApp defines no vocabulary. A label on a received card is lowercased; one this workspace sent reads back exactly as sent.\n","example":"Home"}}},"WhatsAppContactCard":{"type":"object","additionalProperties":false,"description":"A contact card on this message: one the contact shared, or one this workspace sent.\n\nNothing here is required. WhatsApp sends the parts the card holds and omits the rest, and a card that arrives with only an `origin` is still meaningful, so an empty card reads back empty rather than being dropped.\n","properties":{"origin":{"type":"string","minLength":1,"x-extensible-enum":["contact_request","other"],"description":"Why the card arrived. `contact_request` means the contact tapped a button this workspace sent asking for their number, which is the only signal that the message answers that ask; `other` means they shared a card in the chat. Open enum: treat an unrecognized value as a way of sharing added since. Set on a card the contact shared; absent on one this workspace sent.\n","example":"contact_request"},"vcard":{"type":"string","description":"The contact's card in vCard format. WhatsApp sends it on a card shared in the chat and omits it on a button tap, which carries the number alone. Set on a card the contact shared; absent on one this workspace sent.\n","example":"BEGIN:VCARD\nVERSION:3.0\nN:Johnson;Barbara;;;\nTEL;type=CELL:+16505551234\nEND:VCARD\n"},"name":{"allOf":[{"$ref":"#/components/schemas/WhatsAppContactName"}],"description":"The contact's name, when the card carries one."},"org":{"allOf":[{"$ref":"#/components/schemas/WhatsAppContactOrg"}],"description":"Where the contact works, when the card carries it."},"birthday":{"type":"string","description":"The contact's birthday, which WhatsApp sends as `YYYY-MM-DD`. Passed through as text rather than typed as a date: the value comes off the contact's own device unvalidated, and a card we could not parse would otherwise have to lose the field or fail the whole read.\n","example":"1999-01-23"},"phone_numbers":{"type":"array","description":"The numbers on the card. A button tap carries the contact's own number here, which is the point of asking.\n","items":{"$ref":"#/components/schemas/WhatsAppContactPhone"}},"emails":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppContactEmail"}},"urls":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppContactUrl"}},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppContactAddress"}}},"example":{"origin":"contact_request","phone_numbers":[{"phone_number":"+16505551234","type":"cell"}]}},"WhatsAppInteractiveType":{"type":"string","minLength":1,"x-extensible-enum":["button","list","cta_url","carousel","location_request_message","request_contact_info"],"description":"Which kind of interactive message this is.\n\n- `button`: up to three tappable buttons, each sending its own identifier\n  back as an inbound message. Carried in `buttons`.\n- `list`: a single button that opens a menu of rows to choose one from.\n- `cta_url`: a single button that opens a link.\n- `carousel`: 2 to 10 media cards the recipient scrolls through sideways,\n  each with its own buttons. Carried in `cards`.\n- `location_request_message`: a single button that asks the recipient to\n  share where they are. A tap arrives as an inbound `location` message.\n- `request_contact_info`: a single button that asks the recipient to share\n  their phone number. A tap arrives as an inbound message carrying the number\n  on `contact_cards`, with `origin` set to `contact_request`.\n\nThe last two name no field of their own: the ask is the whole message, and\n`body_text` is all they carry.\n\nOpen enum: WhatsApp adds interactive kinds over time, so treat an\nunrecognized value as a future kind rather than an error.\n","example":"button"},"WhatsAppInteractiveHeaderType":{"type":"string","minLength":1,"x-extensible-enum":["text","image","video","document"],"description":"A header's kind, and which field carries it. Open enum: WhatsApp adds header kinds over time, so treat an unrecognized value as a future kind rather than an error.\n","example":"image"},"WhatsAppInteractiveHeader":{"type":"object","additionalProperties":false,"required":["type"],"description":"What the interactive message showed above its body. `type` names the kind and the field that carries it: `text` for a line of copy, `url` for the file every other kind shows. As on the message itself, the read vocabulary is open: dispatch on `type` and treat an unrecognized value as a header kind added since.\n","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveHeaderType"}],"description":"Which kind of header this is, and which field carries it."},"text":{"type":"string","description":"The line of text shown above the body.","example":"New workshop dates announced"},"url":{"type":"string","format":"uri","description":"The URL of the file shown above the body, as the send supplied it. Interactive content is outbound only, so Bird neither stores nor proxies the file.\n","example":"https://cdn.example.com/banners/workshop.png"}}},"WhatsAppInteractiveButtonType":{"type":"string","minLength":1,"x-extensible-enum":["quick_reply","cta_url"],"description":"Which kind of button this is, and which field carries it.\n\n- `quick_reply`: sends its own identifier back as an inbound message.\n- `cta_url`: opens a link in the recipient's browser.\n\nOpen enum: WhatsApp adds button kinds over time, so treat an unrecognized\nvalue as a future kind rather than an error.\n","example":"quick_reply"},"WhatsAppInteractiveQuickReplyButton":{"type":"object","additionalProperties":false,"required":["slug","text"],"description":"A reply button's label and the handle it carries back. On the echo of a message Bird sent, the pair the send declared; on an inbound `interactive_reply`, the pair the contact tapped. No length is declared here, because a tap can echo a template's quick-reply button, whose label runs longer than an interactive message's own allows.\n","properties":{"slug":{"type":"string","minLength":1,"description":"The handle the button carries back, never shown to the recipient. On a tap on a template's quick-reply button, it is the payload that template declared.\n","example":"change-booking"},"text":{"type":"string","minLength":1,"description":"The label the recipient saw.","example":"Change"}}},"WhatsAppInteractiveCtaUrl":{"type":"object","additionalProperties":false,"required":["text","url"],"description":"The link button the message offered: its label and the address it opens.\n","properties":{"text":{"type":"string","minLength":1,"description":"The button's label.","example":"See dates"},"url":{"type":"string","format":"uri","minLength":1,"description":"The address the button opens, as the send supplied it.","example":"https://example.com/workshops?click_id=a1b2c3"}}},"WhatsAppInteractiveButton":{"type":"object","additionalProperties":false,"required":["type"],"description":"One button the message offered. The field named by `type` is the one that is present. As on the message itself, the read vocabulary is open: dispatch on `type` and treat an unrecognized value as a button kind added since.\n","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveButtonType"}],"description":"Which kind of button this is, and which field carries it."},"quick_reply":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveQuickReplyButton"}],"description":"The button's label and the handle it sends back."},"cta_url":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveCtaUrl"}],"description":"The button's label and the address it opens."}}},"WhatsAppInteractiveListRow":{"type":"object","additionalProperties":false,"required":["slug","text"],"description":"One option in a list's menu. On the echo of a message Bird sent, the row as declared; on an inbound `interactive_reply`, the row the contact chose. No length is declared here: this is what WhatsApp reported, not what a send is held to.\n","properties":{"slug":{"type":"string","minLength":1,"description":"The handle the row carries back, never shown to the recipient.","example":"priority_express"},"text":{"type":"string","minLength":1,"description":"The row's label, shown as its title in the menu.","example":"Priority Mail Express"},"description":{"type":"string","description":"The second line under the label. Absent when the row carried none.","example":"Next day to 2 days"}}},"WhatsAppInteractiveListSection":{"type":"object","additionalProperties":false,"required":["title","rows"],"description":"One group of options in the menu the message showed.","properties":{"title":{"type":"string","minLength":1,"description":"The group's heading, shown above its rows.","example":"As soon as possible"},"rows":{"type":"array","description":"The options in this group, in the order shown.","items":{"$ref":"#/components/schemas/WhatsAppInteractiveListRow"}}}},"WhatsAppInteractiveList":{"type":"object","additionalProperties":false,"required":["button_text","sections"],"description":"The menu the message offered: a button that opens it, and the groups of options behind it.\n","properties":{"button_text":{"type":"string","minLength":1,"description":"The label of the button that opens the menu.","example":"Shipping options"},"sections":{"type":"array","description":"The groups of options in the menu, in the order shown.","items":{"$ref":"#/components/schemas/WhatsAppInteractiveListSection"}}}},"WhatsAppInteractiveCard":{"type":"object","additionalProperties":false,"required":["header","buttons"],"description":"One card the carousel showed, in the position it appeared in.","properties":{"header":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveHeader"}],"description":"The image or video shown at the top of the card."},"body_text":{"type":"string","description":"The card's own text. Absent when the card carried none.","example":"*Blue Echeveria*"},"buttons":{"type":"array","description":"The buttons the card offered, in the order shown.","items":{"$ref":"#/components/schemas/WhatsAppInteractiveButton"}}}},"WhatsAppInteractive":{"type":"object","additionalProperties":false,"description":"Interactive content of a WhatsApp message: body text plus something the recipient can tap. The field named by `type` is the one that is present, except on `location_request_message` and `request_contact_info`, which name no field: each is a single button asking the recipient for something, so `body_text` is the whole message. Outbound only, and so an echo of what the send asked for: a contact cannot send interactive content, and a tap on it reads as `interactive_reply`, or on a location or contact request as the message the recipient shared in answer. Unlike the send schema, this one does not pin each `type` to its field. The vocabulary in `type` is open, so dispatch on it and treat an unrecognized value as a kind added since. Only the discriminator is open: this schema declares no additional properties, so a new kind's own payload field arrives here in the same change that introduces the kind, which is additive.\n","required":["type","body_text"],"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveType"}],"description":"Which kind of interactive message this is, and which field carries it."},"header":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveHeader"}],"description":"What was shown above the body. Absent when the message carried no header."},"body_text":{"type":"string","minLength":1,"description":"The message's main text.","example":"Your workshop is scheduled for 9am tomorrow."},"footer_text":{"type":"string","description":"The small print below the body. Absent when the message carried none.","example":"Lucky Shrub, your gateway to succulents"},"buttons":{"type":"array","description":"The buttons the message offered, in the order shown.","items":{"$ref":"#/components/schemas/WhatsAppInteractiveButton"}},"list":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveList"}],"description":"The menu the message offered."},"cta_url":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveCtaUrl"}],"description":"The link button the message offered."},"cards":{"type":"array","description":"The cards the message offered, in the order they appeared, left to right.\n","items":{"$ref":"#/components/schemas/WhatsAppInteractiveCard"}}}},"WhatsAppInteractiveReplyType":{"type":"string","minLength":1,"x-extensible-enum":["button","list"],"description":"Which kind of tap the reply came from.\n\n- `button`: a reply button on an interactive message, or a quick-reply\n  button on a template. Both carry an identifier and a label, so they read\n  the same way.\n- `list`: a row chosen from a list's menu. Only this kind carries a\n  `description`.\n\nOpen enum: WhatsApp adds interactive kinds over time, so treat an\nunrecognized value as a future kind rather than an error.\n","example":"button"},"WhatsAppInteractiveReply":{"type":"object","additionalProperties":false,"description":"What the contact tapped, on an inbound message answering an interactive message or a template's quick-reply button. `type` names the kind and the field it names carries it, as everywhere else in this arm. Inbound only: a message that offers something to tap reads as `interactive` instead, and the two never appear together.\n","required":["type"],"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveReplyType"}],"description":"Which kind of tap this reply came from, and which field carries it."},"button":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveQuickReplyButton"}],"description":"The button the contact tapped, as you declared it. On a reply to a template's quick-reply button, `slug` is the button's payload, which WhatsApp sets to the button's own label.\n"},"list":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveListRow"}],"description":"The row the contact chose, as you declared it. `description` is present only when the row carried one.\n"}},"example":{"type":"list","list":{"slug":"priority_express","text":"Priority Mail Express","description":"Next day to 2 days"}}},"WhatsAppUnsupported":{"type":"object","additionalProperties":false,"description":"A message whose content we do not model, named so it is visible in the message log rather than arriving empty. Never on a message sent through Bird.\n","required":["type"],"properties":{"type":{"type":"string","minLength":1,"x-extensible-enum":["reaction","interactive","order","system","unsupported"],"description":"The WhatsApp content type we did not model. `unsupported` is not a placeholder here: WhatsApp reports its own `unsupported` type for a message its own clients cannot render, and that arrives as this value. Open enum: WhatsApp adds content types over time, so treat an unrecognized value as a future type rather than an error.\n","example":"reaction"}},"example":{"type":"reaction"}},"WhatsAppReaction":{"type":"object","additionalProperties":false,"required":["emoji","from"],"description":"An emoji reaction standing on a message. One entry per sender: reacting again replaces that sender's entry rather than adding one, and removing a reaction drops it from the list. A one-to-one message therefore carries at most two, one for the contact and one for your business number. This is the folded current state, so it names no single change; the message's reaction log is what records how each one arrived.\n","properties":{"emoji":{"type":"string","minLength":1,"readOnly":true,"description":"The emoji, as WhatsApp sent it. It is not normalized, so two emoji that render identically can differ byte for byte and compare unequal.\n","example":"👍"},"from":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppAddress"}],"description":"Who reacted. On a group message this is what tells one participant's reaction from another's. On a one-to-one message it is your business number on a reaction you placed and the contact on one they placed, which is why it is here rather than inferred from the message's `direction`.\n"}}},"Actor":{"type":"object","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string","minLength":1,"description":"Actor identifier.","example":"usr_01krdgeqcxet5s7t44vh8rt9mg"},"type":{"type":"string","minLength":1,"x-extensible-enum":["user","api_key","oauth_token","system","sso","service_account","automation"],"description":"New actor types may be added. Treat unrecognized values as future types, not errors.\n- `user`: a member's own session.\n- `api_key`: a workspace API key.\n- `oauth_token`: a token issued to a caller on a member's behalf.\n- `system`: an action we perform without a customer actor.\n- `sso`: an organization's SSO connection.\n- `service_account`: a workspace's connected Integration acting with no member behind it.\n- `automation`: an automation execution in your workspace.","example":"user"},"display_name":{"type":["string","null"],"readOnly":true,"description":"The label the actor is shown under: typically a member's name or email address, or the API key's name. Null when it could not be resolved.\n"}}},"WhatsAppMessageOrigin":{"type":"string","minLength":1,"x-extensible-enum":["business_agent_echo","business_app_echo","history_sync"],"description":"Where a message came from when it did not come through Bird live: its provenance. It does not say who answers the contact. On a number shared with the WhatsApp Business app, a message can come from the app while Bird keeps answering.\n\n- `business_agent_echo`: the Meta Business Agent on this number composed it.\n- `business_app_echo`: someone sent it from the WhatsApp Business app on a number shared with it.\n- `history_sync`: WhatsApp copied it, in either direction, from the WhatsApp Business app's chat history when the number was shared. Neither `/v1/whatsapp/messages` nor a webhook event reports an imported message, so neither carries this value.\n","example":"business_agent_echo"},"WhatsAppError":{"type":["object","null"],"additionalProperties":false,"readOnly":true,"required":["code","description","occurred_at"],"description":"Failure detail for a message that could not be delivered or was rejected.","properties":{"code":{"$ref":"#/components/schemas/WhatsAppErrorCode"},"description":{"type":"string","minLength":1,"readOnly":true,"description":"Human-readable explanation of the failure.","example":"Message could not be delivered."},"meta_error_code":{"type":["string","null"],"readOnly":true,"description":"Raw error code from the WhatsApp Cloud API, when available, for low-level debugging.","example":"131026"},"occurred_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the failure occurred."}}},"WhatsAppMessage":{"type":"object","additionalProperties":false,"required":["id","direction","from","to","status","created_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/WhatsAppMessageID","description":"ID of the message, assigned when the send is accepted. Pass it as `message_id` to the get-message and list-events endpoints.\n"},"direction":{"type":"string","minLength":1,"readOnly":true,"enum":["outbound","inbound"],"description":"Whether the message was sent by the business (`outbound`) or received from the contact (`inbound`)."},"from":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppAddress"}],"description":"Sender of the message. On outbound messages, the business number it was sent from; on inbound, the WhatsApp contact."},"to":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppAddress"}],"description":"Recipient of the message. On outbound messages, the WhatsApp contact; on inbound, the business number."},"template":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppMessageTemplate"}],"description":"The template the message was sent from. For authentication templates the filled-in values are not returned."},"text":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppText"}],"description":"Text the message carried."},"image":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppImage"}],"description":"Image the message carried."},"video":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppVideo"}],"description":"Video the message carried."},"audio":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppAudio"}],"description":"Audio the message carried."},"sticker":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppSticker"}],"description":"Sticker the message carried."},"document":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppDocument"}],"description":"Document the message carried."},"location":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppLocation"}],"description":"Location the message carried."},"contact_cards":{"readOnly":true,"type":"array","description":"Contact cards on this message: cards the contact shared, either by tapping a button that asked for their number or by sending one from their address book, or the cards this workspace sent.\n","items":{"$ref":"#/components/schemas/WhatsAppContactCard"}},"interactive":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractive"}],"description":"Interactive content the message carried. Outbound only: a contact cannot send one. A tap on a reply button or a list row reads back as `interactive_reply` on the contact's inbound message; a `cta_url` link sends nothing back, and the two request kinds are answered by an inbound `location` or `contact_cards` message.\n"},"in_reply_to_message_id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppMessageID"}],"description":"The message this one answers. On an inbound message it is what WhatsApp reports as the reply's target: a tap on a button or a list row, and equally a text or media message the contact sent as a quoted reply. An outbound message echoes the `in_reply_to_message_id` it was sent with. Absent when the message answers nothing, and absent on an inbound message whose target we cannot match to a message we hold, which is the case for one sent before this workspace started recording them or one already past the 15-day window we keep provider ids for.\n"},"interactive_reply":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveReply"}],"description":"What the contact tapped, on a message answering an interactive message or a template's quick-reply button. Inbound only.\n"},"unsupported":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppUnsupported"}],"description":"Set when a message that did not come from a Bird send carries content we do not model, naming the WhatsApp content type so the message is not silently empty. Never on a message sent through Bird.\n"},"reactions":{"readOnly":true,"type":"array","description":"Emoji reactions standing on this message right now, one per sender. Absent when the message has none. A reaction that was replaced by a different emoji, or taken back, is not listed; the message's reaction log keeps that history. WhatsApp accepts a reaction on a message up to 30 days old, and we keep provider ids for 15, so a reaction placed on a message older than that cannot be matched to it and does not appear here.\n","items":{"$ref":"#/components/schemas/WhatsAppReaction"}},"status":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppMessageStatus"}]},"origin":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppMessageOrigin"}],"description":"Where the message came from when it did not come through Bird live. Absent when your workspace sent the message through Bird, or the contact sent it to Bird.\n"},"recipient_count":{"type":"integer","minimum":1,"readOnly":true,"description":"How many recipients a group send was addressed to, taken when the send\nwas accepted. It is the group's membership at that moment, not its\nmembership now: someone joining through the invite link while the message\nis in flight does not receive it and does not change this count.\n\nAbsent on a one-to-one message, along with `delivered_count` and\n`read_count`. A message with one recipient has no fan-out to report, and\nits delivery is what `status`, `delivered_at` and `read_at` already say.\nAbsent for the same reason on a group message sent before Bird recorded\nthe count, and on a send to a group nobody had joined yet: there is no\ndenominator to report, and none can be recovered after the fact, since\nmembership has moved on. `to.group_id` is what tells a group message from\na one-to-one one in every case, including those two. With no denominator\nto resolve against, `status` is read as stored, the way a one-to-one\nmessage's is: it reaches `sent` when the message is handed to WhatsApp and\nstops there, because delivery is confirmed per participant and a send with\nno participants collects no confirmations.\n\nIt is also the denominator `status` is resolved against: on a group\nmessage `status` reports the furthest point *every* recipient has\nreached, so it turns `delivered` only once `delivered_count` equals this\nnumber, and stays `sent` while some have confirmed and others have not.\n`failed` and `rejected` are never per recipient: there is one hand-off to\nthe WhatsApp network and one way for that to be refused. `delivered_at`\nand `read_at` are the first recipient's, not the last.\n"},"delivered_count":{"type":"integer","minimum":0,"readOnly":true,"description":"How many of the `recipient_count` recipients WhatsApp has confirmed the\nmessage reached. A recipient who reported only a read counts here too:\nWhatsApp skips the delivery receipt when someone is already looking at\nthe chat, so waiting for one would leave that person uncounted for ever.\n\nAbsent on a one-to-one message, which has no fan-out to count, and on a\ngroup message with no `recipient_count` to count against.\n"},"read_count":{"type":"integer","minimum":0,"readOnly":true,"description":"How many of the `recipient_count` recipients have opened the message.\nRead receipts do not move `status`, which has no `read` value; they\nsurface here and in `read_at`.\n\nAbsent on a one-to-one message, which has no fan-out to count, and on a\ngroup message with no `recipient_count` to count against.\n"},"last_error":{"$ref":"#/components/schemas/WhatsAppError","description":"Failure detail for a message that did not reach the recipient. Present only when the message failed or was rejected."},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the message was accepted for delivery."},"sent_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the message was handed to the WhatsApp network. Null until then."},"delivered_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When delivery was confirmed. Null until then."},"read_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the message was read. On an outbound message this is the recipient opening it. On an inbound one it is when Bird acknowledged the message to WhatsApp for the business, which a read receipt sets. Null until then.\n"},"cost":{"readOnly":true,"$ref":"#/components/schemas/MessageCost","description":"What the message cost, split into Bird's charge and any third-party fees passed through. Null on an inbound message, which is never priced, on an outbound message that has not been priced yet, and on one rejected before pricing. The rate depends on the message category and the recipient's country."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"},"description":"Structured `{name, value}` filter labels applied to this message."},"metadata":{"type":"object","additionalProperties":true,"description":"Arbitrary JSON metadata stored on the message."},"reference":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/MessageReference"}],"description":"The `reference` from the send request. Absent when the send set none, and on inbound messages."}}},"WhatsAppMessageList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of WhatsApp messages, newest first.","items":{"$ref":"#/components/schemas/WhatsAppMessage"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"WhatsAppTemplateSend":{"type":"object","additionalProperties":false,"description":"Supply exactly one of `id` or `slug`, optionally a language, and fill required placeholders through `parameters` or `components`.","oneOf":[{"required":["id"]},{"required":["slug"]}],"properties":{"id":{"description":"The template to send, by its id.","$ref":"#/components/schemas/WhatsAppTemplateID"},"slug":{"allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"description":"Template slug, such as `bird_otp`.","example":"bird_otp"},"language":{"allOf":[{"$ref":"#/components/schemas/LanguageTag"}],"description":"BCP-47 tag (`en-US`; `en_US` also accepted). Defaults to the template's default language unless `language_source_required` is set. Missing variants follow `on_missing_language`. The resolved language determines pricing and is echoed in the accepted message.","example":"en-US"},"bid_multiplier":{"type":"number","format":"double","minimum":0.1,"maximum":2,"description":"Multiplies `optimization_spec.bid_amount` × country multiplier for this message. Range 0.1–2; default 1. Requires `optimization_spec` on a marketing template language. The result must stay at most 50000 (0.50 per delivery) for the recipient's country; a recipient without a known country is checked against the language's highest.","example":0.8},"parameters":{"type":"object","additionalProperties":true,"description":"The template's inputs as one map, instead of `components`. Each key is a name in the version's `variables`: a placeholder's own name, or its number (`1`, `2`) for a numbered placeholder, `header_url` (or `header_url_1`, `header_url_2` for a carousel card), `header_filename`, `header_location` and `code` for values with no placeholder, `button_url` (or `button_url_1`, `button_url_2` for a carousel card) for a numbered URL suffix, or an input a parameter binding reads. A media header left out, or whose value is empty, sends the template's approved sample; a template without one, such as one imported from WhatsApp, needs its media URL. A value is a string, number or boolean, except `header_location`, an object with `latitude` and `longitude`, and optionally `name` and `address`. Keys the language does not use are ignored, and `bird` is reserved. At most 16 KB. Send `parameters` or `components`, not both. A template with parameter bindings, or with named variables in a card or a button URL, takes only `parameters`.\n","example":{"order_id":"A-4192","first_name":"Ava"}},"components":{"type":"array","description":"Copy each language component's `example_parameters` into that part's `parameters`, replacing examples with real values. Map `buttons` to one `button` part per button with examples, in order; map `carousel` to `cards`, built likewise. A location header requires a `location` parameter. Omit other blocks without examples.","items":{"$ref":"#/components/schemas/WhatsAppMessageTemplateComponent"}}},"examples":[{"id":"wat_01ky4x8e4genzb7way45txfkm1","language":"en","components":[{"type":"body","parameters":[{"type":"text","text":"1234"}]},{"type":"button","parameters":[{"type":"text","text":"1234"}]}]},{"slug":"bird_order_confirmation","language":"en","components":[{"type":"body","parameters":[{"type":"text","name":"ref","text":"A1B2C3D4"},{"type":"text","name":"amount","text":"$49.99"}]}]},{"slug":"bird_otp","language":"en","components":[{"type":"body","parameters":[{"type":"text","text":"1234"}]},{"type":"button","parameters":[{"type":"text","text":"1234"}]}]}]},"WhatsAppTextSend":{"type":"object","additionalProperties":false,"required":["body"],"description":"Free-form text to send. Deliverable only inside an open 24-hour customer service window; outside one, send a template instead.\n","properties":{"body":{"type":"string","minLength":1,"maxLength":4096,"description":"Message text; URLs become clickable links.","example":"Your driver is 2 minutes away."},"preview_url":{"type":"boolean","default":false,"description":"Preview the first link in `body`. Omitted on reads."}},"example":{"body":"Your order shipped: https://example.com/track/A1B2C3","preview_url":true}},"WhatsAppImageSend":{"type":"object","additionalProperties":false,"required":["url"],"description":"A free-form image to send, with an optional caption. Deliverable only inside an open 24-hour customer service window; outside one, send a template instead.\n","properties":{"url":{"type":"string","format":"uri","minLength":1,"description":"Public HTTPS URL fetched at send time. JPEG/PNG, up to 5 MB.","example":"https://cdn.example.com/receipts/a1b2c3.png"},"caption":{"type":"string","maxLength":1024,"description":"Text shown beneath the image.","example":"Your receipt for order A1B2C3"}},"example":{"url":"https://cdn.example.com/receipts/a1b2c3.png","caption":"Your receipt for order A1B2C3"}},"WhatsAppVideoSend":{"type":"object","additionalProperties":false,"required":["url"],"description":"A free-form video to send, with an optional caption. Deliverable only inside an open 24-hour customer service window; outside one, send a template instead.\n","properties":{"url":{"type":"string","format":"uri","minLength":1,"description":"Public HTTPS URL fetched at send time. MP4 with H.264 video and AAC audio, up to 16 MB.","example":"https://cdn.example.com/unboxing.mp4"},"caption":{"type":"string","maxLength":1024,"description":"Text shown beneath the video.","example":"How to set it up"}},"example":{"url":"https://cdn.example.com/unboxing.mp4","caption":"How to set it up"}},"WhatsAppAudioSend":{"type":"object","additionalProperties":false,"required":["url"],"description":"Free-form audio to send, either as a voice note or as a basic audio file. Deliverable only inside an open 24-hour customer service window; outside one, send a template instead.\n","properties":{"url":{"type":"string","format":"uri","minLength":1,"description":"Public HTTPS URL fetched at send time. AAC, AMR, MP3, M4A, or OGG (OPUS, mono), up to 16 MB.","example":"https://cdn.example.com/voice/9f2e4a.ogg"},"voice":{"type":"boolean","default":false,"description":"Send as a voice note; requires an `.ogg` file with the OPUS codec."}},"example":{"url":"https://cdn.example.com/voice/9f2e4a.ogg","voice":true}},"WhatsAppStickerSend":{"type":"object","additionalProperties":false,"required":["url"],"description":"A free-form sticker to send. Deliverable only inside an open 24-hour customer service window; outside one, send a template instead.\n","properties":{"url":{"type":"string","format":"uri","minLength":1,"description":"Public HTTPS URL fetched at send time. WebP, up to 100 KB static or 500 KB animated.","example":"https://cdn.example.com/stickers/thumbs-up.webp"}},"example":{"url":"https://cdn.example.com/stickers/thumbs-up.webp"}},"WhatsAppDocumentSend":{"type":"object","additionalProperties":false,"required":["url"],"description":"A free-form document to send, with an optional caption and filename. Deliverable only inside an open 24-hour customer service window; outside one, send a template instead.\n","properties":{"url":{"type":"string","format":"uri","minLength":1,"description":"Public HTTPS URL fetched at send time, up to 100 MB. PDF, Word, Excel, PowerPoint, and plain text render reliably.","example":"https://cdn.example.com/invoices/a1b2c3.pdf"},"caption":{"type":"string","maxLength":1024,"description":"Text shown beneath the document.","example":"Your invoice for order A1B2C3"},"filename":{"type":"string","minLength":1,"maxLength":100,"description":"Recipient-visible filename with extension.","example":"invoice-a1b2c3.pdf"}},"example":{"url":"https://cdn.example.com/invoices/a1b2c3.pdf","caption":"Your invoice for order A1B2C3","filename":"invoice-a1b2c3.pdf"}},"WhatsAppInteractiveTypeWrite":{"type":"string","minLength":1,"enum":["button","list","cta_url","carousel","location_request_message","request_contact_info"],"x-enum-varnames":["WhatsAppInteractiveTypeWriteButton","WhatsAppInteractiveTypeWriteList","WhatsAppInteractiveTypeWriteCtaUrl","WhatsAppInteractiveTypeWriteCarousel","WhatsAppInteractiveTypeWriteLocationRequestMessage","WhatsAppInteractiveTypeWriteRequestContactInfo"],"description":"Which kind of interactive message to send.\n\n- `button`: up to three tappable buttons, each sending its own identifier\n  back as an inbound message. Carried in `buttons`.\n- `list`: a single button that opens a menu of rows to choose one from.\n- `cta_url`: a single button that opens a link, so the address stays out of\n  the message body.\n- `carousel`: 2 to 10 media cards the recipient scrolls through sideways,\n  each with its own buttons. Carried in `cards`.\n- `location_request_message`: a single button that asks the recipient to\n  share where they are. A tap arrives as an inbound `location` message.\n- `request_contact_info`: a single button that asks the recipient to share\n  their phone number. A tap arrives as an inbound message carrying the number\n  on `contact_cards`, with `origin` set to `contact_request`.\n","example":"button"},"WhatsAppInteractiveHeaderTypeWrite":{"type":"string","minLength":1,"enum":["text","image","video","document"],"x-enum-varnames":["WhatsAppInteractiveHeaderTypeWriteText","WhatsAppInteractiveHeaderTypeWriteImage","WhatsAppInteractiveHeaderTypeWriteVideo","WhatsAppInteractiveHeaderTypeWriteDocument"],"description":"A header's kind, and which field carries it. `text` is a line of copy; the rest each show a file whose address you give in `url`. A `list` accepts `text` only, and a carousel card accepts `image` or `video` only. Closed on the write side: a kind Bird cannot send to Meta is rejected rather than accepted and then failed asynchronously.\n","example":"image"},"WhatsAppInteractiveHeaderSend":{"type":"object","additionalProperties":false,"required":["type"],"description":"Content above the body: `text` or a media `url`. Lists accept text headers only.","oneOf":[{"properties":{"type":{"const":"text"},"url":{"not":{}}},"required":["type","text"]},{"properties":{"type":{"enum":["image","video","document"]},"text":{"not":{}}},"required":["type","url"]}],"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveHeaderTypeWrite"}],"description":"Header kind; determines which field to supply."},"text":{"type":"string","minLength":1,"maxLength":60,"description":"Single line above the body, for `text` headers.","example":"New workshop dates announced"},"url":{"type":"string","format":"uri","minLength":1,"description":"Public HTTPS URL fetched at send time for `image`, `video`, or `document` headers. The corresponding free-form media limits apply.","example":"https://cdn.example.com/banners/workshop.png"}},"example":{"type":"image","url":"https://cdn.example.com/banners/workshop.png"}},"WhatsAppInteractiveButtonTypeWrite":{"type":"string","minLength":1,"enum":["quick_reply","cta_url"],"x-enum-varnames":["WhatsAppInteractiveButtonTypeWriteQuickReply","WhatsAppInteractiveButtonTypeWriteCtaUrl"],"description":"Which kind of button this is, and which field carries it.\n\n- `quick_reply`: sends its own identifier back as an inbound message. The\n  name `WhatsAppTemplateButtonTypeWrite` already uses for the same control.\n- `cta_url`: opens a link in the recipient's browser.\n\nClosed on the write side: a kind Bird cannot send to Meta is rejected rather\nthan accepted and then failed asynchronously.\n","example":"quick_reply"},"WhatsAppInteractiveQuickReplyButtonSend":{"type":"object","additionalProperties":false,"required":["slug","text"],"description":"Reply button; tapping returns `slug` in an inbound `interactive_reply`.","properties":{"slug":{"type":"string","minLength":1,"maxLength":256,"description":"Hidden reply identifier, echoed on tap. Any characters, up to 256.","example":"change-booking"},"text":{"type":"string","minLength":1,"maxLength":20,"description":"Button label, unique within its message or carousel card.","example":"Change"}},"example":{"slug":"change-booking","text":"Change"}},"WhatsAppInteractiveCtaUrlSend":{"type":"object","additionalProperties":false,"required":["text","url"],"description":"Button that opens a link in the recipient's browser.","properties":{"text":{"type":"string","minLength":1,"maxLength":20,"description":"The button's label.","example":"See dates"},"url":{"type":"string","format":"uri","minLength":1,"maxLength":2000,"description":"Destination URL. Include per-recipient tracking in the supplied URL.","example":"https://example.com/workshops?click_id=a1b2c3"}},"example":{"text":"See dates","url":"https://example.com/workshops?click_id=a1b2c3"}},"WhatsAppInteractiveButtonSend":{"type":"object","additionalProperties":false,"required":["type"],"description":"Interactive or carousel button. Set `type` and its matching field.","oneOf":[{"properties":{"type":{"const":"quick_reply"},"cta_url":{"not":{}}},"required":["type","quick_reply"]},{"properties":{"type":{"const":"cta_url"},"quick_reply":{"not":{}}},"required":["type","cta_url"]}],"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveButtonTypeWrite"}],"description":"Button kind; determines which field to supply."},"quick_reply":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveQuickReplyButtonSend"}],"description":"Label and reply identifier for `quick_reply`."},"cta_url":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveCtaUrlSend"}],"description":"Label and destination for `cta_url`."}},"example":{"type":"quick_reply","quick_reply":{"slug":"change-booking","text":"Change"}}},"WhatsAppInteractiveListRowSend":{"type":"object","additionalProperties":false,"required":["slug","text"],"description":"Menu option; selection returns `slug` in an inbound `interactive_reply`.","properties":{"slug":{"type":"string","minLength":1,"maxLength":200,"description":"Hidden reply identifier, echoed on selection. Any characters, up to 200.","example":"priority_express"},"text":{"type":"string","minLength":1,"maxLength":24,"description":"Row label, unique across every section's rows; duplicates return `422` `WhatsAppInteractiveDuplicateLabel`.","example":"Priority Mail Express"},"description":{"type":"string","maxLength":72,"description":"Detail shown below the label.","example":"Next day to 2 days"}},"example":{"slug":"priority_express","text":"Priority Mail Express","description":"Next day to 2 days"}},"WhatsAppInteractiveListSectionSend":{"type":"object","additionalProperties":false,"required":["title","rows"],"description":"Menu section. A title is required even for a single section.","properties":{"title":{"type":"string","minLength":1,"maxLength":24,"description":"The group's heading, shown above its rows.","example":"As soon as possible"},"rows":{"type":"array","minItems":1,"maxItems":10,"description":"At most 10 rows across the message (`422` `WhatsAppInteractiveLimitExceeded` otherwise). Labels must be unique across sections.","items":{"$ref":"#/components/schemas/WhatsAppInteractiveListRowSend"}}},"example":{"title":"As soon as possible","rows":[{"slug":"priority_express","text":"Priority Mail Express","description":"Next day to 2 days"}]}},"WhatsAppInteractiveListSend":{"type":"object","additionalProperties":false,"required":["button_text","sections"],"description":"Button-opened menu; selecting an option sends a reply.","properties":{"button_text":{"type":"string","minLength":1,"maxLength":20,"description":"The label of the button that opens the menu.","example":"Shipping options"},"sections":{"type":"array","minItems":1,"maxItems":10,"description":"Sections in display order. At most 10 rows total, with labels unique across the message.","items":{"$ref":"#/components/schemas/WhatsAppInteractiveListSectionSend"}}},"example":{"button_text":"Shipping options","sections":[{"title":"As soon as possible","rows":[{"slug":"priority_express","text":"Priority Mail Express","description":"Next day to 2 days"}]},{"title":"I can wait a bit","rows":[{"slug":"ground_advantage","text":"Ground Advantage","description":"2 to 5 days"}]}]}},"WhatsAppInteractiveCardHeaderSend":{"type":"object","additionalProperties":false,"required":["type","url"],"description":"Required carousel-card media: image or video only.","oneOf":[{"properties":{"type":{"const":"image"}}},{"properties":{"type":{"const":"video"}}}],"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveHeaderTypeWrite"}],"description":"Card media kind: `image` or `video`."},"url":{"type":"string","format":"uri","minLength":1,"description":"Public HTTPS URL fetched at send time. Image: JPEG/PNG, up to 5 MB. Video: MP4 (H.264/AAC), up to 16 MB.","example":"https://cdn.example.com/plants/blue-echeveria.jpeg"}},"example":{"type":"image","url":"https://cdn.example.com/plants/blue-echeveria.jpeg"}},"WhatsAppInteractiveCardSend":{"type":"object","additionalProperties":false,"required":["header","buttons"],"description":"Carousel card: media, optional text, and buttons. No footer. Array order determines display order.","oneOf":[{"properties":{"buttons":{"maxItems":1,"items":{"properties":{"type":{"const":"cta_url"}}}}}},{"properties":{"buttons":{"items":{"properties":{"type":{"const":"quick_reply"}}}}}}],"properties":{"header":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveCardHeaderSend"}],"description":"The image or video at the top of the card."},"body_text":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[^\\n]*(\\n[^\\n]*){0,2}$","description":"Optional text below the media, with at most two line breaks.","example":"*Blue Echeveria*\n\nA rosette-shaped succulent with powdery blue leaves."},"buttons":{"type":"array","minItems":1,"maxItems":3,"description":"One `cta_url` or up to three `quick_reply` buttons, in display order. Cards must match button kinds and count, or return `422` `WhatsAppInteractiveCardsButtonsMismatch`.","items":{"$ref":"#/components/schemas/WhatsAppInteractiveButtonSend"}}}},"WhatsAppInteractiveSend":{"type":"object","additionalProperties":false,"required":["type","body_text"],"description":"Set `type` and its matching field: `buttons`, `list`, `cta_url`, or `cards`. `location_request_message` and `request_contact_info` take only `body_text`.","oneOf":[{"properties":{"type":{"const":"button"},"body_text":{"maxLength":1024},"buttons":{"items":{"properties":{"type":{"const":"quick_reply"}}}},"list":{"not":{}},"cta_url":{"not":{}},"cards":{"not":{}}},"required":["type","buttons"]},{"properties":{"type":{"const":"list"},"header":{"properties":{"type":{"const":"text"},"url":{"not":{}}}},"buttons":{"not":{}},"cta_url":{"not":{}},"cards":{"not":{}}},"required":["type","list"]},{"properties":{"type":{"const":"cta_url"},"body_text":{"maxLength":1024},"buttons":{"not":{}},"list":{"not":{}},"cards":{"not":{}}},"required":["type","cta_url"]},{"properties":{"type":{"const":"carousel"},"body_text":{"maxLength":1024},"header":{"not":{}},"footer_text":{"not":{}},"buttons":{"not":{}},"list":{"not":{}},"cta_url":{"not":{}}},"required":["type","cards"]},{"properties":{"type":{"const":"location_request_message"},"body_text":{"maxLength":1024},"header":{"not":{}},"footer_text":{"not":{}},"buttons":{"not":{}},"list":{"not":{}},"cta_url":{"not":{}},"cards":{"not":{}}},"required":["type"]},{"properties":{"type":{"const":"request_contact_info"},"body_text":{"maxLength":1024},"header":{"not":{}},"footer_text":{"not":{}},"buttons":{"not":{}},"list":{"not":{}},"cta_url":{"not":{}},"cards":{"not":{}}},"required":["type"]}],"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveTypeWrite"}],"description":"Message kind; determines which content field to supply."},"header":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveHeaderSend"}],"description":"For `list`: text only. For `button` and `cta_url`: text, image, video, or document. Unsupported for carousel and request kinds."},"body_text":{"type":"string","minLength":1,"maxLength":4096,"description":"Required main text. Maximum 1024 characters, or 4096 for `list`.","example":"Your workshop is scheduled for 9am tomorrow."},"footer_text":{"type":"string","minLength":1,"maxLength":60,"description":"Small print below the body. Unsupported for carousel and request kinds.","example":"Dates are subject to change."},"buttons":{"type":"array","minItems":1,"maxItems":3,"description":"Ordered `quick_reply` buttons for `button` messages. Labels must be unique within the message.","items":{"$ref":"#/components/schemas/WhatsAppInteractiveButtonSend"}},"list":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveListSend"}],"description":"Menu for a `list` message."},"cta_url":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveCtaUrlSend"}],"description":"Link button for a `cta_url` message."},"cards":{"type":"array","minItems":2,"maxItems":10,"description":"2–10 carousel cards, in display order. No message-level header or footer.","items":{"$ref":"#/components/schemas/WhatsAppInteractiveCardSend"}}},"examples":[{"type":"button","header":{"type":"image","url":"https://cdn.example.com/banners/workshop.png"},"body_text":"Your gardening workshop is scheduled for 9am tomorrow. Use the buttons if you need to reschedule.","footer_text":"Lucky Shrub, your gateway to succulents","buttons":[{"type":"quick_reply","quick_reply":{"slug":"change-booking","text":"Change"}},{"type":"quick_reply","quick_reply":{"slug":"cancel-booking","text":"Cancel"}}]},{"type":"list","header":{"type":"text","text":"Choose a shipping option"},"body_text":"Which shipping option do you prefer?","list":{"button_text":"Shipping options","sections":[{"title":"As soon as possible","rows":[{"slug":"priority_express","text":"Priority Mail Express","description":"Next day to 2 days"}]},{"title":"I can wait a bit","rows":[{"slug":"ground_advantage","text":"Ground Advantage","description":"2 to 5 days"}]}]}},{"type":"cta_url","body_text":"Tap the button below to see the available dates.","footer_text":"Dates are subject to change.","cta_url":{"text":"See dates","url":"https://example.com/workshops?click_id=a1b2c3"}},{"type":"carousel","body_text":"Here are two of our latest arrivals, each under $25:","cards":[{"header":{"type":"image","url":"https://cdn.example.com/plants/blue-echeveria.jpeg"},"body_text":"Blue Echeveria. A rosette-shaped succulent with powdery blue leaves.","buttons":[{"type":"cta_url","cta_url":{"text":"Buy now","url":"https://shop.example.com/blue-echeveria"}}]},{"header":{"type":"image","url":"https://cdn.example.com/plants/zebra-haworthia.jpeg"},"body_text":"Zebra Haworthia. Striking white stripes on deep green leaves.","buttons":[{"type":"cta_url","cta_url":{"text":"Buy now","url":"https://shop.example.com/zebra-haworthia"}}]}]},{"type":"location_request_message","body_text":"Let's start with your pickup. Share your current location, or type an address instead."},{"type":"request_contact_info","body_text":"To confirm your booking we need a number to reach you on. Tap below to share yours."}]},"WhatsAppContactNameSend":{"type":"object","additionalProperties":false,"description":"Requires `formatted_name` plus at least one other name part.","required":["formatted_name"],"properties":{"formatted_name":{"type":"string","minLength":1,"maxLength":256,"description":"The whole name, as the card should render it.","example":"Barbara J. Johnson"},"first_name":{"type":"string","maxLength":256,"example":"Barbara"},"middle_name":{"type":"string","maxLength":256,"example":"Joana"},"last_name":{"type":"string","maxLength":256,"example":"Johnson"},"prefix":{"type":"string","maxLength":64,"example":"Dr."},"suffix":{"type":"string","maxLength":64,"example":"Esq."}}},"WhatsAppContactOrgSend":{"type":"object","additionalProperties":false,"description":"Where the contact works, as the card should record it.","properties":{"company":{"type":"string","maxLength":128,"example":"Lucky Shrub"},"department":{"type":"string","maxLength":128,"example":"Legal"},"title":{"type":"string","maxLength":128,"example":"Lead Counsel"}}},"WhatsAppContactPhoneSend":{"type":"object","additionalProperties":false,"description":"One phone number to put on a contact card.","required":["phone_number"],"properties":{"phone_number":{"type":"string","minLength":1,"maxLength":32,"description":"E.164 enables a chat button; other formats show an invite button.","example":"+16505551234"},"type":{"type":"string","maxLength":64,"description":"Free-text label shown beside the number, sent verbatim.","example":"Mobile"}}},"WhatsAppContactEmailSend":{"type":"object","additionalProperties":false,"description":"One email address to put on a contact card.","required":["email"],"properties":{"email":{"type":"string","minLength":1,"maxLength":254,"example":"barbara@example.com"},"type":{"type":"string","maxLength":64,"description":"Free-text label shown beside the address, sent verbatim.","example":"Work"}}},"WhatsAppContactUrlSend":{"type":"object","additionalProperties":false,"description":"One website to put on a contact card.","required":["url"],"properties":{"url":{"type":"string","minLength":1,"maxLength":2048,"description":"Website address; bare domains accepted without URL validation.","example":"https://luckyshrub.example.com"},"type":{"type":"string","maxLength":64,"description":"Free-text label shown beside the website, sent verbatim.","example":"Company"}}},"WhatsAppContactAddressSend":{"type":"object","additionalProperties":false,"description":"One postal address to put on a contact card.","properties":{"street":{"type":"string","maxLength":128,"example":"1 Lucky Shrub Way"},"city":{"type":"string","maxLength":128,"example":"Menlo Park"},"state":{"type":"string","maxLength":128,"example":"CA"},"zip":{"type":"string","maxLength":128,"example":"94025"},"country":{"type":"string","maxLength":128,"example":"United States"},"country_code":{"type":"string","maxLength":128,"description":"The country as it should appear on the address, commonly the ISO two-letter code.","example":"US"},"type":{"type":"string","maxLength":64,"description":"Free-text label shown beside the address, sent verbatim.","example":"Office"}}},"WhatsAppContactCardSend":{"type":"object","additionalProperties":false,"description":"Contact card with a name and profile details. With a phone number, recipients can message or save it; without one, they can save it.","required":["name"],"properties":{"name":{"allOf":[{"$ref":"#/components/schemas/WhatsAppContactNameSend"}]},"org":{"allOf":[{"$ref":"#/components/schemas/WhatsAppContactOrgSend"}],"description":"Where the contact works."},"birthday":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Valid calendar date in `YYYY-MM-DD` format.","example":"1999-01-23"},"phone_numbers":{"type":"array","maxItems":10,"description":"E.164 numbers get a WhatsApp chat button; other formats get an invite button.","items":{"$ref":"#/components/schemas/WhatsAppContactPhoneSend"}},"emails":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/WhatsAppContactEmailSend"}},"urls":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/WhatsAppContactUrlSend"}},"addresses":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/WhatsAppContactAddressSend"}}},"example":{"name":{"formatted_name":"Barbara J. Johnson","first_name":"Barbara","last_name":"Johnson"},"phone_numbers":[{"phone_number":"+16505551234","type":"Mobile"}]}},"WhatsAppMessageSendRequest":{"type":"object","additionalProperties":false,"description":"A WhatsApp message to send, carrying exactly one kind of content.\n","required":["to"],"properties":{"to":{"type":"string","minLength":1,"description":"Recipient E.164 number, business-scoped user ID (BSUID, such as `US.13491208655302741918`), or group ID (such as `wag_01krdgeqcxet5s7t44vh8rt9mg`). OTP templates require a phone number. For replies, use the inbound sender identity and receiving business number.","example":"+14155550100"},"from":{"type":"string","minLength":1,"description":"Connected E.164 number owned by this workspace; for authored templates, use the same WhatsApp Business Account. Omit for Bird-managed templates and groups; required otherwise.","example":"+13124495648"},"template":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateSend"}],"description":"Required outside the customer service window. Groups accept workspace-authored, non-authentication templates only."},"text":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTextSend"}],"description":"Free-form text; requires an open customer service window."},"image":{"allOf":[{"$ref":"#/components/schemas/WhatsAppImageSend"}],"description":"Free-form image; requires an open customer service window."},"video":{"allOf":[{"$ref":"#/components/schemas/WhatsAppVideoSend"}],"description":"Free-form video; requires an open customer service window."},"audio":{"allOf":[{"$ref":"#/components/schemas/WhatsAppAudioSend"}],"description":"Free-form audio; requires an open customer service window."},"sticker":{"allOf":[{"$ref":"#/components/schemas/WhatsAppStickerSend"}],"description":"Free-form sticker; requires an open customer service window."},"document":{"allOf":[{"$ref":"#/components/schemas/WhatsAppDocumentSend"}],"description":"Free-form document; requires an open customer service window."},"location":{"allOf":[{"$ref":"#/components/schemas/WhatsAppLocationSend"}],"description":"Free-form location; requires an open customer service window."},"interactive":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveSend"}],"description":"Reply buttons, a list, a link button, media cards, or a location/contact request. Requires an open customer service window; unsupported for groups."},"contact_cards":{"type":"array","minItems":1,"maxItems":5,"description":"Up to five cards. Each name needs `formatted_name` and another name part. Requires an open customer service window.","items":{"$ref":"#/components/schemas/WhatsAppContactCardSend"}},"in_reply_to_message_id":{"allOf":[{"$ref":"#/components/schemas/WhatsAppMessageID"}],"description":"Message to quote, from this conversation (`to` and `from`) within the last 15 days.","example":"wam_01kya19eknftrs2s6p82asmvnh"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"},"maxItems":20,"description":"Up to 20 `{name, value}` labels, filterable by name. Use for low-cardinality dimensions such as category; put other context in `metadata`."},"metadata":{"type":"object","additionalProperties":true,"description":"Per-message JSON context, such as internal IDs, returned on reads. Maximum 2 KB serialized. Use `tags` for filterable labels."},"reference":{"allOf":[{"$ref":"#/components/schemas/MessageReference"}],"description":"Identifier matched exactly by the message list's `reference` filter; returned on reads and webhooks. May be shared by multiple messages. Put non-searchable context in `metadata`."}},"example":{"to":"+15551234567","template":{"slug":"bird_otp","language":"en","parameters":{"code":"123456"}}}},"WhatsAppReadReceiptRequest":{"type":"object","additionalProperties":false,"description":"What to acknowledge on the inbound message. An absent body and `{}` mean the same thing: mark the message read and show nothing.\n","properties":{"typing_indicator":{"type":"boolean","default":false,"example":true,"description":"Show a typing indicator to the contact as well as marking the message read. WhatsApp clears it when you send your next message, or after 25 seconds, whichever comes first. Only ask for one if you are about to reply.\n"}}},"WhatsAppReadReceipt":{"type":"object","additionalProperties":false,"required":["typing_indicator"],"description":"The acknowledgement Bird accepted. There is no status to poll afterwards: WhatsApp reports nothing about a read receipt.\n","properties":{"typing_indicator":{"type":"boolean","description":"Whether a typing indicator was requested alongside the read receipt.","example":true}}},"WhatsAppEventType":{"type":"string","minLength":1,"description":"Message timeline event type:\n\n- `whatsapp.accepted`: The API accepted the request.\n- `whatsapp.sent`: The message reached the WhatsApp network.\n- `whatsapp.delivered`: Delivery to the recipient's device was confirmed.\n- `whatsapp.read`: The message was read. On an outbound message the recipient\n  opened it; on an inbound one Bird acknowledged it to WhatsApp for the\n  business, which is what a read receipt records.\n- `whatsapp.failed`: Delivery failed permanently.\n- `whatsapp.rejected`: The message was refused before sending and not charged.\n- `whatsapp.received`: An inbound message arrived from the contact.\n\nThis is an open enum. Accept unrecognized values.\n","x-extensible-enum":["whatsapp.accepted","whatsapp.delivered","whatsapp.failed","whatsapp.read","whatsapp.received","whatsapp.rejected","whatsapp.sent"],"example":"whatsapp.delivered"},"WhatsAppEventID":{"type":"string","minLength":1,"pattern":"^ev_[0-9a-hjkmnp-tv-z]{26}$","example":"ev_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppEvent":{"type":"object","additionalProperties":false,"required":["id","type","occurred_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/WhatsAppEventID","description":"ID of the event, unique within the message's timeline."},"type":{"$ref":"#/components/schemas/WhatsAppEventType","readOnly":true},"occurred_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When this event occurred."},"recipient":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppAddress"}],"description":"The participant this confirmation is about, on a group message. Present only on `whatsapp.delivered` and `whatsapp.read`, the two events a group send fans out: one per participant, so a group of eight produces up to eight of each. The rest describe the message as a whole and carry no recipient, because there is one hand-off to the WhatsApp network and one way for that to be refused. Absent on a one-to-one message, whose `to` already names its recipient. Never carries `group_id`: the group belongs to the message's `to`, not to a participant.\n"},"error":{"$ref":"#/components/schemas/WhatsAppError","description":"Failure detail. Present only on `whatsapp.failed` and `whatsapp.rejected` events."}}},"WhatsAppEventList":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","description":"Timeline events for this WhatsApp message, in chronological order. The timeline is bounded and returned in full; this list is not paginated.","items":{"$ref":"#/components/schemas/WhatsAppEvent"}}}},"WhatsAppReactionUpsert":{"type":"object","additionalProperties":false,"required":["emoji"],"properties":{"emoji":{"type":"string","minLength":1,"maxLength":64,"description":"The emoji to place, as the character itself. Replaces your existing reaction on this message if you have one. To take a reaction back entirely, delete it rather than sending an empty value. WhatsApp takes exactly one emoji, so a value carrying more than one is refused with a `422` rather than sent. The length cap is generous because a single joined emoji is many code points: a couple-kissing one carrying two skin tones is ten, which is why the cap alone cannot express the limit.\n","example":"👍"}}},"WhatsAppReactionEventID":{"type":"string","minLength":1,"pattern":"^war_[0-9a-hjkmnp-tv-z]{26}$","example":"war_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppReactionAccepted":{"type":"object","additionalProperties":false,"readOnly":true,"required":["id","emoji"],"description":"A reaction as accepted, which WhatsApp has not applied yet and may still refuse. It names the reaction-log entry the request created, so a caller that places two changes on one message can tell which entry is which; read the message's `reactions` for what currently stands, or its reaction log for what became of this one.\n","properties":{"id":{"$ref":"#/components/schemas/WhatsAppReactionEventID","description":"ID of the reaction-log entry this request created, matching the `id` that entry carries in [List reaction events for a WhatsApp message](/docs/api/reference/list-whatsapp-message-reaction-events).\n"},"emoji":{"type":"string","minLength":1,"description":"The emoji as accepted, echoing the one the request carried.","example":"👍"}}},"WhatsAppReactionEventStatus":{"type":"string","minLength":1,"enum":["received","sent","failed","rejected"],"description":"What became of one reaction change:\n\n- `received` means the contact placed or removed the reaction and WhatsApp\n  told us about it. Every inbound entry carries this.\n- `sent` means your reaction reached WhatsApp. Reactions have no delivery or\n  read receipt, so this is as far as an outbound entry gets.\n- `failed` means WhatsApp refused it. `error` says why, most often because the\n  contact deleted the message. The grounds we can check for ourselves (a\n  message you sent, one that is itself a reaction, one over 30 days old) are\n  refused when you ask, so they do not reach here.\n- `rejected` means we refused it before it reached WhatsApp, so nothing was\n  sent. `error` says why.\n\nOnly `received` and `sent` entries change what stands on the message, so those\nare the ones the message's `reactions` are folded from.\n","example":"received"},"WhatsAppReactionEvent":{"type":"object","additionalProperties":false,"required":["id","emoji","status","from","occurred_at"],"description":"One change to a reaction on a message: a reaction placed, replaced by a different emoji, or taken back. Entries are never edited, so a sender who reacts twice and then removes it leaves three of them.\n","properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/WhatsAppReactionEventID","description":"ID of this entry, unique within the message's reaction log."},"emoji":{"type":["string","null"],"readOnly":true,"description":"The emoji this entry placed, as WhatsApp sent it and not normalized. Null when the entry took a reaction back rather than placing one. Always present, so null is the removal itself rather than a value we are missing.\n","example":"👍"},"status":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppReactionEventStatus"}]},"from":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppAddress"}],"description":"Who made the change. Your business number on a reaction you placed, the contact on one they placed.\n"},"error":{"readOnly":true,"$ref":"#/components/schemas/WhatsAppError","description":"Why the change did not take effect. Always carried by a `failed` or `rejected` entry, and never by any other, so a failure always says what went wrong. Absent rather than null on the entries that did take effect. The schema leaves it optional because that is a conditional the generators do not express. `code` is drawn from the vocabulary a message send shares, less its two billing codes: a reaction is never charged, so neither `insufficient_balance` nor `price_not_found` appears here.\n"},"occurred_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the change was made.","example":"2026-08-28T19:01:10Z"}}},"WhatsAppReactionEventList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Changes to this message's reactions, newest first.","items":{"$ref":"#/components/schemas/WhatsAppReactionEvent"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"ConversationInboxStatus":{"type":"string","minLength":4,"maxLength":8,"enum":["open","resolved"],"description":"Whether the conversation needs attention in the workspace inbox. Set it to `resolved` when the work is finished. A new inbound message reopens the same conversation. Changing inbox status preserves message history and does not change the channel's permission to send messages or mark messages read."},"WhatsAppConversationControl":{"type":"string","minLength":1,"x-extensible-enum":["bird","meta_business_agent"],"description":"Who is in charge of answering the contact's inbound messages. This is a separate question from a message's `origin`, which says where that message came from.\n\n- `meta_business_agent`: the Meta Business Agent on this number answers them.\n- `bird`: your workspace answers them through Bird, and the agent stays silent until you release the conversation.\n\nA message your workspace sends also gives your workspace control.\n","example":"bird"},"WhatsAppConversationServiceWindowStatus":{"type":"string","minLength":1,"enum":["open","closed"],"description":"Whether the customer-service window is open right now.\n\n- `open`: the contact wrote within the last 24 hours, so free-form messages are accepted.\n- `closed`: the window has passed, or the contact has never written, so only a template can be sent.\n","example":"open"},"WhatsAppConversationID":{"type":"string","minLength":1,"pattern":"^wacv_[0-9a-hjkmnp-tv-z]{26}$","example":"wacv_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppConversationRecipient":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The contact or group on the other side of this conversation. Profile fields are null when unknown and on group conversations.","required":["bsuid","phone_number","display_name","username"],"properties":{"bsuid":{"type":["string","null"],"minLength":1,"description":"Meta's business-scoped user ID for the contact, or null when unknown.","example":"US.13491208655302741918"},"phone_number":{"type":["string","null"],"minLength":1,"description":"Contact phone number in E.164 format, or null when unknown.","example":"+15550001111"},"display_name":{"type":["string","null"],"minLength":1,"description":"Display name from the contact's WhatsApp profile, or null when none has been recorded."},"username":{"type":["string","null"],"minLength":1,"description":"Contact's WhatsApp username without a leading `@`, or null when none has been recorded. Messages cannot be addressed by username."},"group_id":{"$ref":"#/components/schemas/WhatsAppGroupID","description":"Group this conversation belongs to. Omitted for a conversation with one contact."}},"example":{"bsuid":"US.13491208655302741918","phone_number":"+15550001111","display_name":"Jamie Rivera","username":"jamierivera"}},"WhatsAppConversationServiceWindow":{"type":"object","additionalProperties":false,"readOnly":true,"required":["status","ends_at"],"description":"The 24-hour customer-service window, measured from the most recent message this contact sent. Free-form messages are accepted while it is open; once it closes, only a template can start the conversation again.\n\nThis is what Bird observed, not a promise about what WhatsApp will accept: a message Bird never received leaves the window looking shorter than it is, and WhatsApp decides each send on its own.\n","properties":{"status":{"$ref":"#/components/schemas/WhatsAppConversationServiceWindowStatus"},"ends_at":{"type":["string","null"],"format":"date-time","description":"When the window closes, or closed. Null when no inbound message has been recorded, in which case `status` is `closed`.","example":"2026-09-23T10:35:00Z"}}},"WhatsAppConversationLastMessage":{"type":"object","readOnly":true,"additionalProperties":false,"description":"A pointer to the most recent message in this conversation, in either direction. It names the message rather than copying it: read the message itself, with its content and delivery status, through the conversation's message list.\n","required":["id","direction","created_at"],"properties":{"id":{"$ref":"#/components/schemas/WhatsAppMessageID","description":"ID of the message."},"direction":{"$ref":"#/components/schemas/MessageDirection","description":"`inbound` for a message received from the contact, `outbound` for one your workspace or the agent sent."},"created_at":{"type":"string","format":"date-time","minLength":1,"description":"The message's `created_at`: when it was accepted (outbound) or received (inbound). The conversation list is ordered by it. It only moves forward: a message that arrives late and belongs earlier in the conversation does not pull it back.\n"}}},"ConversationLabels":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[^,\\s\\x00-\\x1F\\x7F-\\x9F](?:[^,\\x00-\\x1F\\x7F-\\x9F]*[^,\\s\\x00-\\x1F\\x7F-\\x9F])?$"},"uniqueItems":true,"description":"Workspace labels on this conversation. Labels do not change read state or inbox status.","example":["billing","vip"]},"WhatsAppConversation":{"description":"One WhatsApp conversation between a number you have connected and a single contact, or a group it belongs to. It holds who answers the conversation right now, its read state and labels, when its service window closes, and the most recent message. Resolving the inbox work preserves the conversation's ID and history. A new inbound message reopens it. Messages are retained for 30 days, and the conversation is deleted when its last message expires.\n","type":"object","additionalProperties":false,"readOnly":true,"required":["id","business_phone_number","recipient","control","inbox_status","assigned_to","last_message","service_window","unread_count","labels","created_at","updated_at"],"properties":{"id":{"$ref":"#/components/schemas/WhatsAppConversationID","description":"Conversation ID."},"business_phone_number":{"type":["string","null"],"minLength":1,"description":"Your WhatsApp business phone number this conversation runs on, in E.164 format. It stays the same when you remove the number and connect it again. Null when Bird holds no phone number for it.\n","example":"+15550001234"},"recipient":{"allOf":[{"$ref":"#/components/schemas/WhatsAppConversationRecipient"}],"description":"The other side of the conversation: the contact, or the group it takes place in. A group conversation carries `group_id` and null contact identity fields.\n"},"inbox_status":{"$ref":"#/components/schemas/ConversationInboxStatus"},"control":{"allOf":[{"$ref":"#/components/schemas/WhatsAppConversationControl"}],"description":"Who answers this conversation right now. You take and release control in the dashboard inbox."},"assigned_to":{"oneOf":[{"$ref":"#/components/schemas/UserID"},{"type":"null"}],"description":"The user this conversation is assigned to. Null when unassigned. Assignment is not rechecked against workspace membership on read, so it can still name a user whose access was removed.\n"},"service_window":{"oneOf":[{"$ref":"#/components/schemas/WhatsAppConversationServiceWindow"},{"type":"null"}],"description":"Customer-service window for a contact. Null for group conversations."},"last_message":{"oneOf":[{"$ref":"#/components/schemas/WhatsAppConversationLastMessage"},{"type":"null"}],"description":"A pointer to the most recent message in this conversation. It names the message; read its content through the conversation's message list. Null when the conversation has no message yet.\n"},"unread_count":{"type":"integer","minimum":0,"description":"Number of inbound messages the workspace has not acknowledged. Shared across the workspace. Sending a reply does not mark messages read.\n"},"labels":{"$ref":"#/components/schemas/ConversationLabels"},"created_at":{"type":"string","format":"date-time","minLength":1,"description":"When Bird opened this conversation."},"updated_at":{"type":"string","format":"date-time","minLength":1,"description":"When this conversation last changed."}}},"WhatsAppConversationList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"A page of conversations, most recently active first.","items":{"$ref":"#/components/schemas/WhatsAppConversation"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"_ConversationUpdate":{"type":"object","properties":{"assigned_to":{"type":["string","null"],"pattern":"^(me|usr_[0-9a-hjkmnp-tv-z]{26})$","description":"User to assign this conversation to. Pass a workspace member's user ID, `me` for the signed-in user, or null to unassign it. An API key cannot use `me` and receives a `422` response.","example":"me"},"inbox_status":{"$ref":"#/components/schemas/ConversationInboxStatus"},"labels":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[^,\\s\\x00-\\x1F\\x7F-\\x9F](?:[^,\\x00-\\x1F\\x7F-\\x9F]*[^,\\s\\x00-\\x1F\\x7F-\\x9F])?$"},"maxItems":20,"uniqueItems":true,"description":"Labels from your workspace's label list. On update, this replaces the full set; pass an empty array to clear every label. Labels do not change read state or inbox status.\n\nA name matches the workspace's labels in any casing: adding \"Urgent\" where the workspace has \"urgent\" applies \"urgent\", and responses return the workspace's spelling. A name the workspace doesn't have yet becomes a new label. It must contain 1 to 64 characters, with no commas, control characters, or leading or trailing whitespace, and can't take the workspace past its limit of 100 labels. A new label can't use a reserved name: `all`, `archive`, `archived`, `assigned`, `blocked`, `closed`, `deleted`, `draft`, `drafts`, `flagged`, `important`, `inbox`, `junk`, `muted`, `none`, `open`, `outbox`, `pinned`, `read`, `scheduled`, `sent`, `snoozed`, `spam`, `starred`, `trash` or `unread`, in any casing. A label the workspace already has keeps working even if its name is reserved.\n","example":["billing","vip"]},"read":{"type":"string","format":"date-time","description":"Mark received inbound messages with created_at at or before this timestamp as read in the shared workspace inbox. Messages sharing the timestamp are included together. Later arrivals remain unread until another read update. This does not send a read receipt to the customer or change inbox status. Omit to leave read state unchanged."}}},"WhatsAppConversationUpdateRequest":{"description":"Changes to apply to a conversation. Every field is optional; omit one to leave it unchanged. Control moves in the dashboard inbox instead, because WhatsApp has to accept that change and can refuse it.\n","allOf":[{"$ref":"#/components/schemas/_ConversationUpdate"}],"unevaluatedProperties":false},"WhatsAppConversationEventType":{"type":"string","minLength":1,"description":"Type of conversation event. `whatsapp_conversation.control_changed` records the conversation moving between the Meta Business Agent and your application, `whatsapp_conversation.assigned` records it being assigned, reassigned or unassigned, and `whatsapp_conversation.agent_notified` records a notification sent to the agent about this contact. Open enum: new event types may be added over time, so treat any unrecognized value as a future event rather than an error. The values below are the types known at this version.","x-extensible-enum":["whatsapp_conversation.control_changed","whatsapp_conversation.assigned","whatsapp_conversation.agent_notified"],"example":"whatsapp_conversation.control_changed"},"WhatsAppConversationEventID":{"type":"string","minLength":1,"pattern":"^wace_[0-9a-hjkmnp-tv-z]{26}$","example":"wace_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppConversationEvent":{"type":"object","additionalProperties":false,"readOnly":true,"required":["id","type","summary","metadata","created_at"],"properties":{"id":{"$ref":"#/components/schemas/WhatsAppConversationEventID","description":"Event ID."},"type":{"$ref":"#/components/schemas/WhatsAppConversationEventType"},"summary":{"type":"string","minLength":1,"description":"Human-readable summary of what happened.","example":"Handed to your application by the agent."},"metadata":{"type":"object","description":"Structured details for the event. `from` and `to` carry the values that changed: the holder (`meta_business_agent` or `bird`) for a control change, the assigned user ID for an assignment, null for no assignee. A control change also carries the `initiator` and, when one was left, the `reason`. An assignment carries `assigned_by`, the actor who made it. An agent notification carries the `agent_notification_id` and its `name`.","additionalProperties":true,"example":{"from":"meta_business_agent","to":"bird","initiator":"meta_business_agent","reason":"Customer asked for a person"}},"created_at":{"type":"string","format":"date-time","minLength":1,"description":"When the event happened."}}},"WhatsAppConversationEventList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of conversation events, newest first.","items":{"$ref":"#/components/schemas/WhatsAppConversationEvent"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"WhatsAppGroupSortField":{"type":"string","enum":["created_at"],"default":"created_at","description":"Sortable fields for a WhatsApp group list."},"WhatsAppGroupStatus":{"type":"string","minLength":1,"enum":["pending","active","suspended","deleted","failed"],"description":"Where the group stands. Values, in lifecycle order:\n\n- `pending` means the request to create the group has been accepted and WhatsApp has not confirmed it yet. The group has no invite link, and it cannot be messaged or changed.\n- `active` means the group exists at WhatsApp and carries an invite link. Only an active group can be messaged.\n- `suspended` means WhatsApp has stopped activity in the group, which it does when a group breaks its policies. Sends fail while it lasts, and WhatsApp can lift it on its own.\n- `deleted` means the group is gone, either because you deleted it or because WhatsApp removed it. Every participant lost access, and the state is terminal.\n- `failed` means WhatsApp refused to create the group; `last_operation.last_error` says why. The state is terminal, so create another group rather than retrying this one.\n","example":"active"},"WhatsAppGroupJoinApprovalMode":{"type":"string","minLength":1,"enum":["auto_approve","approval_required"],"description":"How someone opening the invite link gets in:\n\n- `auto_approve` means they join the moment they open the link. This is the default when the group is created.\n- `approval_required` means opening the link raises a join request you approve or reject.\n\nFixed when the group is created.\n","example":"auto_approve"},"WhatsAppGroupOperationType":{"type":"string","minLength":1,"enum":["create","settings_update","delete","remove"],"description":"What was asked of the thing carrying the operation:\n\n- `create` and `delete` act on the group itself.\n- `settings_update` changes the group's subject, description or picture.\n- `remove` takes one participant out of the group.\n","example":"settings_update"},"WhatsAppGroupOperationStatus":{"type":"string","minLength":1,"enum":["pending","success","failed"],"description":"How the operation ended:\n\n- `pending` means WhatsApp accepted the request and has not reported back. Another\n  operation on the same thing is refused while this lasts.\n- `success` means WhatsApp applied everything asked of it. A change whose success\n  removes its own carrier is never seen in this state: a removed participant and an\n  unpinned message leave their lists, and the entry going away is the confirmation.\n- `failed` means WhatsApp applied none of it, or only part: `last_error` says why,\n  and on a `settings_update` the per-field `results` say which fields did apply.\n","example":"pending"},"WhatsAppGroupOperationField":{"type":"string","minLength":1,"enum":["subject","description","profile_picture_url"],"description":"Which of the group's settings a `settings_update` result reports on.","example":"subject"},"WhatsAppGroupError":{"type":"object","additionalProperties":false,"readOnly":true,"required":["description"],"description":"Why a change to a group did not take effect. Meta documents no code vocabulary for a group refusal, since every sample payload carries an undocumented `code` beside its message, so this relays what it said rather than classifying it, the way a template submission failure does.\n","properties":{"description":{"type":"string","minLength":1,"readOnly":true,"description":"WhatsApp's own explanation of the refusal, passed through. Show it to the person who asked for the change; never match on its text. Carries Bird's own words instead when the failure was Bird's verdict, such as a confirmation that never arrived.\n","example":"Group subject contains content that cannot be used."},"meta_error_code":{"type":["string","null"],"readOnly":true,"description":"WhatsApp's most specific code for the refusal: its error subcode where it sent one, otherwise its top-level code. Treat it as an opaque string. Null when the failure was Bird's own verdict rather than a WhatsApp refusal.\n","example":"2388024"}}},"WhatsAppGroupOperationResult":{"type":"object","additionalProperties":false,"required":["field","applied"],"description":"What became of one field in a `settings_update`. WhatsApp applies each field separately, so a single update can leave some applied and others refused.\n","properties":{"field":{"allOf":[{"$ref":"#/components/schemas/WhatsAppGroupOperationField"}],"readOnly":true,"description":"The setting this result reports on."},"applied":{"type":"boolean","readOnly":true,"description":"Whether WhatsApp applied this field. False when it refused this one, whatever it did with the others.","example":false},"error":{"$ref":"#/components/schemas/WhatsAppGroupError","readOnly":true,"description":"Why WhatsApp refused this field. Present only when `applied` is false."}}},"WhatsAppGroupOperation":{"type":"object","additionalProperties":false,"readOnly":true,"required":["type","status","requested_at"],"description":"The last change asked of this group or participant, and where it got to. WhatsApp confirms a change on a webhook rather than in its reply, so an operation is `pending` until that arrives. While it is, another change to the same thing is refused with a `409` `WhatsAppGroupUpdateInProgress`; a change to a different participant is not, so several removals can be in flight at once. Absent on something nothing has been asked of yet.\n","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/WhatsAppGroupOperationType"}],"readOnly":true,"description":"What was asked."},"status":{"allOf":[{"$ref":"#/components/schemas/WhatsAppGroupOperationStatus"}],"readOnly":true,"description":"Where it got to. `pending` is what a client shows as in-progress, and what refuses the next change."},"requested_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When Bird accepted the request.","example":"2026-08-27T14:02:11Z"},"settled_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When WhatsApp reported the outcome. Null while `pending`.","example":"2026-08-27T14:02:14Z"},"results":{"type":"array","readOnly":true,"maxItems":3,"description":"Per-field outcomes, on a `settings_update` that has settled. One entry per field the update carried, so a client can put a refusal next to the input it came from. Absent on every other operation type, which change one thing and report it on `status`.\n","items":{"$ref":"#/components/schemas/WhatsAppGroupOperationResult"}},"last_error":{"$ref":"#/components/schemas/WhatsAppGroupError","readOnly":true,"description":"Why the operation failed as a whole. Present when `status` is `failed`, including when the confirmation never arrived and Bird gave up waiting. A `settings_update` that failed on some fields and not others carries the per-field detail in `results`.\n"}}},"WhatsAppGroupParticipant":{"type":"object","additionalProperties":false,"required":["bsuid"],"description":"Someone who joined the group. The business number that created the group is its admin and is not listed.","properties":{"bsuid":{"type":"string","minLength":1,"readOnly":true,"description":"Business-scoped user ID, Meta's identifier for this person against your business. The one identifier every participant has: WhatsApp always sends it, and it is stable for as long as they are in the group.\n","example":"US.1566655121691972"},"phone_number":{"type":"string","minLength":1,"readOnly":true,"description":"Phone number in E.164 format. Absent when WhatsApp withholds it, which it does for anyone who has not shared their number with your business, so a group is normally a mix of participants with one and without.\n","example":"+16505551234"},"username":{"type":"string","minLength":1,"readOnly":true,"description":"The WhatsApp username this person chose. Absent when they have none, and not an identifier to address them by: it is theirs to change, so it names them in a list rather than keying anything.\n","example":"john.doe"},"last_operation":{"$ref":"#/components/schemas/WhatsAppGroupOperation","readOnly":true,"description":"A removal asked of this participant that has not taken effect: `pending` while WhatsApp has yet to confirm it, or `failed` when WhatsApp refused. Never `success`, because a removal that succeeds takes the participant off this list: the entry disappearing is what says it worked. A `pending` removal refuses a second removal of the same person while leaving other participants free to be removed at the same time.\n"}}},"WhatsAppGroupPinnedMessage":{"type":"object","additionalProperties":false,"description":"A message pinned at the top of a group's chat.","required":["message_id","pinned_until"],"properties":{"message_id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppMessageID"}],"description":"The pinned message, as returned in the send response's `id`."},"pinned_until":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the pin is due to lapse, projected from the `duration_days` the pin was asked for. An entry stays listed until it is unpinned, so a time in the past means WhatsApp has already taken the message off the chat.\n","example":"2026-09-01T09:14:52Z"}}},"WhatsAppGroup":{"allOf":[{"type":"object","description":"A WhatsApp group your business created and administers. People join by opening its invite link, not by being added.\n","required":["id","whatsapp_number_id","waba","subject","status","join_approval_mode","participant_count"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/WhatsAppGroupID"}],"readOnly":true,"description":"Unique identifier for the group. Accepted by every `/v1/whatsapp/groups/{group_id}` operation, and as `to` when sending a message to the group."},"whatsapp_number_id":{"allOf":[{"$ref":"#/components/schemas/WhatsAppNumberID"}],"readOnly":true,"description":"The business number that created the group. It is the group's admin and the number every message to the group is sent from. Fixed when the group is created.\n"},"waba":{"type":["string","null"],"minLength":1,"readOnly":true,"description":"Meta's identifier for the WhatsApp Business Account recorded when the group was created. This is a historical snapshot, not a live account directory projection. Null for a number we operate on your behalf, whose account is not yours to see.\n","example":"102290129340398"},"subject":{"type":"string","minLength":1,"maxLength":128,"description":"The group's name, shown to participants and to anyone who opens the invite link.","example":"New Purchase Inquiry"},"description":{"type":["string","null"],"maxLength":2048,"description":"The group's description, shown alongside the subject. Null when the group has none.","example":"Jim would like to learn about new car purchase options for current year models."},"status":{"allOf":[{"$ref":"#/components/schemas/WhatsAppGroupStatus"}],"readOnly":true,"description":"Where the group stands. A group is messageable only while it is `active`."},"join_approval_mode":{"allOf":[{"$ref":"#/components/schemas/WhatsAppGroupJoinApprovalMode"}],"readOnly":true,"description":"Whether opening the invite link joins the group outright or raises a join request to approve."},"invite_link":{"type":["string","null"],"readOnly":true,"description":"The link that lets someone join the group, which is the only way in. A group has one link at a time. Null while the group is `pending`, since WhatsApp issues the link when it confirms the group. Rotating it through `POST /v1/whatsapp/groups/{group_id}/invite-link/rotate` replaces it, and every link the group had before then stops working.\n","example":"https://chat.whatsapp.com/JZm4S9tCkQx2LpVr7Ny8Ab"},"participants":{"type":"array","readOnly":true,"description":"Who is in the group, as of the last update WhatsApp sent, and the whole set rather than a page: WhatsApp holds a group to a handful of people, so there is never a page's worth to return. The business number that created the group is its admin and is not listed.\n","items":{"$ref":"#/components/schemas/WhatsAppGroupParticipant"}},"participant_count":{"type":"integer","readOnly":true,"minimum":0,"description":"How many people are in the group, excluding your business.","example":6},"pinned_messages":{"type":"array","readOnly":true,"description":"The group's pins, newest first. WhatsApp holds a few at once, and pinning past that unpins the oldest rather than refusing. No entry here is merely requested. An entry stays listed until it is unpinned, so one whose `pinned_until` has passed is still listed after WhatsApp has taken it off the chat.\n","items":{"$ref":"#/components/schemas/WhatsAppGroupPinnedMessage"}},"profile_picture_url":{"type":["string","null"],"readOnly":true,"description":"Address of the group's picture, as WhatsApp serves it. Null when the group has none.","example":"https://media.example.com/whatsapp/groups/JZm4S9tCkQx2.jpg"},"last_operation":{"$ref":"#/components/schemas/WhatsAppGroupOperation","readOnly":true,"description":"The last create, settings change or delete asked of the group. `pending` while WhatsApp has yet to confirm it, which is what a client shows as in-progress and what refuses the next change to the group. A settings change carries per-field `results`, since WhatsApp can refuse one field and apply the others. A removal reports on the participant's own entry rather than here, so several can be in flight at once. Pinning is synchronous and reports nothing.\n"},"suspended_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When WhatsApp suspended the group. Present only while the group is `suspended`, and gone once WhatsApp lifts the suspension.","example":"2026-08-20T11:04:00Z"}}},{"$ref":"#/components/schemas/Timestamps"}]},"WhatsAppGroupList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"The groups your workspace created, newest first.","items":{"$ref":"#/components/schemas/WhatsAppGroup"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"WhatsAppGroupCreate":{"type":"object","additionalProperties":false,"description":"The group to create. WhatsApp issues the invite link, and people join by opening it, so a create request names no participants.\n","required":["whatsapp_number_id","subject"],"properties":{"whatsapp_number_id":{"allOf":[{"$ref":"#/components/schemas/WhatsAppNumberID"}],"description":"The business number that will own and administer the group, as its id in `GET /v1/whatsapp/numbers`. It must be a number your workspace can send from, and WhatsApp must have granted it Official Business Account status; a number without that status returns a `412` `WhatsAppGroupsNotEligible`. The number cannot be changed afterwards, and every message to the group is sent from it.\n"},"subject":{"type":"string","minLength":1,"maxLength":128,"description":"The group's name, shown to participants and to anyone who opens the invite link. Surrounding whitespace is trimmed.","example":"New Purchase Inquiry"},"description":{"type":"string","maxLength":2048,"description":"The group's description, shown alongside the subject.","example":"Jim would like to learn about new car purchase options for current year models."},"join_approval_mode":{"allOf":[{"$ref":"#/components/schemas/WhatsAppGroupJoinApprovalMode"}],"description":"Whether opening the invite link joins the group outright, or raises a join request for you to approve. Defaults to `auto_approve`. It cannot be changed once the group exists.\n"}}},"WhatsAppGroupUpdate":{"type":"object","additionalProperties":false,"description":"The changes to make. Fields you omit are left as they are. WhatsApp applies each field separately, so one can be rejected while the others take effect; the group's `updated_at` moves when a change lands.\n","properties":{"subject":{"type":"string","minLength":1,"maxLength":128,"description":"A new name for the group. Participants see the change in the group's chat.","example":"Watch Enthusiasts"},"description":{"type":["string","null"],"minLength":1,"maxLength":2048,"description":"A new description for the group. Send `null` to clear it; an empty string is a `422` rather than a second way to clear.","example":"Discuss the latest timepieces and share reviews."},"profile_picture_url":{"type":["string","null"],"minLength":1,"description":"A new picture for the group, naming a file in your workspace's media library. WhatsApp takes a square JPEG of at least 192 by 192 pixels and up to 5 MB; anything else returns a `422`. Sending `null` clears the picture Bird stores, and an empty string is a `422` rather than a second way to clear it; WhatsApp has no operation for removing a group's photo, so the one participants see stays until another picture replaces it.\n","example":"https://media.example.com/whatsapp/groups/square.jpg"}}},"WhatsAppGroupInviteLink":{"type":"object","additionalProperties":false,"description":"A group's invite link.","required":["invite_link"],"properties":{"invite_link":{"type":"string","minLength":1,"readOnly":true,"description":"The group's one invite link. Every link the group had before this one stops working.","example":"https://chat.whatsapp.com/JZm4S9tCkQx2LpVr7Ny8Ab"}}},"WhatsAppGroupPinnedMessageCreate":{"type":"object","additionalProperties":false,"description":"A message to pin at the top of the group's chat.","required":["message_id"],"properties":{"message_id":{"allOf":[{"$ref":"#/components/schemas/WhatsAppMessageID"}],"description":"The message to pin. It has to be one this group carries: a message in another group, or a one-to-one message, returns a `422` `WhatsAppMessageNotInGroup`.\n"},"duration_days":{"type":"integer","minimum":1,"maximum":30,"default":7,"description":"How many days the message stays pinned before WhatsApp unpins it, from 1 to 30.","example":7}}},"WhatsAppGroupJoinRequestSortField":{"type":"string","enum":["created_at"],"default":"created_at","description":"Sortable fields for a WhatsApp group join-request list."},"WhatsAppGroupJoinRequestID":{"type":"string","minLength":1,"pattern":"^wgj_[0-9a-hjkmnp-tv-z]{26}$","example":"wgj_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppGroupJoinRequest":{"type":"object","additionalProperties":false,"description":"Someone waiting to be let into a group that requires approval.","required":["id","bsuid","created_at"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/WhatsAppGroupJoinRequestID"}],"readOnly":true,"description":"Unique identifier for the join request. Pass it to the batch-approve and batch-reject operations."},"bsuid":{"type":"string","minLength":1,"readOnly":true,"description":"Business-scoped user ID, Meta's identifier for this person against your business. The one identifier every request has, and the one that carries over to `participants` if you approve it.\n","example":"US.1566655121691972"},"phone_number":{"type":"string","minLength":1,"readOnly":true,"description":"Phone number in E.164 format. Absent when WhatsApp withholds it, which it does for anyone who has not shared their number with your business.\n","example":"+16505551234"},"username":{"type":"string","minLength":1,"readOnly":true,"description":"The WhatsApp username this person chose. Absent when they have none, and theirs to change, so it names them in a list rather than keying anything.\n","example":"john.doe"},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the request was made.","example":"2026-08-24T10:07:57Z"}}},"WhatsAppGroupJoinRequestList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"The join requests still waiting for a decision, oldest first.","items":{"$ref":"#/components/schemas/WhatsAppGroupJoinRequest"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"WhatsAppGroupJoinRequestDecision":{"type":"object","additionalProperties":false,"description":"The join requests to decide on.","required":["join_request_ids"],"properties":{"join_request_ids":{"type":"array","minItems":1,"maxItems":50,"description":"The join requests to act on, as returned by `GET /v1/whatsapp/groups/{group_id}/join-requests`. Each is decided on its own, so one can fail while the rest succeed. An ID that names no waiting request returns a `422` `WhatsAppGroupJoinRequestNotFound`. The 50 is Bird's own request bound, not a WhatsApp one: how many people the group can hold does not limit how many can queue at its link, so a rejection sweep is not held to the size of the group it is refusing entry to.\n","items":{"$ref":"#/components/schemas/WhatsAppGroupJoinRequestID"}}}},"WhatsAppGroupJoinRequestFailure":{"type":"object","additionalProperties":false,"description":"A join request the decision could not be applied to.","required":["join_request_id","error"],"properties":{"join_request_id":{"allOf":[{"$ref":"#/components/schemas/WhatsAppGroupJoinRequestID"}],"readOnly":true,"description":"The join request that was not decided."},"error":{"allOf":[{"$ref":"#/components/schemas/WhatsAppGroupError"}],"readOnly":true,"description":"Why WhatsApp refused. The common one is a person who has not accepted WhatsApp's current terms, which no retry fixes.\n"}}},"WhatsAppGroupJoinRequestDecisionResult":{"type":"object","additionalProperties":false,"description":"What happened to each join request in the batch. WhatsApp decides them one by one, so a batch can be part-applied: the requests it accepted are in `decided`, and the rest are in `failed` with the reason.\n","required":["decided","failed"],"properties":{"decided":{"type":"array","readOnly":true,"description":"The join requests WhatsApp accepted the decision for. A person approved here can enter the group; a person rejected here sees the join button again.","items":{"$ref":"#/components/schemas/WhatsAppGroupJoinRequestID"}},"failed":{"type":"array","readOnly":true,"description":"The join requests WhatsApp refused, each with its reason. Empty when the whole batch was applied.","items":{"$ref":"#/components/schemas/WhatsAppGroupJoinRequestFailure"}}}},"WhatsAppTemplateLanguageStatus":{"type":"string","minLength":1,"x-extensible-enum":["approved","pending","rejected","paused","disabled","in_appeal","pending_deletion","limit_exceeded","archived","deleted","submit_failed"],"description":"Language review and health status:\n\n- `approved`: Passed review and can be sent.\n- `pending`: Awaiting Meta's verdict, with no estimate. This includes a submission Meta has not yet confirmed receiving. Bird cannot speed it up.\n- `rejected`: Failed review.\n- `paused` or `disabled`: Sending is suspended.\n- `in_appeal`: A decision is being appealed.\n- `pending_deletion`: Scheduled for deletion by Meta.\n- `limit_exceeded`: Sending is blocked by a limit.\n- `archived`: Reclaimed after 12 months without use; recoverable for 28 days.\n- `deleted`: Permanently deleted.\n- `submit_failed`: A submission or a deletion did not complete and will not be retried. `error.description` says why, and `error.meta_error_code` is set only where WhatsApp itself refused.\n\nThis is an open enum. Accept unrecognized values.\n"},"WhatsAppTemplateRejectionCategory":{"type":"string","minLength":1,"x-extensible-enum":["abusive_content","incorrect_category","invalid_format","scam","tag_content_mismatch"],"description":"Why Meta refused a language's content, in Meta's own vocabulary, lowercased. Read it with `reason`, which carries Meta's human-written detail, and `recommendation`, which carries its suggested fix. This is an open enum. Accept unrecognized values.\n","example":"invalid_format"},"WhatsAppTemplateRejection":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Why Meta refused a language's content, and what it says about fixing it. Present when `status` is `rejected`.\n","properties":{"category":{"$ref":"#/components/schemas/WhatsAppTemplateRejectionCategory","description":"Meta's own classification of the refusal."},"reason":{"type":["string","null"],"readOnly":true,"description":"Meta's detail about the refusal, passed through unmodified.","example":"Parameters are adjacent."},"recommendation":{"type":["string","null"],"readOnly":true,"description":"Meta's suggested fix, the only thing it says about how to make the content acceptable. Meta sends it for some refusals and not others.\n","example":"Add text between the two parameters."}}},"WhatsAppTemplateSubmissionError":{"type":"object","additionalProperties":false,"readOnly":true,"required":["description"],"description":"Why the submission itself did not complete. Distinct from `rejection`, which is Meta refusing the content it was given.\n","properties":{"description":{"type":"string","minLength":1,"readOnly":true,"description":"Human-readable explanation of why the submission did not complete.","example":"component of type HEADER is missing expected field(s)"},"meta_error_code":{"type":["string","null"],"readOnly":true,"description":"WhatsApp's most specific code for the refusal: its error subcode when it sent one, otherwise its top-level code. Opaque, treat it as a string. Absent when the failure was Bird's own verdict rather than a WhatsApp refusal.\n","example":"2388043"}}},"WhatsAppTemplateLanguageState":{"type":"object","additionalProperties":false,"properties":{"status":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateLanguageStatus"}],"description":"On a template, where this language stands on the version currently in service. On a version, what that version's submission did with this language. Absent on a draft, which has not been submitted.\n"},"submitted_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this language's content was last submitted to Meta. Null on a draft, which has not been submitted, and null for a built-in template's language, shipped already approved rather than submitted on your behalf.\n","example":"2026-07-26T16:40:00Z"},"editable_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"The next time you can edit this language, if Meta's one-edit-per-day limit on an approved language is currently spent. Null when an edit is allowed right now, though Meta also caps an approved language at ten edits per rolling 30 days: a null here does not guarantee an edit will succeed if you are close to that limit too.\n","example":"2026-07-27T16:40:00Z"},"rejection":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateRejection"}],"description":"Why Meta refused this content, present when `status` is `rejected`. Absent otherwise.\n"},"error":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateSubmissionError"}],"description":"Why the submission did not complete. Present when `status` is `submit_failed`. Also present when WhatsApp refused a change to `optimization_spec` or `message_send_ttl_seconds`; the language keeps sending on the maximum price and time-to-live WhatsApp already held. Absent otherwise, including on a rejection, whose reason is in `rejection`.\n"}},"description":"Where one language stands, without its content: content lives under a version, read that for it. An object rather than a bare status string, so detail beyond status can arrive later as a sibling property instead of a breaking change.\n"},"WhatsAppTemplateVersionID":{"type":"string","minLength":1,"pattern":"^wav_[0-9a-hjkmnp-tv-z]{26}$","example":"wav_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppTemplate":{"type":"object","additionalProperties":false,"required":["id","slug","slug_editable","name","scope","description","category","status","default_language","on_missing_language","language_source_required","available_languages","languages","draft_version_id","live_version_id","pending_version_id","last_submitted_at","created_at","updated_at"],"properties":{"id":{"$ref":"#/components/schemas/WhatsAppTemplateID","readOnly":true,"description":"Stable Bird identifier for the template."},"slug":{"example":"bird_otp","allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"readOnly":true,"description":"The template's handle, editable before the first submission. Address it by this handle, and reference it when sending. Handles beginning with `bird_` are reserved for our built-in templates.\n"},"slug_editable":{"type":"boolean","readOnly":true,"description":"Whether the slug can still be changed. False after the first submission and for built-in templates."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"A display name for the template. Nothing resolves through it, so it is safe to show wherever a human reads the template.\n","example":"Order update"},"description":{"type":["string","null"],"maxLength":1000,"description":"What the template is for. Null when unset.","example":"Sent when an order ships."},"scope":{"$ref":"#/components/schemas/TemplateScope"},"waba":{"type":"string","readOnly":true,"description":"The WhatsApp Business Account that holds this template's languages at Meta. Absent on a built-in template: those live on a WABA that Bird manages centrally rather than on your account, so it is not yours to reconcile against and is not disclosed.\n","example":"102290129340398"},"category":{"$ref":"#/components/schemas/WhatsAppTemplateCategory","description":"The category you declared for the template. It is fixed once the template exists. Meta applies its own category per language and may move one, which is what messages are priced at. Read the language for that.\n"},"status":{"$ref":"#/components/schemas/TemplateStatus","description":"The template's lifecycle, aggregated over its languages."},"default_language":{"$ref":"#/components/schemas/LanguageTag","description":"The language a send is served in when it names none, whichever `on_missing_language` is set. A template that sets `language_source_required` refuses such a send instead. Under `fallback` it is also the last hop for a language that is not in `available_languages`, whether the template holds no copy in it or holds one WhatsApp has not approved. The template is required to hold this default, and it must itself be in `available_languages` for a send to resolve here.\n"},"on_missing_language":{"allOf":[{"$ref":"#/components/schemas/TemplateOnMissingLanguage"}],"readOnly":true,"description":"What a send does when the language it asks for has no approved copy. Defaults to `fail` on WhatsApp, because every language is separately approved and separately priced: falling back silently would send content the recipient did not expect at a rate the sender did not choose.\n"},"language_source_required":{"type":"boolean","description":"When true, a send must name a language explicitly rather than letting the template resolve one.\n","example":false},"available_languages":{"type":"array","readOnly":true,"description":"The languages a send can resolve right now: approved and not held back by Meta. It shrinks for reasons you did not cause: Meta pauses, disables, archives or limits a language and it leaves the set with nobody having edited anything. Read `languages` to see which languages exist and why one is missing.\n","items":{"$ref":"#/components/schemas/LanguageTag"}},"languages":{"type":"object","example":{"en":{"status":"approved"}},"readOnly":true,"description":"Where each of the template's languages stands, keyed by BCP-47 language tag. This is the summary of the version currently in service, so a template reading `active` can still hold a rejected or paused language: the aggregate says something is sendable, and this says which. Content is not here; it lives under a version.\n","propertyNames":{"$ref":"#/components/schemas/LanguageTag"},"additionalProperties":{"$ref":"#/components/schemas/WhatsAppTemplateLanguageState"}},"draft_version_id":{"oneOf":[{"$ref":"#/components/schemas/WhatsAppTemplateVersionID"},{"type":"null"}],"readOnly":true,"description":"The open draft, or null when nobody is editing. Non-null is the answer to whether this template has unsubmitted work: a draft exists only because someone opened one.\n"},"live_version_id":{"oneOf":[{"$ref":"#/components/schemas/WhatsAppTemplateVersionID"},{"type":"null"}],"readOnly":true,"description":"The version Meta is serving. A version goes live as a unit the moment any of its languages is approved, superseding the one before it. Null until a first approval.\n"},"pending_version_id":{"oneOf":[{"$ref":"#/components/schemas/WhatsAppTemplateVersionID"},{"type":"null"}],"readOnly":true,"description":"A submitted version still awaiting verdicts: what to poll. It stays set while any language is unresolved, including after a sibling's approval took the version live. Null when nothing is outstanding.\n"},"last_submitted_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this template was last submitted. Null for a pre-approved built-in template.\n","example":"2026-07-26T16:40:00Z"},"created_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was created. Null for a built-in template, which Bird ships rather than stores."},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was last modified. Null for a built-in template, which Bird ships rather than stores."},"next":{"type":"array","readOnly":true,"description":"What to do next with this template, given the state it is in. Each entry names one\naction and says why it is worth taking, so you can act on this response without\nworking out the order yourself. Present on reads that compute it: an empty list\nmeans there is nothing to do, and the field is absent entirely on responses that\ndo not report next actions.\n\nA `draft` template routes to opening its draft, a `pending` one to the version\nunder review, and a `rejected` or `inactive` one to a fresh draft. The template's\n`status` is the aggregate over its languages, so an entry may send you to the\nversion to see where each language actually stands.\n","items":{"$ref":"#/components/schemas/NextAction"}}},"description":"A message template: one identity holding a copy of the message per language. Each language is reviewed, priced and paused by Meta on its own, so the template's own status is an aggregate and the per-language detail is in `languages`. A version contains the content.\n"},"WhatsAppTemplateList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of templates available to your workspace.","items":{"$ref":"#/components/schemas/WhatsAppTemplate"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"WhatsAppTemplateCategoryWrite":{"type":"string","minLength":1,"enum":["authentication","utility","marketing"],"x-enum-varnames":["WhatsAppTemplateCategoryWriteAuthentication","WhatsAppTemplateCategoryWriteUtility","WhatsAppTemplateCategoryWriteMarketing"],"description":"Meta's content classification for a template.\n\n- `authentication`: delivers one-time passcodes.\n- `utility`: delivers transaction-triggered updates (receipts, order status).\n- `marketing`: carries promotional content.\n\nThe category determines what a send costs. Any other value is rejected.\n","example":"utility"},"WhatsAppTemplateLocationBinding":{"type":"object","additionalProperties":false,"required":["latitude","longitude"],"description":"The Liquid that fills a location header, one string per field. Latitude and longitude must render to a number.\n","properties":{"latitude":{"type":"string","description":"Liquid for the latitude, in degrees.","minLength":1,"maxLength":2000,"example":"{{ store_lat }}"},"longitude":{"type":"string","description":"Liquid for the longitude, in degrees.","minLength":1,"maxLength":2000,"example":"{{ store_lng }}"},"name":{"type":"string","description":"Liquid for the location's name.","maxLength":2000,"example":"{{ store_name }}"},"address":{"type":"string","description":"Liquid for the location's address.","maxLength":2000,"example":"{{ store_address }}"}}},"WhatsAppTemplateParameterBindings":{"type":"object","maxProperties":100,"propertyNames":{"type":"string","pattern":"^[a-z0-9_]+$"},"additionalProperties":{"oneOf":[{"type":"string","maxLength":2000},{"$ref":"#/components/schemas/WhatsAppTemplateLocationBinding"}]},"description":"Liquid over the send's `template.parameters`, keyed by the name of the value it fills. A placeholder's name is its own, such as `order_id`, or its number, such as `1`. A value with no placeholder has a fixed name: `header_url` (or `header_url_1`, `header_url_2` and so on for a carousel card), `header_filename`, `header_location` and `code`. A numbered url suffix is `button_url` (or `button_url_1`, `button_url_2` for a card). A value is a Liquid string, except `header_location`'s, which is an object of four. A value no key binds is filled by the input of the same name. Bindings never reach WhatsApp.\n","example":{"full_name":"{{ first_name | append: ' ' | append: last_name }}","header_url":"https://cdn.example.com/inv/{{ order_id }}.pdf"}},"WhatsAppTemplateBidStrategyWrite":{"type":"string","minLength":1,"enum":["lowest_cost_with_bid_cap"],"description":"How Meta bids for each delivery.\n\n- `lowest_cost_with_bid_cap`: Meta delivers at the lowest cost it can find, never above the bid.\n","example":"lowest_cost_with_bid_cap"},"WhatsAppTemplateOptimizationSpecWrite":{"type":"object","additionalProperties":false,"description":"A maximum price for this language's marketing deliveries. Meta charges each delivery a variable amount up to the bid. Only marketing templates accept it.\n","required":["bid_amount","bid_strategy"],"properties":{"bid_amount":{"type":"integer","format":"int32","minimum":1,"maximum":50000,"description":"The maximum price per 1,000 deliveries, in the smallest unit of the account's currency. The reach estimate returns that currency as `currency_code`. 5000 is USD 0.05 per delivery. At most 50000, which is 0.50 per delivery.\n","example":5000},"bid_strategy":{"$ref":"#/components/schemas/WhatsAppTemplateBidStrategyWrite"},"bid_country_multiplier_overrides":{"type":"object","maxProperties":50,"propertyNames":{"pattern":"^[A-Z]{2}$"},"additionalProperties":{"type":"number","format":"double","minimum":0.1,"maximum":2,"description":"At least 0.1 and at most 2."},"description":"Scales the bid for recipients in a country, keyed by ISO 3166-1 alpha-2 code. A country you leave out uses 1. Each write replaces the whole map. `bid_amount` times a country's multiplier must also be at most 50000.\n","example":{"IN":1.2,"MX":0.8}}}},"WhatsAppTemplateComponentTypeWrite":{"type":"string","minLength":1,"enum":["header","body","footer","buttons","carousel"],"x-enum-varnames":["WhatsAppTemplateComponentTypeWriteHeader","WhatsAppTemplateComponentTypeWriteBody","WhatsAppTemplateComponentTypeWriteFooter","WhatsAppTemplateComponentTypeWriteButtons","WhatsAppTemplateComponentTypeWriteCarousel"],"description":"A content block's type. A `body` block is required on every language; `header`, `footer`, `buttons` and `carousel` are optional and appear at most once each. A `carousel` holds the cards a marketing template scrolls through, and is the one block type that nests: its cards carry blocks of their own. Any other value is rejected.\n","example":"body"},"WhatsAppTemplateHeaderFormatWrite":{"type":"string","minLength":1,"enum":["text","image","video","gif","document","location"],"x-enum-varnames":["WhatsAppTemplateHeaderFormatWriteText","WhatsAppTemplateHeaderFormatWriteImage","WhatsAppTemplateHeaderFormatWriteVideo","WhatsAppTemplateHeaderFormatWriteGif","WhatsAppTemplateHeaderFormatWriteDocument","WhatsAppTemplateHeaderFormatWriteLocation"],"description":"A header's kind. The `text` format carries a line of copy. The `image`, `video`, `gif`, and `document` formats each show a file whose address you give in `url`. A `gif` is an MP4 that plays automatically and works only on a marketing template. The `location` format shows a map the recipient can tap to open. It carries no content here because the coordinates belong to the message rather than the template. Any other value is rejected.\n","example":"text"},"WhatsAppTemplateParameterTypeWrite":{"type":"string","minLength":1,"enum":["text","image","video","gif","document"],"x-enum-varnames":["Text","Image","Video","Gif","Document"],"description":"The kind of value a template parameter accepts. `text` is an example filling a `{{n}}` placeholder. The other four are the sample file a media header shows, and each matches its header's `format`. Any other value is rejected.\n","example":"text"},"WhatsAppTemplateExampleParameterWrite":{"type":"object","additionalProperties":false,"required":["type"],"description":"One example value for one variable, as written to a draft.","properties":{"type":{"$ref":"#/components/schemas/WhatsAppTemplateParameterTypeWrite"},"text":{"type":"string","description":"The example value. Send it when `type` is `text`. May be empty on a draft; required before submission.\n","example":"123456"},"url":{"type":"string","maxLength":2000,"description":"The address of the file a media header shows. Send it when `type` is `image`, `video`, `gif` or `document`. We fetch the file when the language is submitted and hand Meta our own copy, so the address only has to be reachable at submission. WhatsApp reviews the template with this file, and the message each recipient receives carries the file named on the send. May be empty on a draft, for a file not yet chosen; a reachable address is required before submission.\n","example":"https://www.example.com/holiday/banner.jpg"},"name":{"type":"string","description":"The named placeholder this example fills. Send it only for a template written against named parameters rather than positional `{{n}}` ones. May be empty on a draft; required before submission.\n","example":"first_name"}}},"WhatsAppTemplateButtonTypeWrite":{"type":"string","minLength":1,"enum":["url","quick_reply","phone_number","otp","copy_code","request_contact_info"],"x-enum-varnames":["WhatsAppTemplateButtonTypeWriteUrl","WhatsAppTemplateButtonTypeWriteQuickReply","WhatsAppTemplateButtonTypeWritePhoneNumber","WhatsAppTemplateButtonTypeWriteOtp","WhatsAppTemplateButtonTypeWriteCopyCode","WhatsAppTemplateButtonTypeWriteRequestContactInfo"],"description":"A button's behavior.\n\n- `url`: opens a link.\n- `quick_reply`: sends its own label back to you as an inbound message.\n- `phone_number`: dials the number it carries.\n- `otp`: copies a one-time passcode. It belongs only on an authentication\n  template, and that template takes no other button type.\n- `copy_code`: copies a coupon code to the recipient's clipboard. It belongs\n  only on a marketing template, which takes at most one.\n- `request_contact_info`: asks the recipient to share the phone number their\n  WhatsApp account carries. It belongs only on a utility or marketing\n  template, as that template's only button.\n\nAny other value is rejected.\n","example":"url"},"WhatsAppTemplateButtonOtpTypeWrite":{"type":"string","minLength":1,"enum":["copy_code"],"description":"How the recipient receives a one-time passcode. `copy_code` puts it on the clipboard.","example":"copy_code"},"WhatsAppTemplateButtonWrite":{"type":"object","additionalProperties":false,"required":["type"],"description":"One button, as written to a draft.","properties":{"type":{"$ref":"#/components/schemas/WhatsAppTemplateButtonTypeWrite"},"otp_type":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateButtonOtpTypeWrite"}],"description":"How the recipient receives the passcode. Send it only on an `otp` button."},"text":{"type":"string","maxLength":25,"description":"The button's label, which each button type treats differently.\n\n- `url`, `quick_reply`, `phone_number`: your own label. Required.\n- `otp`: omit it. WhatsApp writes this label itself and reveals it only\n  once the language has been submitted.\n- `copy_code`: omit it. WhatsApp fixes this label and does not let you\n  change it.\n- `request_contact_info`: omit it. WhatsApp fixes this label too and\n  writes `Share Contact Info`, which is also what a submitted button\n  reads back as, so a read button can be written back unchanged.\n\nA draft takes any label, so this may be empty on a draft and is required\nonly before submission. A label a fixed-label button may not carry is\nrefused rather than silently replaced: the submit comes back as\n`valid: false` with an `errors` entry naming this field, in every\nlanguage.\n","example":"Track order"},"url":{"type":"string","maxLength":2000,"description":"The address a `url` button opens. An address with a placeholder is personalized per recipient, and one without is the same for everyone. At most one variable, and it must sit at the end of the address, written as `{{1}}`. A button address is numbered this way even on a template whose text uses named variables. A variable needs its example value in `example_parameters`. May be empty on a draft; required before submission.\n","example":"https://www.example.com/orders/{{1}}"},"phone_number":{"type":"string","maxLength":20,"description":"The number a `phone_number` button dials, in international format. Some countries publish numbers with a leading zero after the country calling code; WhatsApp strips that zero, so give a number that dials without it. May be empty on a draft; required before submission.\n","example":"+14155550100"},"example_parameters":{"type":"array","description":"The value that fills the variable in `url`, which WhatsApp reviews in the filled address. Send only the value, so a `{{1}}` standing for an order number takes `A-4192`. Required whenever `url` carries a variable. Also required on a `copy_code` button as one `text` entry. The entry carries a sample coupon code of at most 20 characters for WhatsApp to review. Each recipient copies the code you provide when sending the message.\n","items":{"$ref":"#/components/schemas/WhatsAppTemplateExampleParameterWrite"}}}},"WhatsAppTemplateCardComponentTypeWrite":{"type":"string","minLength":1,"enum":["header","body","buttons"],"x-enum-varnames":["WhatsAppTemplateCardComponentTypeWriteHeader","WhatsAppTemplateCardComponentTypeWriteBody","WhatsAppTemplateCardComponentTypeWriteButtons"],"description":"A card block's type. A card carries a `header` showing an image or a video, and optionally a `body` and a `buttons` block. A card has no footer and cannot hold a carousel of its own, which is why a card's blocks are a narrower set than a template's.\n","example":"header"},"WhatsAppTemplateCardHeaderFormatWrite":{"type":"string","minLength":1,"enum":["image","video"],"x-enum-varnames":["WhatsAppTemplateCardHeaderFormatWriteImage","WhatsAppTemplateCardHeaderFormatWriteVideo"],"description":"A card header's kind. A card shows an image or a video only, so a document header works at the top of a template but not on a card.\n","example":"image"},"WhatsAppTemplateCardComponentWrite":{"type":"object","additionalProperties":false,"required":["type"],"description":"One content block inside a carousel card, as written to a draft. A card carries a narrower set of blocks than a template does, so it has its own shape rather than reusing the template's.\n","properties":{"type":{"$ref":"#/components/schemas/WhatsAppTemplateCardComponentTypeWrite"},"format":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateCardHeaderFormatWrite"}],"description":"The card header's kind. Required on a card's `header` block and refused on any other.\n"},"text":{"type":"string","description":"The card block's text, with each variable written as a placeholder. Send it on a `body` block. If any card carries body text then every card must, so the cards keep an even height. May be empty on a draft; required before submission.\n","example":"Chronograph, brown leather"},"example_parameters":{"type":"array","description":"An example value per `{{n}}` in `text`, in placeholder order. Meta reviews the filled message rather than the template, so a block with variables and no examples is refused. A card's `header` block carries its file here as a single entry whose `type` matches the header's `format` and whose `url` addresses the file, the same way a template header does.\n","items":{"$ref":"#/components/schemas/WhatsAppTemplateExampleParameterWrite"}},"buttons":{"type":"array","maxItems":2,"description":"The buttons this card carries, at most two. Send it only on a card's `buttons` block. Every card must carry the same buttons in the same order. A card takes a `quick_reply`, `phone_number` or `url` button; a `copy_code` or `request_contact_info` button belongs on the template itself.\n","items":{"$ref":"#/components/schemas/WhatsAppTemplateButtonWrite"}}}},"WhatsAppTemplateCardWrite":{"type":"object","additionalProperties":false,"description":"One card in a carousel, as written to a draft.","properties":{"components":{"type":"array","maxItems":3,"description":"This card's content blocks, in display order. A card carries a `header` showing an image or a video, and optionally a `body` and a `buttons` block. Every card in the carousel must carry the same blocks, and the same buttons, in the same order, so a card with body text means every card needs body text. May be omitted or empty on a draft; a header block is required before submission.\n","items":{"$ref":"#/components/schemas/WhatsAppTemplateCardComponentWrite"}}}},"WhatsAppTemplateComponentWrite":{"type":"object","additionalProperties":false,"required":["type"],"description":"One content block, as written to a draft.\n","properties":{"type":{"$ref":"#/components/schemas/WhatsAppTemplateComponentTypeWrite"},"format":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateHeaderFormatWrite"}],"description":"The header's kind. Required on a `header` block and refused on any other.\n"},"text":{"type":"string","description":"The block's text, with each variable written as a placeholder. Send it on a `body`, a `footer`, and a `text` header. Four blocks refuse it. A `buttons` block carries text on the buttons themselves. A media or `location` header shows a file or map and has nowhere to put copy. A `carousel` carries text on its cards. For an authentication template's body and footer, WhatsApp writes the copy from the two settings below. May be empty on a draft; required before submission.\n","example":"Your order {{order_id}} has shipped."},"add_security_recommendation":{"type":"boolean","description":"Ends an authentication template's body with WhatsApp's own advice not to share the code. Send it only on an authentication template's body block, whose copy is otherwise WhatsApp's to write.\n"},"code_expiration_minutes":{"type":"integer","description":"How long the passcode stays valid. Send it on an authentication template's footer block and WhatsApp writes the footer stating it; omit the footer block entirely to leave it off. WhatsApp enforces the range it accepts and refuses the submission otherwise.\n","example":60},"example_parameters":{"type":"array","description":"An example value per `{{n}}` in `text`, in placeholder order. Meta reviews the filled message rather than the template, so a block with variables and no examples is refused. A media header also carries its file here as one entry. Its `type` matches the header's `format`, and its `url` addresses the file. A media header has no placeholder, so this entry is the header's own sample rather than a value that fills one.\n","items":{"$ref":"#/components/schemas/WhatsAppTemplateExampleParameterWrite"}},"buttons":{"type":"array","maxItems":10,"description":"The buttons this block carries. Send it only on a `buttons` block. Ten in total, of which at most two open a link and at most one dials a number. Quick replies must sit together rather than being interleaved with the other types, so `Quick reply, Quick reply, Link` is accepted where `Quick reply, Link, Quick reply` is refused. A template with four or more buttons, or one that mixes a quick reply with another type, cannot be opened on WhatsApp's desktop clients, and the recipient is asked to switch to their phone. May be omitted or empty on a draft; at least one button is required before submission.\n","items":{"$ref":"#/components/schemas/WhatsAppTemplateButtonWrite"}},"cards":{"type":"array","maxItems":10,"description":"The cards a `carousel` block scrolls through. Send it only on a `carousel` block, and only on a marketing template. Every card must carry the same blocks in the same order, and a card's header shows an `image` or a `video`. A `document` header works at the top of a template but not on a card. The number of cards is fixed once the language is approved. A template approved with three cards always sends three. Changing the count requires a new template rather than a new version of this one. May be omitted or hold fewer than two on a draft; at least two are required before submission.\n","items":{"$ref":"#/components/schemas/WhatsAppTemplateCardWrite"}}}},"WhatsAppTemplateRevision":{"type":"integer","minimum":1,"description":"A write counter, incremented every time the content it belongs to changes. It sits at 1 on content that has never been written through this API.\n","example":4},"WhatsAppTemplateLanguageUpsert":{"type":"object","additionalProperties":false,"description":"One language's content, as written to a draft.","example":{"components":[{"type":"body","text":"Hello"}]},"properties":{"parameter_bindings":{"oneOf":[{"$ref":"#/components/schemas/WhatsAppTemplateParameterBindings"},{"type":"null"}],"description":"Liquid that computes this language's send values from the send's `template.parameters`. Omit it to keep the current bindings, and send `null` to remove them. Changing only the bindings never needs a new review.\n"},"optimization_spec":{"oneOf":[{"$ref":"#/components/schemas/WhatsAppTemplateOptimizationSpecWrite"},{"type":"null"}],"description":"This language's maximum price. Omit it to keep the current one. A new language written without it uses Meta's standard rate. Send `null` to return to the standard rate. Changing only the price updates Meta without a new review.\n"},"message_send_ttl_seconds":{"type":["integer","null"],"minimum":30,"maximum":1209600,"description":"How long WhatsApp keeps trying to deliver a message from this language, in seconds. WhatsApp drops a message it cannot deliver in that time. Omit it to keep the current value. Send `null` to use WhatsApp's default: 10 minutes for authentication, 30 days for utility and marketing. A new language written without it uses WhatsApp's default. The range depends on the language's `category`: 30 to 900 for authentication, 30 to 43200 for utility, and 43200 to 1209600 for marketing. A value outside 30 to 1209600 fails request validation; one inside it but outside the category's range fails with `WhatsAppTemplateTTLOutOfRange`. On a marketing template, the value applies while the business account's `marketing_messages_onboarding_status` is `onboarded`. Changing only this value updates WhatsApp without a new review.\n","example":600},"components":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/WhatsAppTemplateComponentWrite"},"description":"The template's content blocks for this language. Header, footer and buttons are optional. Every variable needs an example value, which is what Meta reviews against. May be omitted or empty on a draft; a body block is required before the language can be submitted.\n"},"revision":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateRevision"}],"description":"The revision you last read for this language, making the write a compare-and-set: a mismatch is refused with a conflict, leaving an edit you have not seen in place. Omit it for last-write-wins, which is what a single writer wants. Supplying it for a language that does not exist is also refused with a conflict rather than recreating the language. Inside a template's initial languages seed on create, a value here is refused, since no prior revision exists yet to compare against.\n"}}},"WhatsAppTemplateCreate":{"type":"object","additionalProperties":false,"description":"Parameters for creating a WhatsApp template, optionally seeding its first draft.","required":["waba","slug","category","default_language"],"properties":{"waba":{"type":"string","minLength":1,"description":"The WhatsApp Business Account to author this template on. A template belongs to one account at Meta and is reviewed, approved and sent under it, so every create names the account explicitly. It must be an account connected to this workspace.\n","example":"102290129340398"},"slug":{"allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"description":"The template's workspace-unique handle, and what a send references. Editable only before the first submission. The `bird_` prefix is reserved for our built-in templates and is rejected. Meta's own template name is derived from this handle, so the handle itself is validated against the charset Meta accepts.\n","example":"order_update"},"name":{"type":"string","minLength":1,"maxLength":255,"description":"The template's display name, shown wherever the template is listed. Free text, changeable at any time. Defaults to the slug when omitted.\n","example":"Order update"},"description":{"type":"string","maxLength":1000,"description":"What the template is for. Free text.","example":"Sent when a customer's order ships."},"category":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateCategoryWrite"}],"description":"The category Meta reviews the template under. Required, because Meta demands one on every template it holds and it determines what a send costs. There is no default. Meta can recategorize a template after review; the per-language summary reports what it actually holds.\n"},"default_language":{"allOf":[{"$ref":"#/components/schemas/LanguageTag"}],"description":"The language a send uses when it names none, and the last resort when a requested language is unavailable. When `languages` is supplied it must be one of its keys.\n","example":"en"},"on_missing_language":{"allOf":[{"$ref":"#/components/schemas/TemplateOnMissingLanguage"}],"description":"How a send behaves when it asks for a language this template does not carry. Defaults to `fail`: a WhatsApp send that silently fell back would deliver approved copy the recipient did not expect, at a price the sender did not choose.\n"},"language_source_required":{"type":"boolean","default":false,"description":"Whether a send has to name a language. Set it to have a send that names none rejected, leaving the default language for sends that ask for it.\n"},"languages":{"type":"object","maxProperties":25,"propertyNames":{"$ref":"#/components/schemas/LanguageTag"},"additionalProperties":{"$ref":"#/components/schemas/WhatsAppTemplateLanguageUpsert"},"description":"Optional seed for the template's first draft, keyed by BCP-47 language\ntag. Supplying it opens the draft and writes every language in one\ntransaction: any invalid entry fails the whole create, leaving no\ntemplate behind. Tags are canonicalised, so `pt-br` lands as `pt-BR`, and\ntwo keys canonicalising to one tag are rejected.\n\nOmit it to create the template with no draft, and add content later\nthrough the version and language paths. Nothing here reaches Meta:\ncontent is submitted, never created.\n","example":{"en":{"components":[{"type":"body","text":"Your order {{order_id}} has shipped.","example_parameters":[{"type":"text","name":"order_id","text":"A-4192"}]}]}}}}},"WhatsAppTemplateSubmitProblem":{"type":"object","additionalProperties":false,"description":"One problem found while checking a version.","required":["code","message"],"properties":{"language":{"readOnly":true,"description":"The language the problem belongs to, or null when it concerns the version as a whole. Always null in an analysis, which checks one language's unsaved content.\n","oneOf":[{"$ref":"#/components/schemas/LanguageTag"},{"type":"null"}]},"field":{"type":["string","null"],"minLength":1,"readOnly":true,"description":"Where the problem sits inside the language's content, as a dotted path with indexes, or null when it is not about one field. The path is rooted at the language you wrote, so `components[0].text` is the first block's text.\n","example":"components[2].cards[0].components[1].example_parameters[0].url"},"code":{"type":"string","minLength":1,"pattern":"^E\\d{5}$","readOnly":true,"description":"The error code a real submit fails with. Look it up in the error catalog for what to do about it.\n","example":"E15025"},"message":{"type":"string","minLength":1,"readOnly":true,"description":"What is wrong, in a form you can show the author.","example":"A body block needs text."}}},"WhatsAppTemplateUpdate":{"type":"object","additionalProperties":false,"description":"Partial update of a template's metadata and language policies. Only the fields you send are changed; the rest are left as they stand. The slug can change only before the first submission.\n","properties":{"slug":{"allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"description":"A new workspace-unique handle. Editable only before the first submission. After a change, the old slug no longer resolves; the template ID stays the same.\n"},"name":{"type":"string","minLength":1,"maxLength":255,"description":"The template's display name. Editable at any time; it is not what a send references.","example":"Order update"},"description":{"type":["string","null"],"maxLength":1000,"description":"What the template is for. Send `null` to clear it."},"default_language":{"allOf":[{"$ref":"#/components/schemas/LanguageTag"}],"description":"The language a send falls back to, and the one language the template is required to carry. Repointing it at a language the draft does not hold is refused, the same way removing the current default is: add the language first.\n","example":"en"},"on_missing_language":{"allOf":[{"$ref":"#/components/schemas/TemplateOnMissingLanguage"}],"description":"How a send behaves when it asks for a language this template does not carry. Omitting it leaves the template's current setting alone. The `fail` default belongs to a create, and a partial update never reapplies it.\n"},"language_source_required":{"type":"boolean","description":"Whether a send has to name a language."}}},"WhatsAppTemplateVersionSummary":{"type":"object","additionalProperties":false,"required":["id","template_id","languages","submitted_at","created_at"],"properties":{"id":{"$ref":"#/components/schemas/WhatsAppTemplateVersionID","readOnly":true,"description":"Stable Bird identifier for the version."},"template_id":{"$ref":"#/components/schemas/WhatsAppTemplateID","readOnly":true,"description":"The template this version belongs to."},"version_number":{"type":["integer","null"],"minimum":1,"readOnly":true,"description":"The version's sequence number, assigned when it is submitted. Null on a draft, which has not been submitted and has no place in the sequence yet.\n","example":4},"submitted_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this version was submitted to Meta. Null on a draft, which has not been submitted, and null for a built-in template's version, which Bird ships already approved rather than submitting on your behalf.\n","example":"2026-07-20T11:04:00Z"},"variables":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/TemplateVariable"},"description":"The variable slots this version's content fills in from the values you supply when sending. Combined across every language, because languages need not declare the same slots: if the English body uses `first_name` and the French one uses `last_name`, both appear here. A template with named parameters keys them by name; a positional one keys them by their `{{n}}` position, as `1`, `2` and so on. Supply the slots the language you send declares, by these keys in `template.parameters` or through `components`.\n"},"languages":{"type":"object","example":{"en":{"status":"approved"}},"description":"What this version's submission did with each language it holds, keyed by BCP-47 language tag. Content is not here: read the version for that.\n","propertyNames":{"$ref":"#/components/schemas/LanguageTag"},"additionalProperties":{"$ref":"#/components/schemas/WhatsAppTemplateLanguageState"}},"created_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the version was opened. Null for a built-in template's version, which Bird ships rather than stores.\n","example":"2026-07-20T10:31:00Z"},"next":{"type":"array","readOnly":true,"description":"What to do next with this version, given whether it has been submitted. Present on\nreads that compute it: an empty list means there is nothing to do, and the field is\nabsent entirely on responses that do not report next actions.\n\nA version with no `version_number` is the open draft, and routes to writing its\nlanguages and checking it. One that carries a number is frozen, so it routes to\nreading the verdicts it holds. `submitted_at` does not separate the two, because\nit is also null on a built-in template's version.\n","items":{"$ref":"#/components/schemas/NextAction"}}},"description":"One version of a template, without its content. A version holds a full copy of every language it was submitted with. Listing versions therefore names the languages and what became of each without carrying their content. Read a single version for its content. Read its shallow language collection for content hashes.\n"},"WhatsAppTemplateVersionList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of the template's versions, newest first.","items":{"$ref":"#/components/schemas/WhatsAppTemplateVersionSummary"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"WhatsAppTemplateVersionLanguage":{"type":"object","additionalProperties":false,"required":["components"],"properties":{"parameter_bindings":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateParameterBindings"}],"description":"This language's bindings in this version, absent when it has none."},"components":{"type":"array","description":"This language's content in this version, in display order.","items":{"$ref":"#/components/schemas/WhatsAppTemplateComponent"}},"status":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateLanguageStatus"}],"description":"What this submission did with this language. Absent on a draft, which has not been submitted. Whether the language can be sent right now is a different question, answered by the template's `languages` summary.\n"},"rejection":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateRejection"}],"description":"Why Meta refused this content, present when `status` is `rejected`. Absent otherwise.\n"},"error":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateSubmissionError"}],"description":"Why the submission did not complete. Present when `status` is `submit_failed`. Also present when WhatsApp refused a change to `optimization_spec` or `message_send_ttl_seconds`; the language keeps sending on the maximum price and time-to-live WhatsApp already held. Absent otherwise, including on a rejection, whose reason is in `rejection`.\n"}},"description":"One language's content in one version, and what that submission did with it."},"WhatsAppTemplateVersion":{"type":"object","additionalProperties":false,"required":["id","template_id","languages","submitted_at","created_at"],"properties":{"id":{"$ref":"#/components/schemas/WhatsAppTemplateVersionID","readOnly":true,"description":"Stable Bird identifier for the version."},"template_id":{"$ref":"#/components/schemas/WhatsAppTemplateID","readOnly":true,"description":"The template this version belongs to."},"version_number":{"type":["integer","null"],"minimum":1,"readOnly":true,"description":"The version's sequence number, assigned when it is submitted. Null on a draft, which has not been submitted and has no place in the sequence yet.\n","example":4},"submitted_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this version was submitted to Meta. Null on a draft, which has not been submitted, and null for a built-in template's version, which Bird ships already approved rather than submitting on your behalf.\n","example":"2026-07-20T11:04:00Z"},"variables":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/TemplateVariable"},"description":"The variable slots this version's content fills in from the values you supply when sending. Combined across every language, because languages need not declare the same slots: if the English body uses `first_name` and the French one uses `last_name`, both appear here. A template with named parameters keys them by name; a positional one keys them by their `{{n}}` position, as `1`, `2` and so on. Supply the slots the language you send declares, by these keys in `template.parameters` or through `components`.\n"},"languages":{"type":"object","example":{"en":{"status":"approved","components":[{"type":"body","text":"Your verification code is {{1}}.","example_parameters":[{"type":"text","text":"123456"}]}]}},"description":"This version's content, keyed by BCP-47 language tag, with what its submission did with each language.\n","propertyNames":{"$ref":"#/components/schemas/LanguageTag"},"additionalProperties":{"$ref":"#/components/schemas/WhatsAppTemplateVersionLanguage"}},"created_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the version was opened. Null for a built-in template's version, which Bird ships rather than stores.\n","example":"2026-07-20T10:31:00Z"}},"description":"One version of a template: the content of every language it holds, frozen when it was submitted, alongside what Meta made of each. A draft is a version too: a mutable one, with no number and no submission date.\n"},"WhatsAppTemplateEventID":{"type":"string","minLength":1,"pattern":"^wte_[0-9a-hjkmnp-tv-z]{26}$","example":"wte_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppTemplateEvent":{"type":"object","additionalProperties":false,"required":["id","type","language","version_id","summary","metadata","created_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/WhatsAppTemplateEventID","description":"Event ID."},"type":{"type":"string","minLength":1,"description":"Type of template event. `whatsapp_template.status_changed` records a status WhatsApp gave the language. `whatsapp_template.quality_updated` records a change in its quality rating. Open enum: new event types may be added over time, so treat any unrecognized value as a future event rather than an error. The values below are the types known at this version.","x-extensible-enum":["whatsapp_template.status_changed","whatsapp_template.quality_updated"],"example":"whatsapp_template.status_changed"},"language":{"$ref":"#/components/schemas/LanguageTag","description":"Language the event concerns, as a BCP-47 tag.","example":"en-US"},"version_id":{"$ref":"#/components/schemas/WhatsAppTemplateVersionID","description":"Version whose language changed. A pause or a quality change applies to the version that is sending, when one exists, which is not always the newest one."},"summary":{"type":"string","minLength":1,"description":"Human-readable summary of what changed.","example":"Status changed to paused."},"metadata":{"type":"object","description":"Structured details for the event. `from` and `to` carry the values that changed: a language status for `whatsapp_template.status_changed`, or a quality score for `whatsapp_template.quality_updated`. `from` is the value Bird held before the change, and is absent when Bird held none. A change to `rejected` also carries the `rejection`, in the same shape as the language, when WhatsApp gave a reason. A new pause on a language that was already paused has the same `from` and `to`.","additionalProperties":true,"example":{"from":"approved","to":"paused"}},"created_at":{"type":"string","format":"date-time","minLength":1,"description":"When Bird recorded the event.","example":"2026-11-18T14:02:11Z"}}},"WhatsAppTemplateEventList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of template events, newest first.","items":{"$ref":"#/components/schemas/WhatsAppTemplateEvent"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"WhatsAppTemplateDuplicate":{"type":"object","additionalProperties":false,"description":"The account the copy is created on, plus optional overrides. Everything else is inherited from the source.","required":["waba"],"properties":{"waba":{"type":"string","minLength":1,"description":"The WhatsApp Business Account the copy is created on. A template belongs to one account at Meta. Meta reviews, approves, and sends it under that account. The copy therefore names its account rather than taking the source's. A built-in template's account is not one you can submit against. It must be an account connected to this workspace.\n","example":"102290129340398"},"slug":{"allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"description":"The copy's handle. The server assigns one when omitted. A `bird_` slug is rejected, and one already in use is a conflict.\n","example":"acme_order_update"},"name":{"type":"string","minLength":1,"maxLength":255,"description":"The copy's display name. Inherited from the source when omitted."},"include_languages":{"type":"array","items":{"$ref":"#/components/schemas/LanguageTag"},"minItems":1,"maxItems":100,"uniqueItems":true,"description":"The languages the copy carries, when it should carry only some of them. Every entry must be a language the source holds. A copy narrows the set it inherits, it never adds to it. Omitted, the copy takes all of the source's languages.\n","example":["pt-BR","es-ES"]},"default_language":{"allOf":[{"$ref":"#/components/schemas/LanguageTag"}],"description":"The copy's default language, which must be one of the languages the copy carries. Omitted, the copy keeps the source's default when `include_languages` still carries it. Otherwise it takes the first of the copy's languages sorted by canonical tag, which is the order the copy stores them in, not the order `include_languages` listed them.\n","example":"pt-BR"}}},"WhatsAppTemplateSubmit":{"type":"object","additionalProperties":false,"description":"Options for a submit. Every field is optional, so an empty body submits the draft as it stands.\n","properties":{"validate_only":{"type":"boolean","default":false,"description":"Check the draft without submitting it. Every language is checked and every problem reported, but nothing is frozen and nothing is sent to WhatsApp. A clean result does not guarantee WhatsApp approval: WhatsApp offers no way to ask in advance, so it can still refuse a submission these checks passed. Use a different idempotency key for the validation and the submission. Reusing one key with different request bodies is rejected.\n"}},"example":{"validate_only":true}},"WhatsAppTemplateSubmitResult":{"type":"object","additionalProperties":false,"description":"The outcome of a submit. The shape is the same whether the submit was a check or a real one: read `valid` and `version` to see what happened.\n","required":["valid","errors"],"properties":{"valid":{"type":"boolean","readOnly":true,"description":"Whether the version passed every check."},"errors":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/WhatsAppTemplateSubmitProblem"},"description":"Every problem found across every language. One round trip identifies all problems. Empty when `valid` is true.\n"},"version":{"readOnly":true,"description":"The version this submit froze, or null when nothing was frozen: a check run, or a submit that found problems.\n","oneOf":[{"$ref":"#/components/schemas/WhatsAppTemplateVersion"},{"type":"null"}]},"next":{"type":"array","readOnly":true,"description":"What to do next with this outcome. Present on reads that compute it: an empty list\nmeans there is nothing to do, and the field is absent entirely on responses that do\nnot report next actions.\n\nA failed check routes back to the languages that need an edit; a clean one routes to\nthe real submit, and then to polling the template for WhatsApp's verdicts.\n","items":{"$ref":"#/components/schemas/NextAction"}}}},"WhatsAppTemplateLanguageSummary":{"type":"object","additionalProperties":false,"required":["language","revision","content_hash"],"properties":{"language":{"$ref":"#/components/schemas/LanguageTag","description":"The canonical tag this language is addressed by."},"status":{"$ref":"#/components/schemas/WhatsAppTemplateLanguageStatus","description":"What this version's submission did with this language. Absent on a draft."},"revision":{"$ref":"#/components/schemas/WhatsAppTemplateRevision","readOnly":true,"description":"This language's write counter, incremented every time its content changes."},"content_hash":{"type":"string","minLength":1,"readOnly":true,"description":"A hash over the serialized `components` this API surfaces, for telling whether a language differs without fetching it. It is comparable only within one version of this API: adding a field to the component shape changes every hash without the underlying content changing.\n","example":"sha256:9f2c4e1a7b03d85fbc6e29d417a05e8c3b1d9f76a2e4c018d53b7f9a6c2e18d4"},"next":{"type":"array","readOnly":true,"description":"What to do next about this language, given the verdict it carries. Present on reads\nthat compute it: an empty list means there is nothing to do, and the field is absent\nentirely on responses that do not report next actions.\n\nApproval is per language, so this is where a rejection, a pause, or a reclaimed\nlanguage is answered. The template's own next actions cannot say, because they read\nthe aggregate.\n","items":{"$ref":"#/components/schemas/NextAction"}}},"description":"One language of a version without its content. Fetch the language itself for the content.\n"},"WhatsAppTemplateLanguageList":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","description":"Every language this version holds, without content.","items":{"$ref":"#/components/schemas/WhatsAppTemplateLanguageSummary"}}}},"WhatsAppTemplateBidStrategy":{"type":"string","minLength":1,"x-extensible-enum":["lowest_cost_with_bid_cap"],"description":"How Meta bids for each delivery.\n\n- `lowest_cost_with_bid_cap`: Meta delivers at the lowest cost it can find, never above the bid.\n"},"WhatsAppTemplateOptimizationSpec":{"type":"object","additionalProperties":false,"description":"The maximum price for this language's marketing deliveries. Meta charges each delivery a variable amount up to the bid.\n","required":["bid_amount","bid_strategy","bid_country_multiplier_overrides"],"properties":{"bid_amount":{"type":"integer","format":"int32","description":"The maximum price per 1,000 deliveries, in the smallest unit of the account's currency. The reach estimate returns that currency as `currency_code`. 5000 is USD 0.05 per delivery.\n","example":5000},"bid_strategy":{"$ref":"#/components/schemas/WhatsAppTemplateBidStrategy"},"bid_country_multiplier_overrides":{"type":"object","additionalProperties":{"type":"number","format":"double"},"description":"Scales the bid for recipients in a country, keyed by ISO 3166-1 alpha-2 code. A country not listed uses 1. Empty when no country is scaled.\n","example":{"IN":1.2,"MX":0.8}}}},"WhatsAppTemplateContentHash":{"type":"string","minLength":1,"description":"A hash over the serialized `components` this API surfaces, prefixed with the algorithm that produced it (`sha256:`) so the algorithm can change without the field becoming ambiguous. It tells you whether a language differs without transferring its content. Compare hashes only within one version of this API. Adding a field to the component shape changes every hash even when the underlying content is unchanged. Email's field of the same name carries bare hex and predates this form.\n","example":"sha256:9f2c4e1a7b03d85fbc6e29d417a05e8c3b1d9f76a2e4c018d53b7f9a6c2e18d4"},"WhatsAppTemplateQualityScore":{"type":"string","minLength":1,"x-extensible-enum":["green","yellow","red","unknown"],"description":"Meta's quality rating for one language of a template, derived from how recipients respond to messages sent from it. The `red` score is the leading indicator of a pause. Reaching Meta's lowest rating pauses sending from that language for three hours; a second time pauses it for six, and a third disables it. The `unknown` score is a value Meta reports. When Meta has not rated the language, the rating object is absent. This is an open enum. Accept unrecognized values.\n","example":"green"},"WhatsAppTemplateQuality":{"type":"object","additionalProperties":false,"required":["current_score","updated_at"],"properties":{"current_score":{"$ref":"#/components/schemas/WhatsAppTemplateQualityScore","description":"Meta's rating for this language as of `updated_at`."},"previous_score":{"$ref":"#/components/schemas/WhatsAppTemplateQualityScore","description":"The rating this language held before the most recent change. Absent when Meta has rated it only once. Usually differs from `current_score`, but Meta sometimes reports both as the same value, so compare timestamps rather than assuming a transition.\n"},"updated_at":{"type":"string","minLength":1,"format":"date-time","readOnly":true,"description":"When the rating last changed. A re-evaluation that lands on the same rating does not move it, so this answers how long the language has held its current rating.\n","example":"2026-07-26T16:41:00Z"}},"description":"Meta's quality rating for one language, with the rating it moved from and when it moved. Present only once Meta has rated the language, and only on the version currently in service. A superseded version's content carries no rating.\n"},"WhatsAppTemplatePauseReason":{"type":"string","minLength":1,"x-extensible-enum":["first_pause","second_pause","rate_limiting_pause","disabled"],"description":"WhatsApp's label for why it took a language out of service: its `other_info.title`, lowercased. `first_pause` and `second_pause` are the first and second pauses for a low quality rating, which last three and six hours. `rate_limiting_pause` is a pause WhatsApp applied to limit sending. `disabled` means WhatsApp stopped the language from sending after repeated pauses. This is an open enum. Accept unrecognized values.\n","example":"first_pause"},"WhatsAppTemplatePause":{"type":"object","additionalProperties":false,"required":["started_at"],"properties":{"started_at":{"type":"string","minLength":1,"format":"date-time","readOnly":true,"description":"When WhatsApp paused or disabled the language.","example":"2026-07-26T16:41:00Z"},"reason":{"$ref":"#/components/schemas/WhatsAppTemplatePauseReason","readOnly":true,"description":"WhatsApp's label for the pause or disablement. Absent when WhatsApp sent none.\n"},"description":{"type":"string","minLength":1,"readOnly":true,"description":"WhatsApp's explanation of the pause or disablement, passed through unmodified. Absent when WhatsApp sent none.\n","example":"Your WhatsApp message template has been paused."}},"description":"WhatsApp's record of why it paused or disabled one language. Set when WhatsApp pauses or disables the language and removed once the language can send again. Present only on the version currently in service.\n"},"WhatsAppTemplateLanguage":{"type":"object","additionalProperties":false,"required":["language","components","revision","content_hash","submitted_at","updated_at"],"properties":{"parameter_bindings":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateParameterBindings"}],"description":"This language's bindings, absent when it has none."},"optimization_spec":{"oneOf":[{"$ref":"#/components/schemas/WhatsAppTemplateOptimizationSpec"},{"type":"null"}],"description":"This language's maximum price, or `null` when Meta's standard rate applies."},"message_send_ttl_seconds":{"type":["integer","null"],"description":"How long WhatsApp keeps trying to deliver a message from this language, in seconds, or `null` when the language uses WhatsApp's default (10 minutes for authentication, 30 days otherwise).\n","example":600},"language":{"$ref":"#/components/schemas/LanguageTag","description":"The canonical tag this language is addressed by."},"components":{"type":"array","description":"This language's content blocks, in display order, exactly as submitted or as they stand in the draft.","items":{"$ref":"#/components/schemas/WhatsAppTemplateComponent"}},"status":{"$ref":"#/components/schemas/WhatsAppTemplateLanguageStatus","description":"What this submission did with this language. Absent on a draft, which has not been submitted. On a superseded version this is history: how that submission went. It does not report whether the language is sendable now.\n"},"revision":{"$ref":"#/components/schemas/WhatsAppTemplateRevision","readOnly":true,"description":"This language's write counter, incremented every time its content changes. It sits at 1 on content that has never been written through this API, which is every built-in template's language.\n"},"content_hash":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateContentHash"}],"readOnly":true},"category":{"$ref":"#/components/schemas/WhatsAppTemplateCategory","description":"The category Meta is applying to this language, which is what messages from it are priced at. On a draft, the category its next submission goes under.\n"},"previous_category":{"$ref":"#/components/schemas/WhatsAppTemplateCategory","description":"The category this language held before Meta moved it."},"quality":{"$ref":"#/components/schemas/WhatsAppTemplateQuality","description":"Meta's quality rating for this language. Present only on the version currently in service, and only once Meta has rated it.\n"},"pause":{"$ref":"#/components/schemas/WhatsAppTemplatePause","description":"Why WhatsApp paused or disabled this language. Present only on the version currently in service, and only until the language can send again.\n"},"rejection":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateRejection"}],"description":"Why Meta refused this content, present when `status` is `rejected`. Absent otherwise.\n"},"error":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateSubmissionError"}],"description":"Why the submission did not complete. Present when `status` is `submit_failed`. Also present when WhatsApp refused a change to `optimization_spec` or `message_send_ttl_seconds`; the language keeps sending on the maximum price and time-to-live WhatsApp already held. Absent otherwise, including on a rejection, whose reason is in `rejection`.\n"},"submitted_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this content was submitted to Meta. Null on a draft, which has not been submitted, and null for a built-in template's language, which Bird ships already approved rather than submitting on your behalf.\n","example":"2026-07-26T16:40:00Z"},"approved_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When Meta approved this exact content. It is a permanent mark on the content rather than a status, so a later pause or archival does not clear it. Null for a built-in template's language, whose approval predates Bird holding a date for it.\n","example":"2026-07-21T08:15:00Z"},"whatsapp_manager_url":{"type":["string","null"],"format":"uri","readOnly":true,"description":"Opens this language in Meta's WhatsApp Manager, for people with access to the business portfolio. Null until WhatsApp holds the language, which can take a minute after submitting, and null again once WhatsApp has deleted it. Always null for a built-in template's language.\n","example":"https://business.facebook.com/latest/whatsapp_manager/template_details/?asset_id=102290129340398&id=1143800821515747"},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this language last changed. Null for a built-in template's language, which Bird ships rather than stores.\n","example":"2026-07-26T16:41:00Z"},"updated_by":{"oneOf":[{"$ref":"#/components/schemas/UserID"},{"type":"null"}],"readOnly":true,"description":"The workspace member who last wrote this language. Always null for a built-in template's language: nobody in the workspace authored it.\n"}},"description":"One language of one version: its content, what the submission carrying it did with it, and everything Meta holds about it.\n"},"WhatsAppTemplateLanguageSaved":{"type":"object","additionalProperties":false,"description":"What a language write returns, enough to make the next write without re-reading.","required":["language","revision","content_hash","updated_at"],"properties":{"language":{"allOf":[{"$ref":"#/components/schemas/LanguageTag"}],"readOnly":true,"description":"The canonical form of the tag you addressed. Use it in later calls for this language.","example":"pt-BR"},"revision":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateRevision"}],"readOnly":true,"description":"The language's new revision, to pass back on your next write."},"content_hash":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateContentHash"}],"readOnly":true,"description":"A hash over the content as saved, so you can tell whether your next write would change anything without diffing the document.\n"},"updated_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When this language was last written."}}},"WhatsAppTemplateLanguageDiscard":{"type":"object","additionalProperties":false,"description":"Parameters for discarding one language's draft edits. Pass `revision` to guard against overwriting an edit you haven't seen.","properties":{"revision":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateRevision"}],"description":"The revision you last read for this language, making the discard a compare-and-set: a mismatch is refused with a conflict, leaving an edit you have not seen in place. Omit it for last-write-wins, which is what a single writer wants. Supplying it for a language the draft no longer holds is also refused with a conflict rather than recreating the language.\n"}}},"WhatsAppStatsSeriesPeriod":{"type":"object","additionalProperties":false,"description":"The window and bucket grain the response covers, echoed from the request, plus the freshness boundary the data is current to.\n","required":["from","to","grain"],"properties":{"from":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive start of the window. A calendar day (YYYY-MM-DD) on the day grain, an RFC 3339 instant on the hour grain.","example":"2026-05-01"},"to":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive end of the window. A calendar day (YYYY-MM-DD) on the day grain, an RFC 3339 instant on the hour grain.","example":"2026-05-25"},"grain":{"$ref":"#/components/schemas/StatsGrain","readOnly":true},"data_as_of":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"Latest time reflected in the statistics. More recent events might not be included yet. Null when the freshness boundary is unavailable.\n","example":"2026-05-25T14:03:10Z"}}},"WhatsAppStatsResponse":{"type":"object","additionalProperties":false,"description":"Time-series stats payload. `period` echoes the range and bucket grain the server computed against; `data` is one row per bucket in chronological order.\n","required":["period","data"],"properties":{"period":{"$ref":"#/components/schemas/WhatsAppStatsSeriesPeriod"},"data":{"type":"array","readOnly":true,"description":"One row per day or hour in chronological order. Buckets with no activity contain zero counts.","items":{"$ref":"#/components/schemas/WhatsAppStatsPoint"}}}},"WhatsAppTemplateStatsPoint":{"type":"object","additionalProperties":false,"description":"Lifecycle counts, derived rates, engagement and latency for a single WhatsApp template over the requested period.","required":["template_id","delivery","engagement","latency"],"properties":{"template_id":{"allOf":[{"$ref":"#/components/schemas/WhatsAppTemplateID"}],"readOnly":true,"description":"The template these messages were sent from, using the same `id` the WhatsApp template endpoints return. A send that resolved no template does not appear in this breakdown. A template renamed after it was used to send still reports under this one `id`, and a template deleted after sending keeps its row rather than dropping the messages.\n"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppLatencyStats"}]}}},"WhatsAppStatsByTemplateResponse":{"type":"object","additionalProperties":false,"description":"Per-template breakdown for the requested period, ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200).","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/WhatsAppStatsSummaryPeriod","description":"The window the response covers (echoed back), plus `data_as_of`."},"data":{"type":"array","readOnly":true,"description":"Template rows ranked by accepted volume descending.","items":{"$ref":"#/components/schemas/WhatsAppTemplateStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total distinct templates with activity in the period, regardless of `limit`.","example":7}}},"WhatsAppPhoneNumberStatsPoint":{"type":"object","additionalProperties":false,"description":"Lifecycle counts, rates, and engagement for one business phone number over the requested period, including whether the number is shared.","required":["phone_number","shared","delivery","engagement","latency"],"properties":{"phone_number":{"type":"string","minLength":1,"readOnly":true,"description":"The business sender phone number in E.164 form.","example":"+13124495569"},"shared":{"type":"boolean","readOnly":true,"description":"`true` for a shared Bird-managed number; `false` for a number owned by your workspace.\n","example":true},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/WhatsAppLatencyStats"}]}}},"WhatsAppStatsByPhoneNumberResponse":{"type":"object","additionalProperties":false,"description":"Per-phone-number breakdown for the requested period, ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200).","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/WhatsAppStatsSummaryPeriod","description":"The window the response covers (echoed back), plus `data_as_of`."},"data":{"type":"array","readOnly":true,"description":"Phone-number rows ranked by accepted volume descending.","items":{"$ref":"#/components/schemas/WhatsAppPhoneNumberStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total distinct phone numbers with activity in the period, regardless of `limit`.","example":2}}},"WhatsAppInboundStatsResponse":{"type":"object","additionalProperties":false,"description":"Received-message time series. `period` echoes the range the server computed against; `data` is one row per bucket in chronological order.\n","required":["period","data"],"properties":{"period":{"$ref":"#/components/schemas/WhatsAppStatsSeriesPeriod"},"data":{"type":"array","readOnly":true,"description":"One row per bucket (day or hour, matching the request) in the period, in chronological order. Buckets with no activity are included with a count of zero, so the series charts continuously without client-side gap handling.","items":{"$ref":"#/components/schemas/WhatsAppInboundStatsPoint"}}}},"WhatsAppInboundPhoneNumberStatsPoint":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Received-message count for a single business phone number over the requested period.","required":["phone_number","received"],"properties":{"phone_number":{"type":"string","minLength":1,"readOnly":true,"description":"The business phone number that received the messages, in E.164 form.","example":"+13124495569"},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages the number received in the period.","example":182}}},"WhatsAppInboundStatsByPhoneNumberResponse":{"type":"object","additionalProperties":false,"description":"Per-phone-number breakdown of received messages for the requested period, ranked by volume descending and capped at the requested `limit` (default 50, max 200).","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/WhatsAppStatsSummaryPeriod","description":"The window the response covers (echoed back), plus `data_as_of`."},"data":{"type":"array","readOnly":true,"description":"Phone-number rows ranked by received-message volume descending, capped at the requested `limit`. A number with no messages in the period is absent rather than zero-filled, because unlike a time bucket it is not part of a continuous axis.\n","items":{"$ref":"#/components/schemas/WhatsAppInboundPhoneNumberStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total distinct phone numbers with received messages in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.","example":2}}},"WhatsAppAgentNotificationStatus":{"type":"string","minLength":1,"enum":["accepted","success","skipped","failed"],"description":"Where a notification you sent the agent stands. One state is transient and three are final.\n\n- `accepted` means Bird holds the notification: it is on its way to WhatsApp, or WhatsApp is still working on it. Nothing is charged for a notification, unlike a message that reads `accepted`.\n- `success` means the agent acted on it.\n- `skipped` means the agent read it and chose to say nothing; `skipped_reason` says why.\n- `failed` means WhatsApp refused it or reported a failure, or no outcome arrived within a day; `error` says why.\n","example":"success"},"WhatsAppAgentNotificationID":{"type":"string","minLength":1,"pattern":"^waan_[0-9a-hjkmnp-tv-z]{26}$","example":"waan_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppAgentNotificationError":{"type":"object","additionalProperties":false,"readOnly":true,"required":["description","meta_error_code"],"description":"Why a notification sent to the agent failed.","properties":{"description":{"type":"string","minLength":1,"readOnly":true,"description":"WhatsApp's own explanation, passed through: what it said when it refused the notification, or its failure summary once it had worked on it. Show it to the person who sent the notification; never match on its text. Carries Bird's own words instead when the failure was Bird's verdict, such as no outcome arriving within a day.\n","example":"Event payload exceeds the maximum size."},"meta_error_code":{"type":["string","null"],"readOnly":true,"description":"WhatsApp's most specific code when it refused the notification outright: its error subcode where it sent one, otherwise its top-level code. Treat it as an opaque string. Null when WhatsApp took the notification and reported the failure later, which carries no code, and when the failure was Bird's own verdict.\n","example":"100"}}},"WhatsAppAgentNotification":{"type":"object","additionalProperties":false,"description":"A notification you sent the agent about one contact, and what came of it. The agent decides whether to write to the contact about it; that message, if any, shows up on the contact's conversation.\n","required":["id","from","to","name","description","payload","status","created_at"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/WhatsAppAgentNotificationID"}],"readOnly":true,"description":"Unique identifier for the notification."},"from":{"type":"string","minLength":1,"readOnly":true,"description":"The business number whose agent the notification was sent to, in E.164 format.","example":"+13124495648"},"to":{"type":"string","minLength":1,"readOnly":true,"description":"The contact the notification was about, as you addressed it: a phone number in E.164 format, or a business-scoped user ID.\n","example":"+14155551234"},"name":{"type":"string","minLength":1,"maxLength":256,"readOnly":true,"description":"Your own name for what happened, as you sent it.","example":"order_shipped"},"description":{"type":"string","minLength":1,"maxLength":1024,"readOnly":true,"description":"What happened, as you sent it.","example":"Order 88213 left the warehouse and arrives on Thursday."},"payload":{"type":"string","minLength":1,"maxLength":4096,"readOnly":true,"description":"The data you attached, as you sent it.","example":"{\"order_id\":\"88213\",\"carrier\":\"ACME Courier\"}"},"status":{"allOf":[{"$ref":"#/components/schemas/WhatsAppAgentNotificationStatus"}],"readOnly":true,"description":"Where the notification stands. `accepted` from the moment Bird takes it, then one of the three final states once WhatsApp has answered.\n"},"skipped_reason":{"type":"string","minLength":1,"readOnly":true,"description":"WhatsApp's own account of why the agent chose to say nothing, passed through. Present only when `status` is `skipped`. Show it to the person who sent the notification; never match on its text.\n","example":"The contact's conversation is currently held by the business."},"error":{"allOf":[{"$ref":"#/components/schemas/WhatsAppAgentNotificationError"}],"readOnly":true,"description":"Why the notification failed. Present only when `status` is `failed`."},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When Bird accepted the notification.","example":"2026-10-02T08:00:00Z"}}},"WhatsAppAgentNotificationList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"A page of the notifications sent to the agent.","items":{"$ref":"#/components/schemas/WhatsAppAgentNotification"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"WhatsAppAgentNotificationCreate":{"type":"object","additionalProperties":false,"required":["from","to","name","description","payload"],"properties":{"from":{"type":"string","minLength":1,"description":"The business phone number whose agent should act on the notification, in E.164 format (for example `+13124495648`), the same form a message's `from` takes. It must be a number this workspace has connected and that runs an agent.\n","example":"+13124495648"},"to":{"type":"string","minLength":1,"description":"The contact the notification is about: a phone number in E.164 format (for example `+14155551234`), or the contact's business-scoped user ID (for example `US.13491208655302741918`), the same forms a message's `to` accepts. A phone number is normalized before the call reaches WhatsApp, so spacing does not matter. WhatsApp documents a phone number for this call; a business-scoped user ID is passed through as given.\n","example":"+14155551234"},"name":{"type":"string","minLength":1,"maxLength":256,"description":"Your own name for what happened, such as `payment_received` or `order_shipped`. The agent reads it as the kind of thing that happened, so keep one name per kind. WhatsApp calls this the event type.\n","example":"order_shipped"},"description":{"type":"string","minLength":1,"maxLength":1024,"description":"What happened, in a sentence the agent can tell the contact.","example":"Order 88213 left the warehouse and arrives on Thursday."},"payload":{"type":"string","minLength":1,"maxLength":4096,"description":"Details the agent may draw on when it writes to the contact, as one JSON string. WhatsApp passes it to the agent unchanged and does not read it itself.\n","example":"{\"order_id\":\"88213\",\"carrier\":\"ACME Courier\",\"eta\":\"2026-10-02\"}"}},"description":"Something that happened in your systems that the agent should tell the contact about, such as a payment landing or an order shipping. WhatsApp processes it in the background, so read the notification back for what came of it.\n"},"WhatsAppNumberSortField":{"type":"string","enum":["created_at"],"default":"created_at","description":"Sortable fields for a WhatsApp number list."},"WhatsAppNumberList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"The WhatsApp numbers your workspace can send from.","items":{"$ref":"#/components/schemas/WhatsAppNumber"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"NumbersDedicatedAllocationID":{"type":"string","minLength":1,"pattern":"^nda_[0-9a-hjkmnp-tv-z]{26}$","example":"nda_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppNumberEventSortField":{"type":"string","enum":["created_at"],"default":"created_at","description":"Sortable fields for a WhatsApp number's event list."},"WhatsAppNumberEventID":{"type":"string","minLength":1,"pattern":"^wne_[0-9a-hjkmnp-tv-z]{26}$","example":"wne_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppNumberEvent":{"type":"object","additionalProperties":false,"required":["id","type","summary","metadata","created_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/WhatsAppNumberEventID","description":"Event ID."},"type":{"type":"string","minLength":1,"description":"Type of number event. `whatsapp_number.messaging_limit_updated` and `whatsapp_number.profile_name_update` are reported by WhatsApp as they happen; `whatsapp_number.quality_rating_updated` is observed when Bird next reads the number, so it can lag the change by up to an hour. `whatsapp_number.status_changed` records every move of the `status` field on the number itself, whichever side caused it. Open enum: new event types may be added over time, so treat any unrecognized value as a future event rather than an error. The values below are the types known at this version.","x-extensible-enum":["whatsapp_number.created","whatsapp_number.messaging_limit_updated","whatsapp_number.profile_name_update","whatsapp_number.quality_rating_updated","whatsapp_number.status_changed"],"example":"whatsapp_number.quality_rating_updated"},"summary":{"type":"string","minLength":1,"description":"Human-readable summary of what changed.","example":"Quality rating dropped to medium."},"metadata":{"type":"object","description":"Structured details for the event. `from` and `to` carry the values that changed, and `from` is absent when the number had no prior value to report. A status change into `failed` also carries the `reason`; a display-name decision carries `new_display_name`, `decision`, and, when WhatsApp named one for a rejection, `rejection_reason`. For `whatsapp_number.profile_name_update`, `decision: available_without_review` means Meta accepted the requested name without review; `approved` records approval. Older events also used `approved` for acceptance without review, so those historical events cannot establish approval. Read `display_name_status` from `GET /v1/whatsapp/numbers/{number_id}/profile` for the current name's approval. A messaging-limit change also carries the `trigger` WhatsApp named for it, such as `onboarding` or `throughput_upgrade`, when it named one. A `whatsapp_number.created` event carries the `source` the number came from, and its `phone_number` once one is known.","additionalProperties":true},"created_at":{"type":"string","format":"date-time","minLength":1,"description":"When the event was recorded."}}},"WhatsAppNumberEventList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of number events, newest first by default.","items":{"$ref":"#/components/schemas/WhatsAppNumberEvent"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"VoiceNumberID":{"type":"string","minLength":1,"pattern":"^vnu_[0-9a-hjkmnp-tv-z]{26}$","example":"vnu_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppDisplayNameStatus":{"type":"string","description":"Where WhatsApp's review of the display name stands. `available_without_review` means WhatsApp accepted the name without reviewing it; `approved` means the name passed review. `none` means no display name has been submitted yet.","x-extensible-enum":["approved","available_without_review","declined","expired","non_exists","pending_review","none"],"example":"approved"},"WhatsAppUsernameStatus":{"type":"string","description":"Where the username stands with WhatsApp. WhatsApp adds states over time, so a value outside this list can be returned.","x-extensible-enum":["approved","reserved","deleted"],"example":"approved"},"WhatsAppBusinessVertical":{"type":"string","description":"The industry WhatsApp shows on the business profile. WhatsApp adds categories over time, so a value outside this list can be returned.","x-extensible-enum":["other","auto","beauty","apparel","edu","entertain","event_plan","finance","grocery","govt","hotel","health","nonprofit","prof_services","retail","travel","restaurant","alcohol","online_gambling","physical_gambling","otc_drugs"],"example":"retail"},"WhatsAppNumberProfile":{"type":"object","additionalProperties":false,"description":"The business profile WhatsApp shows to people this number messages. It is read from WhatsApp on each request rather than from a stored copy, so it is always current and a WhatsApp outage makes it briefly unavailable.","properties":{"display_name":{"type":"string","readOnly":true,"description":"The name WhatsApp verifies for this number. Once WhatsApp approves it, it appears at the top of a chat with this number; `display_name_status` is what says whether it has. Set when the number was connected, and changed from the dashboard or the CLI, as [WhatsApp phone numbers](/docs/guides/whatsapp/phone-number-setup) explains. This field still returns the current name until a requested change completes.\n","example":"Lucky Shrub"},"display_name_status":{"allOf":[{"$ref":"#/components/schemas/WhatsAppDisplayNameStatus"}],"readOnly":true,"description":"Where WhatsApp's review of the current display name stands. `available_without_review` means the name was accepted without review, and `approved` means it passed review. A virtual +1 555 or +1 711 number still has a daily sending limit while its current name is unapproved. See [virtual-number display name review](/docs/knowledge-base/whatsapp/virtual-numbers#display-name-review).\n"},"new_display_name":{"type":"string","readOnly":true,"description":"The display name whose change has been requested, whether or not WhatsApp is reviewing it. Absent when no change is pending.\n","example":"Lucky Shrub Garden Center"},"new_display_name_status":{"allOf":[{"$ref":"#/components/schemas/WhatsAppDisplayNameStatus"}],"readOnly":true,"description":"Where the requested display name stands with WhatsApp, including whether it is being reviewed or was accepted without a review. Absent when no change is pending. An accepted name becomes `display_name` once the change is applied. This status belongs to the requested name; check `display_name_status` for approval of the current name. Applying a name accepted without review does not establish display name approval. `declined` is WhatsApp refusing the name, and `expired` is a request that no longer stands and has to be made again.\n"},"username":{"type":"string","readOnly":true,"description":"The username WhatsApp users can find this number by, without an `@`. Absent when the number has no username. Once set it cannot be removed through this API.\n","example":"goldcrest.support"},"username_status":{"allOf":[{"$ref":"#/components/schemas/WhatsAppUsernameStatus"}],"readOnly":true,"description":"Where the username stands with WhatsApp. Absent when the number has no username.\n"},"about":{"type":"string","maxLength":139,"description":"The short line shown under the business name in a chat.","example":"Open Monday to Friday, 9am to 6pm CET."},"address":{"type":"string","maxLength":256,"description":"The business address shown on the profile.","example":"Trompenburgstraat 2C, 1079 TX Amsterdam"},"description":{"type":"string","maxLength":256,"description":"The longer description shown on the profile.","example":"Bird is the platform for messaging with your customers."},"email":{"type":"string","format":"email","maxLength":128,"description":"The contact email shown on the profile.","example":"hello@bird.com"},"vertical":{"allOf":[{"$ref":"#/components/schemas/WhatsAppBusinessVertical"}],"description":"The industry WhatsApp shows on the profile."},"websites":{"type":"array","maxItems":2,"items":{"type":"string","maxLength":256},"description":"Up to two websites shown on the profile.","example":["https://bird.com"]},"profile_picture_url":{"type":"string","readOnly":true,"description":"A link to the profile picture WhatsApp currently shows. WhatsApp signs this link and it expires within days, so load it when you display it and never store it. It is served with permissive cross-origin headers, so a browser can load it directly.","example":"https://pps.whatsapp.net/v/t61.24694-24/643148303_1005107588793925.jpg"}}},"AMBBusinessAccountStatus":{"type":"string","minLength":1,"enum":["pending","active","suspended","disconnected"],"description":"Pending accounts need setup or review. Active accounts have recorded approval. Suspended accounts retain their recorded suspension. Configured, connected accounts can exchange messages regardless of review status; Apple decides whether to accept outgoing requests. Disconnected accounts retain their identity and history but cannot exchange new messages until reconnected.","example":"active"},"AMBBusinessAccountReviewStatus":{"type":"string","minLength":1,"x-extensible-enum":["pending","approved","rejected"],"description":"Latest review outcome, recorded by Bird staff or Bird's automated review. Absent while the business is a draft. `approved` can come without a submission, such as for a business that Apple approved under another messaging service provider before it moved to Bird.","example":"approved"},"AMBBusinessAccount":{"type":"object","additionalProperties":false,"required":["id","apple_business_id","name","status","invitations_enabled","created_at","updated_at"],"properties":{"id":{"$ref":"#/components/schemas/AMBBusinessID","readOnly":true,"description":"Unique identifier for the business record."},"apple_business_id":{"type":["string","null"],"format":"uuid","readOnly":true,"description":"Apple business UUID, or null until supplied. Adding this identifier does not submit the account for review.","example":"b52d6267-2b62-4f8a-8842-0533d0f1dc07"},"name":{"type":"string","minLength":1,"description":"Customer-supplied account name used in Bird. Apple controls the name shown to customers in Messages.","example":"Acme Retail"},"status":{"$ref":"#/components/schemas/AMBBusinessAccountStatus","readOnly":true,"description":"Operational state of the business account."},"status_reason":{"type":"string","minLength":1,"readOnly":true,"description":"Reason for the current rejection or suspension, when recorded. A rejection's feedback is here even when no submission carries it. May contain basic Markdown, such as emphasis and lists."},"invitations_enabled":{"type":"boolean","readOnly":true,"description":"Whether Apple has granted invitation access. Sending also requires a configured, connected account and eligible recipient.","example":false},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the business record was created.","example":"2026-08-20T09:14:52Z"},"updated_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the business record was last changed.","example":"2026-08-25T16:42:01Z"},"next":{"type":"array","readOnly":true,"description":"Next setup actions on create, update and single-account reads. Active accounts return an empty array. Lists omit this field.","items":{"$ref":"#/components/schemas/NextAction"}},"account_review_status":{"$ref":"#/components/schemas/AMBBusinessAccountReviewStatus","readOnly":true,"description":"Latest recorded review outcome. Absent while the business is a draft."},"finish_setup_url":{"type":"string","format":"uri","readOnly":true,"description":"Bird dashboard URL for completing setup. Present only when customer action is available."}}},"AMBBusinessAccountEventSort":{"type":"string","enum":["created_at"],"default":"created_at","description":"Account event ordering field."},"AMBBusinessAccountEventID":{"type":"string","minLength":1,"pattern":"^abe_[0-9a-hjkmnp-tv-z]{26}$","example":"abe_01krdgeqcxet5s7t44vh8rt9mg"},"AMBBusinessAccountEvent":{"type":"object","additionalProperties":false,"required":["id","type","summary","metadata","created_at"],"properties":{"id":{"$ref":"#/components/schemas/AMBBusinessAccountEventID","readOnly":true},"type":{"type":"string","minLength":1,"readOnly":true,"x-extensible-enum":["amb_business_account.created","amb_business_account.status_changed","amb_business_account.submission_created","amb_business_account.review_changed","amb_business_account.invitation_access_changed","amb_business_account.suspension_changed"]},"summary":{"type":"string","minLength":1,"readOnly":true},"metadata":{"type":"object","additionalProperties":true,"readOnly":true,"description":"Details of the change. `source` identifies who recorded it, `customer`, `staff` or `automated_review`. Status, review and suspension events have `from` and `to`, and `reason` when Bird staff recorded one. An automated review event has `submission_id` instead, and its feedback is on that submission. An invitation access event has `enabled`."},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true}}},"AMBBusinessAccountEventList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AMBBusinessAccountEvent"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"AMBSuppressionID":{"type":"string","minLength":1,"pattern":"^asp_[0-9a-hjkmnp-tv-z]{26}$","example":"asp_01krdgeqcxet5s7t44vh8rt9mg"},"AMBSuppressionAddressType":{"type":"string","minLength":1,"enum":["phone_number","opaque_user_id"],"description":"What kind of value `address` holds.\n\n- `phone_number` means `address` is the customer's phone number. Apple's CloseSession event carries a phone number rather than an opaque identifier, so a suppression opened by a close on a conversation identified by phone number takes this kind.\n- `opaque_user_id` means `address` is the opaque identifier Apple assigns to the customer's conversation with the business, stable across a close and a later re-initiation.\n","example":"opaque_user_id"},"AMBSuppressionReason":{"type":"string","minLength":1,"x-extensible-enum":["manual","opted_out"],"description":"Why messages are stopped. `manual` means your workspace added it through this API or the dashboard. `opted_out` means the customer or Apple signaled they should not be contacted, such as a close of the conversation. This list grows over time, so treat an unknown value as informational rather than rejecting the record.\n","example":"manual"},"AMBSuppressionOrigin":{"type":"string","minLength":1,"x-extensible-enum":["user","api_key","close_session","gone"],"description":"How the suppression came to exist:\n\n- `user`: someone acting in the dashboard.\n- `api_key`: an API call.\n- `close_session`: Apple reporting that the customer closed the conversation.\n- `gone`: Apple refusing a send because the customer had closed the conversation.\n\n`user` and `api_key` are the manual suppressions, the ones you can end. The two closes are\nthe customer's own statement and end when they return. A customer declining or opting out of\ninvitations by phone number is recorded as a preference rather than here.\n","example":"user"},"AMBSuppressionCoverage":{"type":"string","minLength":1,"x-extensible-enum":["all","invitations"],"description":"What this stops. `all` stops every outbound path to the address: operator and automated replies, API sends, typing indicators and invitations. `invitations` stops invitations to the phone number and leaves an open conversation reachable. Treat unrecognized values as stopping everything.\n"},"AMBMessageID":{"type":"string","minLength":1,"pattern":"^amb_[0-9a-hjkmnp-tv-z]{26}$","example":"amb_01krdgeqcxet5s7t44vh8rt9mg"},"AMBEventID":{"type":"string","minLength":1,"pattern":"^aev_[0-9a-hjkmnp-tv-z]{26}$","example":"aev_01krdgeqcxet5s7t44vh8rt9mg"},"AMBSuppressionEndReason":{"type":"string","minLength":1,"x-extensible-enum":["user","api_key","reinitiated"],"description":"What ended it:\n\n- `user`: someone acting in the dashboard.\n- `api_key`: an API call.\n- `reinitiated`: the customer returning to the conversation they had closed.\n\nA user or an API call can end a `manual` suppression and nothing else; a close is the\ncustomer's own statement and ends when they return.\n\nNull while the suppression is in force.\n"},"AMBSuppression":{"type":"object","additionalProperties":false,"description":"One period during which messages to an address are stopped: when it started, what started it, and what ended it. The address is a phone number or the opaque identifier Apple assigns to a customer's conversation with a business. A customer who closes a conversation, returns, and closes it again has two of these on record rather than one current state, the first ended and the second in force, and each keeps its own dates once it ends. The list returns the periods in force; fetch one by ID to read an ended one.\n","required":["id","business_account_id","address","address_type","reason","origin","applies_to","source_message_id","source_event_id","source_end_message_id","blocking","effective_at","created_at","ended_at","ended_reason","ended_effective_at","last_asserted_at"],"properties":{"id":{"$ref":"#/components/schemas/AMBSuppressionID","readOnly":true},"business_account_id":{"oneOf":[{"$ref":"#/components/schemas/AMBBusinessID"},{"type":"null"}],"readOnly":true,"description":"The business account this stops. Null when it stops the address for every account in the workspace. A workspace-wide suppression covers the same address everywhere; it does not link the different opaque identifiers one person holds with different accounts.\n"},"address":{"type":"string","minLength":1,"maxLength":1024,"description":"The customer: a phone number in E.164 format, or the exact opaque identifier Apple supplied. `address_type` says which.\n","example":"+15551234567"},"address_type":{"$ref":"#/components/schemas/AMBSuppressionAddressType"},"reason":{"$ref":"#/components/schemas/AMBSuppressionReason","readOnly":true},"origin":{"$ref":"#/components/schemas/AMBSuppressionOrigin","readOnly":true},"applies_to":{"$ref":"#/components/schemas/AMBSuppressionCoverage","readOnly":true},"blocking":{"type":"boolean","readOnly":true,"description":"Whether this is stopping messages right now; `applies_to` says what it stops. Always true in a list, which carries only the suppressions in force; false when you fetch one by ID that has since ended, which is also when `ended_at` is set.\n"},"source_message_id":{"oneOf":[{"$ref":"#/components/schemas/AMBMessageID"},{"type":"null"}],"readOnly":true,"description":"The outbound message Apple refused because the customer had closed the conversation, when that is what opened this. Null for a close Apple reported and for a manual suppression.\n"},"source_event_id":{"oneOf":[{"$ref":"#/components/schemas/AMBEventID"},{"type":"null"}],"readOnly":true,"description":"The conversation event recording the close Apple reported, when that is what opened this. Null for a refused send and for a manual suppression.\n"},"effective_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the customer closed the conversation, as reported by Apple; when Apple refused a send because the conversation was closed; or when a manual suppression was added. This is what orders the list, and it can differ from `created_at`: earlier when a close reached us late, later when the customer closed the conversation again while this was in force, which moves it to that later close.\n"},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When we recorded it."},"last_asserted_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When we last recorded this suppression being stated. Later than `created_at` when it was stated again while already in force: your workspace adding it again, or the customer closing the conversation again. A repeat adds no new record.\n"},"ended_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this stopped applying. Null while it is still stopping messages."},"ended_reason":{"oneOf":[{"$ref":"#/components/schemas/AMBSuppressionEndReason"},{"type":"null"}],"readOnly":true},"ended_effective_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the customer returned to the conversation, as reported by Apple, or when your workspace ended it. Null while it is still stopping messages.\n"},"source_end_message_id":{"oneOf":[{"$ref":"#/components/schemas/AMBMessageID"},{"type":"null"}],"readOnly":true,"description":"The message the customer returned with, when there was one. Null while it is still stopping messages, and when something other than a customer message ended it: your workspace ending it, or the customer returning by accepting an invitation.\n"}}},"AMBBusinessAccountSort":{"type":"string","enum":["created_at"],"default":"created_at","description":"Field used to order the records."},"AMBBusinessAccountList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"The business records your workspace holds.","items":{"$ref":"#/components/schemas/AMBBusinessAccount"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"AMBBusinessAccountCreate":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The brand name shown for this business record inside Bird.","example":"Acme Retail"},"apple_business_id":{"type":"string","format":"uuid","minLength":1,"description":"The Business ID Apple issued for this brand, if you already have it. Supplying it identifies the draft. Submit the completed evidence requirements explicitly when the business is ready for review.","example":"b52d6267-2b62-4f8a-8842-0533d0f1dc07"}}},"AMBBusinessAccountUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The brand name shown for this business record inside Bird.","example":"Acme Retail"},"apple_business_id":{"type":"string","format":"uuid","minLength":1,"description":"The Business ID Apple issued for this brand. Accepted only while the account is a draft and connected, including after Bird staff return it to draft. Updating it does not submit the business.","example":"b52d6267-2b62-4f8a-8842-0533d0f1dc07"}}},"AMBBusinessAccountSubmissionSort":{"type":"string","enum":["created_at"],"default":"created_at","description":"Field used to order the records."},"AMBBusinessSubmissionID":{"type":"string","minLength":1,"pattern":"^abs_[0-9a-hjkmnp-tv-z]{26}$","example":"abs_01krdgeqcxet5s7t44vh8rt9mg"},"AMBBusinessAccountSubmissionStatus":{"type":"string","minLength":1,"enum":["submitted","in_review","approved","rejected"],"description":"State of this review attempt. Later suspension or disconnection does not change an approved attempt.","example":"submitted"},"AMBBusinessAccountSubmissionDecider":{"type":"string","minLength":1,"x-extensible-enum":["staff","automated_review"],"description":"Who recorded an attempt's outcome. `automated_review` is Bird's automated review of the evidence. `staff` is Bird staff, including when they record Apple's decision. Treat unrecognized values as future deciders.","example":"automated_review"},"AMBBusinessAccountSubmission":{"type":"object","additionalProperties":false,"required":["id","business_account_id","apple_business_id","name","readiness_attachment","use_cases_attachment","video_attachment","status","status_reason","decided_by","created_at","updated_at"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/AMBBusinessSubmissionID"}],"readOnly":true},"business_account_id":{"allOf":[{"$ref":"#/components/schemas/AMBBusinessID"}],"readOnly":true},"apple_business_id":{"type":"string","format":"uuid","minLength":1,"readOnly":true,"description":"The Apple business UUID frozen when this attempt was submitted."},"name":{"type":"string","minLength":1,"readOnly":true,"description":"The customer-supplied Bird account name frozen when this attempt was submitted."},"readiness_attachment":{"allOf":[{"$ref":"#/components/schemas/Attachment"}],"readOnly":true},"use_cases_attachment":{"allOf":[{"$ref":"#/components/schemas/Attachment"}],"readOnly":true},"video_attachment":{"allOf":[{"$ref":"#/components/schemas/Attachment"}],"readOnly":true},"status":{"description":"The review outcome of this attempt. Earlier attempts retain their outcome when a new attempt is submitted.","allOf":[{"$ref":"#/components/schemas/AMBBusinessAccountSubmissionStatus"}],"readOnly":true},"status_reason":{"type":["string","null"],"minLength":1,"readOnly":true,"description":"Review feedback on this attempt, such as the automated review's feedback or the reason Apple rejected it. May contain basic Markdown, such as emphasis, lists and links."},"decided_by":{"oneOf":[{"$ref":"#/components/schemas/AMBBusinessAccountSubmissionDecider"},{"type":"null"}],"readOnly":true,"description":"Who recorded this attempt's outcome, `automated_review` when Bird's automated review rejected it or `staff`. Null while the attempt waits, and for outcomes recorded before automated reviews.","example":null},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true},"next":{"type":"array","readOnly":true,"description":"Read the parent business account for current eligibility and next actions. Present on create responses and each customer submission-list item; historical attempts do not establish current account state.","items":{"$ref":"#/components/schemas/NextAction"}},"updated_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true}}},"AMBBusinessAccountSubmissionList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AMBBusinessAccountSubmission"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"AMBBusinessAccountSubmissionCreate":{"type":"object","additionalProperties":false,"description":"The submission commits three distinct attachments uploaded to this workspace. `readiness_attachment_id` identifies the PDF business readiness assessment; `use_cases_attachment_id` identifies the PDF describing proposed customer use cases; `video_attachment_id` identifies the MP4 demonstration of the customer experience. Invalid or duplicate evidence returns 422.","required":["readiness_attachment_id","use_cases_attachment_id","video_attachment_id"],"properties":{"readiness_attachment_id":{"$ref":"#/components/schemas/AttachmentID","description":"Uploaded PDF attachment containing the business readiness assessment."},"use_cases_attachment_id":{"$ref":"#/components/schemas/AttachmentID","description":"Uploaded PDF attachment describing the proposed customer use cases."},"video_attachment_id":{"$ref":"#/components/schemas/AttachmentID","description":"Uploaded MP4 attachment demonstrating the customer experience."}}},"AMBBusinessAccountAttachmentUpload":{"type":"object","additionalProperties":false,"required":["file"],"properties":{"file":{"type":"string","format":"binary","minLength":1,"description":"A PDF up to 10 MiB or an MP4 video up to 25,000,000 bytes. Bird determines the type from the file contents."}}},"AMBAuthenticationProviderID":{"type":"string","minLength":1,"pattern":"^aauthp_[0-9a-hjkmnp-tv-z]{26}$","example":"aauthp_01krdgeqcxet5s7t44vh8rt9mg"},"AMBTemplateID":{"type":"string","minLength":1,"pattern":"^amt_[0-9a-hjkmnp-tv-z]{26}$","example":"amt_01krdgeqcxet5s7t44vh8rt9mg"},"AMBEntryPoint":{"type":"object","additionalProperties":false,"required":["id","group","intent","body"],"properties":{"id":{"type":"string","minLength":1,"maxLength":64,"description":"Identifier for this entry point, chosen by you and unique within the business's entry points. A conversation opened through this entry point carries it as `entry_point`.","example":"website-footer"},"group":{"type":"string","minLength":1,"description":"The group value Apple reports on a conversation opened through this entry point. Matched against the `group` the first inbound message carries.","example":"support"},"intent":{"type":"string","minLength":1,"description":"The intent value Apple reports on a conversation opened through this entry point. Matched against the `intent` the first inbound message carries, together with `group`.","example":"general-inquiry"},"body":{"type":"string","minLength":1,"maxLength":1000,"description":"The message text pre-filled for the customer when they open a conversation through this entry point.","example":"Hi, I have a question about my order."}}},"AMBChannelSettings":{"type":"object","additionalProperties":false,"required":["entry_points","brand_name","logo_asset_id"],"properties":{"entry_points":{"type":"array","description":"The entry points customers can use to open a conversation with this business, each matched against the group and intent an inbound message reports.","items":{"$ref":"#/components/schemas/AMBEntryPoint"}},"default_locale":{"type":["string","null"],"minLength":1,"description":"The locale used for this business when a conversation reports none of its own, in canonical BCP-47 form. Null until you set one or after you clear it. Bird converts a configured default to Apple's locale form when sending a message without a conversation locale.","example":"en-US"},"brand_name":{"type":"string","minLength":1,"maxLength":100,"description":"The brand name shown on the Bird-hosted landing page customers use to connect this business.","example":"Acme Retail"},"logo_asset_id":{"oneOf":[{"$ref":"#/components/schemas/AssetID"},{"type":"null"}],"description":"The business's logo, as an asset in your media library. Null until one is set, either from Apple's own redirect or from a later change here.","example":"ast_01krdgeqcxet5s7t44vh8rt9mg"}},"description":"A business's entry points, default locale, and landing-page brand settings. OpenID Connect providers use separate business authentication provider operations. Apple Pay merchant settings use the separate business Apple Pay configuration operations. Supply custom iMessage app metadata on each message."},"AMBChannelSettingsUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"entry_points":{"type":"array","description":"The entry points customers can use to open a conversation with this business. Sending this replaces the entire set; there is no way to add or remove a single entry point without resending the rest.","items":{"$ref":"#/components/schemas/AMBEntryPoint"}},"default_locale":{"type":["string","null"],"minLength":1,"description":"The locale used for this business when a conversation reports none of its own, in BCP-47 form. Omit this field to keep the current default, or send null to clear it. Bird converts a configured default to Apple's locale form when sending a message without a conversation locale.","example":"en-US"},"brand_name":{"type":"string","minLength":1,"maxLength":100,"description":"The brand name shown on the Bird-hosted landing page customers use to connect this business.","example":"Acme Retail"},"logo_asset_id":{"oneOf":[{"$ref":"#/components/schemas/AssetID"},{"type":"null"}],"description":"The business's logo, as an asset in your media library. Send null to clear it.","example":"ast_01krdgeqcxet5s7t44vh8rt9mg"}}},"AMBPaymentID":{"type":"string","minLength":1,"pattern":"^apay_[0-9a-hjkmnp-tv-z]{26}$","example":"apay_01krdgeqcxet5s7t44vh8rt9mg"},"AMBRoutingRuleID":{"type":"string","minLength":1,"pattern":"^arr_[0-9a-hjkmnp-tv-z]{26}$","example":"arr_01krdgeqcxet5s7t44vh8rt9mg"},"AMBRoutingRuleMatchKind":{"type":"string","minLength":1,"enum":["intent","group","both"],"description":"What a routing rule matches against the entry point that started the conversation.\n\n- `intent` matches on the entry point's intent alone: `match_intent_id` is set and `match_group_id` is null.\n- `group` matches on the entry point's group alone: `match_group_id` is set and `match_intent_id` is null.\n- `both` matches only when the entry point carries the given intent and the given group together, so `match_intent_id` and `match_group_id` are both set. There are two match fields rather than one because `both` needs to carry an intent and a group at once.\n","example":"intent"},"AMBRoutingRule":{"description":"A rule that puts a conversation into a queue when it is created or reopened, based on the group and intent the entry point that started it carried.\n","unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/Timestamps"},{"type":"object","required":["id","business_account_id","match_kind","queue","precedence","is_default"],"properties":{"id":{"readOnly":true,"description":"Unique identifier for the routing rule.","$ref":"#/components/schemas/AMBRoutingRuleID"},"business_account_id":{"description":"The Apple Messages for Business brand this rule belongs to.","$ref":"#/components/schemas/AMBBusinessID"},"match_kind":{"$ref":"#/components/schemas/AMBRoutingRuleMatchKind"},"match_intent_id":{"type":["string","null"],"minLength":1,"description":"The entry point intent this rule matches, as sent in Apple's `intentID`. Set when `match_kind` is `intent` or `both`, null when it is `group`.\n","example":"order_status"},"match_group_id":{"type":["string","null"],"minLength":1,"description":"The entry point group this rule matches, as sent in Apple's `groupID`. Set when `match_kind` is `group` or `both`, null when it is `intent`.\n","example":"support"},"queue":{"type":"string","minLength":1,"description":"The queue a matching conversation is filed into. A queue is a label your console filters by rather than a resource you create ahead of time, so any value routes.\n","example":"billing"},"precedence":{"type":"integer","format":"int32","description":"Evaluation order among this business's rules. The highest-precedence rule a conversation matches wins; rules tied on precedence are evaluated by their `id`.\n","example":10},"is_default":{"type":"boolean","description":"Whether this rule catches a conversation that matches nothing else. A business has at most one. A conversation created or reopened while none exists routes to an empty queue, which the console lists as unrouted.\n","example":false}}}]},"AMBRoutingRuleList":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","description":"The workspace's routing rules, optionally filtered by business, highest precedence first and ties broken by `id`. Rules are evaluated within their business in this order. The set is returned in full; this list is not paginated.\n","items":{"$ref":"#/components/schemas/AMBRoutingRule"}}}},"AMBQueue":{"type":"string","minLength":1,"maxLength":64,"description":"Queue label used for routing and filtering conversations."},"AMBRoutingRuleCreate":{"type":"object","additionalProperties":false,"required":["business_account_id","match_kind","queue"],"properties":{"business_account_id":{"description":"The Apple Messages for Business brand this rule belongs to.","$ref":"#/components/schemas/AMBBusinessID"},"match_kind":{"$ref":"#/components/schemas/AMBRoutingRuleMatchKind"},"match_intent_id":{"type":["string","null"],"minLength":1,"description":"The entry point intent to match, as sent in Apple's `intentID`. Required when `match_kind` is `intent` or `both`, and rejected when it is `group`.\n","example":"order_status"},"match_group_id":{"type":["string","null"],"minLength":1,"description":"The entry point group to match, as sent in Apple's `groupID`. Required when `match_kind` is `group` or `both`, and rejected when it is `intent`.\n","example":"support"},"queue":{"$ref":"#/components/schemas/AMBQueue","description":"The queue a matching conversation is filed into. Your console lists whichever values your rules use.\n","example":"billing"},"precedence":{"type":"integer","format":"int32","default":0,"description":"Evaluation order among this business's rules. The highest-precedence rule a conversation matches wins. Omit it to default to 0.\n","example":10},"is_default":{"type":"boolean","default":false,"description":"Set to make this the rule that catches a conversation matching nothing else. A business can have only one; creating a second while one exists returns a `409`.\n","example":false}},"oneOf":[{"properties":{"match_kind":{"const":"intent"},"match_intent_id":{"type":"string","minLength":1}},"required":["match_intent_id"],"not":{"properties":{"match_group_id":{"type":"string","minLength":1}},"required":["match_group_id"]}},{"properties":{"match_kind":{"const":"group"},"match_group_id":{"type":"string","minLength":1}},"required":["match_group_id"],"not":{"properties":{"match_intent_id":{"type":"string","minLength":1}},"required":["match_intent_id"]}},{"properties":{"match_kind":{"const":"both"},"match_intent_id":{"type":"string","minLength":1},"match_group_id":{"type":"string","minLength":1}},"required":["match_intent_id","match_group_id"]}]},"AMBRoutingRuleUpdate":{"type":"object","additionalProperties":false,"description":"Changes to a routing rule. Send `business_account_id` to move the rule to another Apple Messages for Business brand in the workspace. Send `match_kind` to replace what the rule matches, with the ids that kind requires, as on create; a stored id the new kind does not use is cleared. `match_intent_id` and `match_group_id` require `match_kind`. The update returns a `409` when it would leave this rule as the default of a business that already has a different default rule.\n","properties":{"business_account_id":{"$ref":"#/components/schemas/AMBBusinessID","description":"Move this rule to another Apple Messages for Business brand in the workspace."},"match_kind":{"$ref":"#/components/schemas/AMBRoutingRuleMatchKind","description":"Replace what this rule matches. Send it with the ids the new kind requires, validated as on create. A stored id the new kind does not use is cleared.\n"},"match_intent_id":{"type":"string","minLength":1,"description":"The entry point intent to match, as sent in Apple's `intentID`. Requires `match_kind`: required when it is `intent` or `both`, and rejected when it is `group`.\n","example":"order_status"},"match_group_id":{"type":"string","minLength":1,"description":"The entry point group to match, as sent in Apple's `groupID`. Requires `match_kind`: required when it is `group` or `both`, and rejected when it is `intent`.\n","example":"support"},"queue":{"$ref":"#/components/schemas/AMBQueue","minLength":1,"description":"Change the queue this rule files a matching conversation into.","example":"billing"},"precedence":{"type":"integer","format":"int32","description":"Change this rule's evaluation order among the business's other rules.","example":10},"is_default":{"type":"boolean","description":"Set to true to make this the rule that catches a conversation matching nothing else, or to false to stop it from being the default.\n","example":false}},"oneOf":[{"title":"Keep the match","not":{"anyOf":[{"properties":{"match_kind":{"type":"string","minLength":1}},"required":["match_kind"]},{"properties":{"match_intent_id":{"type":"string","minLength":1}},"required":["match_intent_id"]},{"properties":{"match_group_id":{"type":"string","minLength":1}},"required":["match_group_id"]}]}},{"title":"Match on intent","properties":{"match_kind":{"const":"intent"},"match_intent_id":{"type":"string","minLength":1}},"required":["match_kind","match_intent_id"],"not":{"properties":{"match_group_id":{"type":"string","minLength":1}},"required":["match_group_id"]}},{"title":"Match on group","properties":{"match_kind":{"const":"group"},"match_group_id":{"type":"string","minLength":1}},"required":["match_kind","match_group_id"],"not":{"properties":{"match_intent_id":{"type":"string","minLength":1}},"required":["match_intent_id"]}},{"title":"Match on intent and group","properties":{"match_kind":{"const":"both"},"match_intent_id":{"type":"string","minLength":1},"match_group_id":{"type":"string","minLength":1}},"required":["match_kind","match_intent_id","match_group_id"]}]},"AMBAttachmentUploadFromURL":{"type":"object","additionalProperties":false,"required":["from","source_url"],"properties":{"from":{"type":"string","minLength":1,"description":"Apple business identifier of the business account that sends the attachment. Read it from the business account's apple_business_id. Only this business account can send the attachment.","example":"b52d6267-2b62-4f8a-8842-0533d0f1dc07"},"source_url":{"type":"string","minLength":1,"description":"HTTPS URL of the file, at most 99,999,999 bytes. Bird downloads it and uploads it to Apple. A non-HTTPS URL is refused with a `422` `AMBEndpointNotHTTPS`.","example":"https://media.example.com/receipt.pdf","x-sensitive":true},"name":{"type":"string","minLength":1,"description":"Display filename. Defaults to the last segment of the source_url path.","example":"receipt.pdf"},"mime_type":{"type":"string","minLength":1,"description":"Media type of the file. Defaults to the type Bird detects from the contents.","example":"application/pdf"}}},"AMBAttachmentUpload":{"type":"object","additionalProperties":false,"description":"A multipart upload. Supply exactly one of `file` and `source_url`.","required":["from"],"properties":{"from":{"type":"string","minLength":1,"description":"Apple business identifier of the business account that sends the attachment. Read it from the business account's apple_business_id. Only this business account can send the attachment.","example":"b52d6267-2b62-4f8a-8842-0533d0f1dc07"},"file":{"type":"string","format":"binary","minLength":1,"description":"The file, at most 25,000,000 bytes. Its filename becomes the attachment's name unless `name` is given. Supply this or source_url."},"source_url":{"type":"string","minLength":1,"description":"HTTPS URL of a file of at most 99,999,999 bytes, which Bird downloads instead of an uploaded file. Supply this or file. A non-HTTPS URL is refused with a `422` `AMBEndpointNotHTTPS`.","example":"https://media.example.com/receipt.pdf","x-sensitive":true},"name":{"type":"string","minLength":1,"description":"Display filename. Defaults to the uploaded filename, else the last segment of the source_url path.","example":"receipt.pdf"},"mime_type":{"type":"string","minLength":1,"description":"Media type of the file. Defaults to the uploaded part's declared type, else the type Bird detects from the contents.","example":"application/pdf"}},"oneOf":[{"required":["file"],"properties":{"file":{}}},{"required":["source_url"],"properties":{"source_url":{}}}]},"AMBAttachmentID":{"type":"string","minLength":1,"pattern":"^aat_[0-9a-hjkmnp-tv-z]{26}$","example":"aat_01krdgeqcxet5s7t44vh8rt9mg"},"AMBAttachmentOrigin":{"type":"string","minLength":1,"enum":["received","sent","uploaded"],"description":"How Bird obtained an attachment:\n\n- `received`: A customer sent it in a message.\n- `sent`: You sent it in a message by `source_url`.\n- `uploaded`: You uploaded it with createAMBAttachment.\n"},"AMBAttachment":{"type":"object","additionalProperties":false,"readOnly":true,"description":"A file Apple holds for one business account. Send it again by passing `id` as `attachment_id` in `text.attachments`. Only the business account in `business_account_id` can send it; a send from another business account is refused with a `422` `AMBAttachmentBusinessMismatch`. `message_id` is absent for an uploaded attachment.","required":["id","business_account_id","origin","name","mime_type","size","expires_at","created_at"],"properties":{"id":{"$ref":"#/components/schemas/AMBAttachmentID","description":"Send it as `attachment_id`."},"business_account_id":{"$ref":"#/components/schemas/AMBBusinessID","description":"The business account Apple holds the attachment for."},"origin":{"$ref":"#/components/schemas/AMBAttachmentOrigin"},"message_id":{"$ref":"#/components/schemas/AMBMessageID","description":"The message the attachment belongs to."},"name":{"type":"string","minLength":0,"description":"Display filename. May be empty for an attachment stored before this release.","example":"receipt.pdf"},"mime_type":{"type":"string","minLength":0,"description":"Media type of the attachment. May be empty for an attachment stored before this release.","example":"application/pdf"},"size":{"type":"integer","format":"int64","maximum":99999999,"description":"Attachment size in bytes. May be 0 for an attachment stored before this release."},"expires_at":{"type":"string","format":"date-time","minLength":1,"description":"Bird's estimate of when Apple stops holding the attachment, 30 days after it was received, uploaded or last sent. A send within 24 hours of this time is refused."},"created_at":{"type":"string","format":"date-time","minLength":1,"description":"When Bird stored the attachment."}}},"AMBConversationID":{"type":"string","minLength":1,"pattern":"^acv_[0-9a-hjkmnp-tv-z]{26}$","example":"acv_01krdgeqcxet5s7t44vh8rt9mg"},"AMBMessageDirection":{"type":"string","minLength":1,"enum":["outbound","inbound"],"description":"Whether a message was sent by the business or received from the customer:\n\n- `outbound`: A reply the business sent into the conversation.\n- `inbound`: A message the customer sent.\n"},"AMBMessageStatus":{"type":"string","minLength":1,"enum":["accepted","sent","send_failed","rejected","received"],"description":"Send status:\n\n- `accepted`: Accepted and queued for delivery to Apple.\n- `sent`: Handed to Apple. There is no delivery or read receipt on this\n  channel, so `sent` is the furthest an outbound message's status\n  advances.\n- `send_failed`: Sending stopped because of a business or conversation\n  restriction, a recipient opt-out, an Apple refusal, a workspace\n  suspension, or exhausted attempts. A message stopped after it was charged\n  keeps its charge. An earlier attempt may have reached Apple if its\n  response or the local record of success was lost. See `last_error` for\n  why sending stopped.\n- `rejected`: Refused by Bird before any send attempt and never charged:\n  the destination has no price, the wallet could not fund the send, the\n  workspace is suspended, or the content cannot be sent yet. See\n  `last_error`.\n- `received`: Received as an inbound message.\n"},"AMBMessageSource":{"type":"string","minLength":1,"enum":["operator","automation","api"],"description":"Who sent an outbound message:\n\n- `operator`: A person, through a signed-in dashboard session.\n- `automation`: A workflow or bot acting on the workspace's behalf,\n  through a signed-in session.\n- `api`: A direct API call, authenticated with an API key.\n\nA credential can send only the sources it is permitted; naming one\noutside that set is refused with a `422` `AMBMessageSourceNotPermitted`.\n\nThis is not `from`, which a send carries alongside it. That names\nthe brand the message goes out as; this names who composed it.\n"},"AMBNativeAttachment":{"type":"object","additionalProperties":false,"description":"One attachment. A send supplies source_url or attachment_id. attachment_id reuses a received, sent or uploaded attachment of the sending business account instead of source_url; supplying both is refused with a `422`. A read returns the attachment's name, media type and, once Apple holds it, its size. It returns attachment_id when Bird stores the attachment: received attachments with an Apple reference, and sent attachments once Apple holds them. Download the bytes with getAMBAttachmentContent by attachment_id, or with getAMBMessageAttachment by message and position.\n","properties":{"attachment_id":{"$ref":"#/components/schemas/AMBAttachmentID","description":"The attachment to send, or this attachment's ID on a read."},"source_url":{"type":"string","minLength":1,"description":"HTTPS URL Bird downloads and uploads to Apple. Required on a send unless attachment_id is given. A non-HTTPS URL is refused with a `422` `AMBEndpointNotHTTPS`. In a template it may contain `{{ }}` placeholders; the rendered value must be HTTPS. Returned on reads of attachments you sent this way.","x-sensitive":true},"name":{"type":"string","description":"Display filename."},"mime_type":{"type":"string","description":"Media type of the attachment."},"size":{"type":"integer","format":"int64","minimum":1,"maximum":99999999,"readOnly":true,"description":"Attachment size in bytes. Absent until Apple holds the attachment."}},"anyOf":[{"required":["source_url"],"properties":{"source_url":{}}},{"required":["attachment_id"],"properties":{"attachment_id":{}}}]},"AMBRichLinkLayout":{"type":"string","enum":["icon","square","large"],"description":"How Apple displays a rich link's image. Apple picks the layout from the image's shape and width, so the image is resized or cropped to produce the one you choose:\n\n- `icon` shows a small image beside the title. The image is scaled to under 150 px wide. Use it for logos.\n- `square` shows a square image. The image is cropped to a square and sized to 240 px, or as small as 150 px when it needs to fit Apple's 200 kB limit.\n- `large` shows a wide image. A square or portrait image is cropped to a 2:1 rectangle, and a landscape image keeps its shape.\n\n`square` enlarges an image whose shorter side is under 240 px, and `large` one narrower than 240 px, which can blur it. Omit `layout` to keep the image's own shape, so Apple picks the layout from its shape and width.\n"},"AMBLinkPreviews":{"type":"object","additionalProperties":false,"description":"How the links in `body` of a message you send are previewed. Each `https://`, `http://` or `www.` link is sent as its own rich link, built from the linked page's title and image. Punctuation that ends a link's sentence is dropped, so it does not arrive on its own after the card.\n\nFor the image, the page's `og:image` is tried first, then its largest `apple-touch-icon` or icon, then the largest image in the page. `layout` applies to every preview in the message: `icon` and `square` try the icon first, and `large` tries the images in the page before the icon.\n\nOnly a `text` sent on its own can set `link_previews`. A request that sets it beside `rich_link` or `interactive` is refused with `422`. Leave it out there, and links in that text become previews in the default layout.\n\nA message is accepted and then ends `send_failed` when:\n\n- It has more than 20 links.\n- A page does not load over HTTPS, or has no title or usable image. Every page is fetched over HTTPS, upgrading `http://` and `www.` links.\n\nEvery link is checked before the first part is sent, so the customer receives none of the message. A retry after some parts were delivered checks only the parts still to send, so a link that stops loading by then fails the message after those parts arrived.\n","properties":{"layout":{"$ref":"#/components/schemas/AMBRichLinkLayout"}}},"AMBText":{"type":"object","additionalProperties":false,"x-sensitive":true,"description":"A text message: a body, an optional subject, and files placed in the body. Next to `interactive`, it is sent first as its own text bubble. Next to `rich_link`, the card takes the place of the first copy of its URL in `body`, splitting the text around it, or follows the text when `body` does not contain that URL. Later copies of that URL are removed.","properties":{"body":{"type":"string","description":"Text displayed in the message. Use one U+FFFC object replacement character per attachment to control placement.","x-sensitive":true},"subject":{"type":"string","description":"Subject displayed above the message body.","x-sensitive":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/AMBNativeAttachment"},"description":"Ordered attachments. A send supplies each one by source_url or attachment_id."},"link_previews":{"$ref":"#/components/schemas/AMBLinkPreviews"}},"anyOf":[{"required":["body"]},{"required":["attachments"],"properties":{"attachments":{"minItems":1}}}],"example":{"body":"Your order is ready."}},"AMBNativeRichLinkImage":{"type":"object","additionalProperties":false,"required":["source_url"],"properties":{"source_url":{"type":"string","description":"HTTPS URL of a PNG, JPEG, GIF or WebP preview image of up to 5 MiB and 6 megapixels, or 3 megapixels for a 16-bit PNG. It is fetched when the message is sent, converted to PNG and shrunk to Apple's 200 kB limit. Without `layout`, a PNG of 200 kB or less goes to Apple unchanged, so the pixel limit does not apply to it. An image over these limits, or one that cannot be converted, ends the message `send_failed`. It is checked before the first part and again on a retry, so an image that changes by then fails the message after the earlier parts arrived. A non-HTTPS URL is refused with a `422` `AMBEndpointNotHTTPS`. In a template it may contain `{{ }}` placeholders; the rendered value must be HTTPS.","minLength":1,"x-sensitive":true},"mime_type":{"type":"string","description":"Media type sent to Apple, which accepts only PNG. Defaults to image/png.","const":"image/png","default":"image/png"},"layout":{"$ref":"#/components/schemas/AMBRichLinkLayout"}}},"AMBNativeRichLinkVideo":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","description":"HTTPS video URL fetched by Apple. A non-HTTPS URL is refused with a `422` `AMBEndpointNotHTTPS`. In a template it may contain `{{ }}` placeholders; the rendered value must be HTTPS.","minLength":1,"x-sensitive":true},"mime_type":{"type":"string","description":"Media type of the video. Defaults to video/mp4; supply the actual type for other formats.","default":"video/mp4"}}},"AMBNativeRichLinkAssets":{"type":"object","additionalProperties":false,"required":["image"],"properties":{"image":{"$ref":"#/components/schemas/AMBNativeRichLinkImage"},"video":{"$ref":"#/components/schemas/AMBNativeRichLinkVideo"}}},"AMBNativeRichLinkData":{"type":"object","additionalProperties":false,"required":["url","title","assets"],"properties":{"url":{"type":"string","description":"HTTPS URL opened by the preview. A non-HTTPS URL is refused with a `422` `AMBEndpointNotHTTPS`. In a template it may contain `{{ }}` placeholders; the rendered value must be HTTPS.","minLength":1,"x-sensitive":true},"title":{"type":"string","description":"Preview title.","minLength":1},"assets":{"$ref":"#/components/schemas/AMBNativeRichLinkAssets"}}},"AMBRichLinkConstruct":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","minLength":1,"description":"The App Clip, Apple Music, or Apple Maps URL to build a preview for. An `http://` URL is refused with a `422` `AMBEndpointNotHTTPS`. Apple builds the preview when the message is sent. If Apple refuses the URL, or fails to build it with a `500` at least 5 times over at least 10 minutes, the message ends `send_failed` with `bird:construct_rejected`; send `rich_link` content with your own `title` and `image` instead. If Apple stays unreachable for the whole retry budget, the message ends `send_failed` with `bird:attempts_exhausted`.","example":"https://apps.apple.com/app/id375380948?clip=1","x-sensitive":true},"store_region":{"$ref":"#/components/schemas/CountryCode","description":"App Store storefront used to build an App Clip preview. Defaults to `US` when omitted."}},"description":"Asks Apple to build the rich link preview from `url` when the message is sent."},"AMBRichLink":{"type":"object","additionalProperties":false,"x-sensitive":true,"description":"A link with a preview card. Supply your own preview in `rich_link_data`, or ask Apple to build it with `rich_link_construct`. To introduce the link, send `text` alongside it. The card takes the place of the first copy of its URL in that text, or follows the text when it does not contain that URL. Later copies of that URL are removed.","properties":{"rich_link_data":{"$ref":"#/components/schemas/AMBNativeRichLinkData"},"rich_link_construct":{"$ref":"#/components/schemas/AMBRichLinkConstruct"}},"oneOf":[{"required":["rich_link_data"],"not":{"properties":{"rich_link_construct":{}},"required":["rich_link_construct"]}},{"required":["rich_link_construct"],"not":{"properties":{"rich_link_data":{}},"required":["rich_link_data"]}}]},"AMBMessageBubbleStyle":{"type":"string","enum":["icon","small","large"],"description":"Layout of an Apple interactive message bubble."},"AMBMessageBubble":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1,"maxLength":512,"description":"Text shown on the message bubble."},"subtitle":{"type":"string","maxLength":512,"description":"Secondary text shown below the title."},"style":{"$ref":"#/components/schemas/AMBMessageBubbleStyle","description":"Bubble layout. Apple defaults to `icon` when omitted and ignores it for custom iMessage apps."},"image_identifier":{"type":"string","minLength":1,"description":"Identifier of an image in `interactive.images`, or `interactive_reply.images` on a reply. Apple ignores it for custom iMessage apps."},"image_title":{"type":"string","maxLength":512,"description":"Title shown over an attached image in a custom iMessage app bubble."},"image_subtitle":{"type":"string","maxLength":512,"description":"Subtitle shown over an attached image in a custom iMessage app bubble."},"secondary_subtitle":{"type":"string","maxLength":512,"description":"Right-aligned title in a custom iMessage app bubble."},"tertiary_subtitle":{"type":"string","maxLength":512,"description":"Right-aligned subtitle in a custom iMessage app bubble."}}},"AMBNativeImage":{"type":"object","additionalProperties":false,"required":["identifier","source_url"],"properties":{"identifier":{"type":"string","description":"Identifier referenced by a bubble, item, or event.","minLength":1},"source_url":{"type":"string","description":"HTTPS URL of a PNG image up to 200 kB. Total interactive image data must not exceed 5 MB. A non-HTTPS URL is refused with a `422` `AMBEndpointNotHTTPS`. In a template it may contain `{{ }}` placeholders; the rendered value must be HTTPS.","minLength":1,"x-sensitive":true},"description":{"type":"string","description":"Accessibility description read by VoiceOver.","x-sensitive":true}}},"AMBQuickReplyItem":{"type":"object","additionalProperties":false,"required":["identifier","title"],"properties":{"identifier":{"type":"string","minLength":1,"description":"Opaque choice identifier returned in `interactive_reply.quick_reply.selected_identifier`."},"title":{"type":"string","minLength":1,"description":"Label shown on the button."}}},"AMBNativeQuickReply":{"type":"object","additionalProperties":false,"required":["summary_text","items"],"properties":{"summary_text":{"type":"string","minLength":1,"x-sensitive":true,"description":"Text used for the device notification and shown in the transcript after the customer chooses an item. To introduce the choices, send `text` alongside `interactive`; it arrives first as its own bubble."},"items":{"type":"array","minItems":2,"maxItems":5,"items":{"$ref":"#/components/schemas/AMBQuickReplyItem"},"description":"The buttons offered to the customer. Apple requires between two and five; outside that range the request is refused with a `422` `AMBQuickReplyItemsInvalid`. For more choices, send `list_picker` content instead."}}},"AMBListPickerItem":{"type":"object","additionalProperties":false,"required":["identifier","title"],"properties":{"identifier":{"type":"string","minLength":1,"description":"Opaque item identifier returned in `interactive_reply.list_picker.sections[].items[]`."},"title":{"type":"string","minLength":1,"description":"Label shown on the row."},"subtitle":{"type":["string","null"],"description":"Secondary line shown under the title."},"image_identifier":{"type":["string","null"],"minLength":1,"description":"Identifier of an image in `interactive.images`, or `interactive_reply.images` on a reply, shown next to this row. A key with no matching entry in `images` is refused with a `422` `AMBInteractiveImageInvalid`."},"order":{"type":"integer","minimum":0,"description":"Position within the section, ascending. Defaults to the row's array position."}}},"AMBListPickerSection":{"type":"object","additionalProperties":false,"required":["title","items"],"properties":{"title":{"type":"string","minLength":1,"description":"Heading shown above this section's rows."},"order":{"type":["integer","null"],"minimum":0,"description":"Where this section sits relative to its siblings, ascending. Sections omitting it are laid out in list order, after any that specify one."},"items":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/AMBListPickerItem"},"description":"The rows in this section."},"multiple_selection":{"type":"boolean","default":false,"description":"Whether the customer can select more than one row in this section."}}},"AMBNativeListPicker":{"type":"object","additionalProperties":false,"required":["sections"],"properties":{"sections":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/AMBListPickerSection"},"description":"The menu's sections, each with its own heading and rows."}}},"AMBLocation":{"type":"object","additionalProperties":false,"dependentRequired":{"latitude":["longitude"],"longitude":["latitude"]},"not":{"required":["coordinates","latitude"],"properties":{"coordinates":{},"latitude":{}}},"properties":{"title":{"type":"string","description":"Name shown for the appointment location."},"latitude":{"type":"number","format":"double","minimum":-90,"maximum":90,"description":"Latitude in degrees. Set together with `longitude`."},"longitude":{"type":"number","format":"double","minimum":-180,"maximum":180,"description":"Longitude in degrees. Set together with `latitude`."},"coordinates":{"type":"string","pattern":"^\\{\\{[ \\t]*[a-z_][a-z0-9_]*[ \\t]*\\}\\}$","description":"Apple Messages template content only: exactly one placeholder, such as `{{ store }}`, set instead of `latitude` and `longitude`. When the template is sent, a `location` variable fills it with its `latitude` and `longitude`, and its `name`, when it has one, replaces `title`. A direct send that includes it returns `422`. Never present on an inbound event.","example":"{{ store }}"},"radius":{"type":"number","format":"double","minimum":0,"description":"Location radius in meters. Apple ignores it without coordinates."}}},"AMBTimeSlot":{"type":"object","additionalProperties":false,"required":["identifier","start_at","duration_seconds"],"properties":{"identifier":{"type":"string","minLength":1,"description":"Opaque slot identifier. Apple may instead return only a localized label in `interactive_reply.reply_message.title`."},"start_at":{"type":"string","minLength":1,"pattern":"^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?(Z|[+-]\\d{2}:\\d{2})|\\{\\{[ \\t]*[a-z_][a-z0-9_]*[ \\t]*\\}\\})$","description":"When this slot begins, as an ISO 8601 date-time with a UTC offset. Seconds and fractional seconds must be zero, for example `2026-09-02T14:30:00Z`; any other value returns `422` with error code `E01001`. The timestamp is converted to UTC for Apple while preserving the instant. In Apple Messages template content it may instead be exactly one placeholder, such as `{{ slot_1 }}`, filled with a `timestamp` variable when the template is sent. A slot after the first whose variable is used nowhere else is optional: a send that omits that variable drops the slot.","example":"2026-09-02T14:30:00Z"},"duration_seconds":{"type":"integer","minimum":0,"description":"Duration in seconds. Zero indicates no duration."}}},"AMBNativeEvent":{"type":"object","additionalProperties":false,"required":["timeslots"],"not":{"required":["timezone","timezone_offset"],"properties":{"timezone":{},"timezone_offset":{}}},"properties":{"identifier":{"type":"string","minLength":1,"description":"Your identifier for the event. Defaults to the message identifier."},"location":{"$ref":"#/components/schemas/AMBLocation","description":"Optional appointment location."},"timezone_offset":{"type":"integer","description":"Minutes from GMT at the event location. Omit it and `timezone` to use the customer's time zone."},"timezone":{"type":"string","minLength":1,"pattern":"^(\\{\\{[ \\t]*[a-z_][a-z0-9_]*[ \\t]*\\}\\}|[A-Za-z][A-Za-z0-9_+-]*(/[A-Za-z0-9_+-]+)*)$","description":"IANA time zone of the event location. Apple receives the zone's offset at the time slots, so a template keeps the right offset across a daylight-saving change. Every slot must have the same offset in the zone: slots on both sides of a clock change return `422`. Set it instead of `timezone_offset`. An unknown zone returns `422`. In Apple Messages template content it may instead be exactly one placeholder, such as `{{ timezone }}`, filled with a `timezone` variable when the template is sent. A direct send with a placeholder returns `422`.","example":"Europe/Amsterdam"},"timeslots":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/AMBTimeSlot"},"description":"Appointment times with RFC 3339 timestamps and duration in seconds."},"image_identifier":{"type":"string","minLength":1,"description":"Identifier of the event image in `interactive.images`."},"title":{"type":"string","description":"Event title. Also supplies the title of each omitted received or reply bubble, where the 512-character bubble text limit applies. Supply both bubbles explicitly to use a longer event title."}}},"AMBFormSplash":{"type":"object","additionalProperties":false,"required":["button_title"],"properties":{"header":{"type":"string"},"splash_text":{"type":"string"},"button_title":{"type":"string","minLength":1},"image_identifier":{"type":"string","minLength":1}}},"AMBFormPageCommon":{"type":"object","required":["page_identifier","type","subtitle"],"properties":{"page_identifier":{"type":"string","minLength":1,"maxLength":19,"description":"Unique identifier for this page."},"type":{"type":"string","minLength":1},"title":{"type":"string"},"subtitle":{"type":"string","description":"Question shown on this page.","minLength":0},"next_page_identifier":{"type":"string","minLength":1,"maxLength":19,"description":"Next page to show. Omit to finish the form. Single-select pages route through their items instead."},"submit_form":{"type":"boolean","default":false,"description":"Marks this page as an end page for the form. A page with no next page also finishes the form."}},"if":{"required":["submit_form"],"properties":{"submit_form":{"const":true}}},"then":{"properties":{"next_page_identifier":{"not":{}}}}},"AMBFormSelectItem":{"type":"object","additionalProperties":false,"required":["identifier","title","value"],"properties":{"identifier":{"type":"string","minLength":1},"title":{"type":"string","minLength":0},"value":{"type":"string","minLength":0},"image_identifier":{"type":"string","minLength":1},"next_page_identifier":{"type":"string","minLength":1,"maxLength":19}}},"AMBFormSelectPage":{"allOf":[{"$ref":"#/components/schemas/AMBFormPageCommon"},{"type":"object","required":["type","items"],"properties":{"type":{"type":"string","minLength":1,"const":"select"},"multiple_selection":{"type":"boolean","default":false},"items":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/AMBFormSelectItem"}}},"if":{"required":["multiple_selection"],"properties":{"multiple_selection":{"const":true}}},"then":{"properties":{"items":{"items":{"properties":{"next_page_identifier":{"not":{}}}}}}},"else":{"properties":{"next_page_identifier":{"not":{}}}}}],"if":{"required":["submit_form"],"properties":{"submit_form":{"const":true}}},"then":{"properties":{"items":{"items":{"properties":{"next_page_identifier":{"not":{}}}}}}},"unevaluatedProperties":false},"AMBFormPickerItem":{"type":"object","additionalProperties":false,"required":["identifier","title","value"],"properties":{"identifier":{"type":"string","minLength":1},"title":{"type":"string","minLength":0},"value":{"type":"string","minLength":0}}},"AMBFormPickerPage":{"allOf":[{"$ref":"#/components/schemas/AMBFormPageCommon"},{"type":"object","required":["type","items"],"properties":{"type":{"type":"string","minLength":1,"const":"picker"},"picker_title":{"type":"string","description":"Text beside the picker field. Omit to center the field without a label."},"selected_item_index":{"type":"integer","minimum":0,"description":"Zero-based index into `items`. Defaults to `0`. Must be less than the number of items; otherwise sending returns `422` `AMBFormPagesInvalid`."},"items":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/AMBFormPickerItem"}}}}],"unevaluatedProperties":false},"AMBFormDatePickerOptions":{"type":"object","additionalProperties":false,"description":"Apple defaults to UTC when interpreting these dates.","properties":{"date_format":{"type":"string","minLength":1,"description":"Format used to read the date values in these options. Defaults to `MM/dd/yyyy`."},"start_date":{"type":"string","minLength":1,"description":"Date initially shown by the picker, written in `date_format`. Defaults to the current date."},"maximum_date":{"type":"string","minLength":1,"description":"Latest date the picker shows, written in `date_format`. Defaults to the current date."},"minimum_date":{"type":"string","minLength":1,"description":"Earliest date the picker shows, written in `date_format`."},"label_text":{"type":"string","description":"Label beside the date field. Defaults to `Date`."}}},"AMBFormDatePickerPage":{"allOf":[{"$ref":"#/components/schemas/AMBFormPageCommon"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","minLength":1,"const":"date_picker"},"hint_text":{"type":"string"},"options":{"$ref":"#/components/schemas/AMBFormDatePickerOptions"}}}],"unevaluatedProperties":false},"AMBFormInputType":{"type":"string","minLength":1,"enum":["singleline","multiline"]},"AMBFormKeyboardType":{"type":"string","minLength":1,"x-extensible-enum":["default","asciiCapable","numbersAndPunctuation","URL","numberPad","phonePad","namePhonePad","emailAddress","decimalPad","webSearch"],"description":"Apple UIKit value, passed through without changing its spelling."},"AMBFormTextContentType":{"type":"string","minLength":1,"x-extensible-enum":["name","namePrefix","givenName","middleName","familyName","nameSuffix","nickname","jobTitle","organizationName","location","fullStreetAddress","streetAddressLine1","streetAddressLine2","addressCity","addressState","addressCityAndState","sublocality","countryName","postalCode","telephoneNumber","emailAddress","URL","creditCardNumber","username","password","newPassword","oneTimeCode"],"description":"Apple UIKit value, passed through without changing its spelling."},"AMBFormInputOptions":{"type":"object","additionalProperties":false,"properties":{"regex":{"type":"string","minLength":1,"description":"Pattern Apple uses to validate the input. Use JSON string escaping for backslashes."},"placeholder":{"type":"string","description":"Shown when the field is empty. Defaults to `Required` when `required` is true, otherwise `Optional`."},"required":{"type":"boolean","default":false,"description":"Disables the next-page button until the customer enters a value."},"input_type":{"$ref":"#/components/schemas/AMBFormInputType","description":"Defaults to `singleline`."},"label_text":{"type":"string","description":"Label for `singleline` input only. Omit for no label."},"prefix_text":{"type":"string","description":"Text beside `singleline` input only, such as a currency symbol. Omit for no prefix."},"maximum_character_count":{"type":"integer","minimum":1,"description":"Defaults to 30 for `singleline` input and 300 for `multiline` input."},"keyboard_type":{"$ref":"#/components/schemas/AMBFormKeyboardType","description":"Keyboard to display. Defaults to `default`."},"text_content_type":{"$ref":"#/components/schemas/AMBFormTextContentType","description":"Content hint used for autofill."}}},"AMBFormInputPage":{"allOf":[{"$ref":"#/components/schemas/AMBFormPageCommon"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","minLength":1,"const":"input"},"hint_text":{"type":"string"},"options":{"$ref":"#/components/schemas/AMBFormInputOptions"}}}],"unevaluatedProperties":false},"AMBFormPage":{"oneOf":[{"$ref":"#/components/schemas/AMBFormSelectPage"},{"$ref":"#/components/schemas/AMBFormPickerPage"},{"$ref":"#/components/schemas/AMBFormDatePickerPage"},{"$ref":"#/components/schemas/AMBFormInputPage"}],"discriminator":{"propertyName":"type","mapping":{"select":"#/components/schemas/AMBFormSelectPage","picker":"#/components/schemas/AMBFormPickerPage","date_picker":"#/components/schemas/AMBFormDatePickerPage","input":"#/components/schemas/AMBFormInputPage"}}},"AMBNativeFormData":{"type":"object","additionalProperties":false,"required":["start_page_identifier","pages"],"properties":{"start_page_identifier":{"type":"string","minLength":1,"maxLength":19,"description":"Identifier of the first page to show."},"private":{"type":"boolean","default":false,"description":"Whether Apple marks the submitted response as private."},"show_summary":{"type":"boolean","default":false,"description":"Whether Apple shows a summary before the customer submits."},"splash":{"$ref":"#/components/schemas/AMBFormSplash"},"pages":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/AMBFormPage"},"description":"Form pages referenced by the start page and navigation identifiers."}}},"AMBNativeDynamic":{"type":"object","additionalProperties":false,"required":["data"],"description":"Form content. Bird supplies Apple’s messageForms template and protocol version.","properties":{"data":{"$ref":"#/components/schemas/AMBNativeFormData"}}},"AMBIMessageApp":{"type":"object","additionalProperties":false,"description":"A custom iMessage app interaction. It also requires both `received_message` and `reply_message`.","required":["app_id","app_name","bid","url","app_icon_source_url","use_live_layout"],"properties":{"app_id":{"type":"string","minLength":1,"description":"App Store identifier of the iMessage app."},"app_name":{"type":"string","minLength":1,"description":"Name of the iMessage app."},"bid":{"type":"string","minLength":1,"description":"Identifier of the iMessage extension, in Apple's `com.apple.messages.MSMessageExtensionBalloonPlugin:team-id:extension-id` format."},"url":{"x-sensitive":true,"type":"string","minLength":1,"description":"Opaque URL string that Messages passes to the iMessage app.","example":"?order=1234&view=detail"},"app_icon_source_url":{"type":"string","minLength":1,"description":"Publicly accessible HTTPS URL of the app's PNG icon. The icon must be smaller than 15 kB. We fetch and include it in the request to Apple. A non-HTTPS URL is refused with a `422` `AMBEndpointNotHTTPS`. In a template it may contain `{{ }}` placeholders; the rendered value must be HTTPS.","x-sensitive":true},"use_live_layout":{"type":"boolean","description":"Whether Messages renders the received and reply bubbles using Live Layout."}}},"AMBNativePayment":{"type":"object","additionalProperties":false,"readOnly":true,"description":"An Apple Pay request. Read-only. It appears on existing messages, and sends and templates do not accept it. Apple Pay requests are in preview. Contains no payment token or provider credentials.","required":["payment_id"],"properties":{"payment_id":{"readOnly":true,"$ref":"#/components/schemas/AMBPaymentID"}}},"AMBAuthenticationID":{"type":"string","minLength":1,"pattern":"^amauth_[0-9a-hjkmnp-tv-z]{26}$","example":"amauth_01krdgeqcxet5s7t44vh8rt9mg"},"AMBNativeAuthentication":{"type":"object","additionalProperties":false,"readOnly":true,"description":"An identity verification request. Read-only. It appears on existing messages, and sends and templates do not accept it. Contains no authorization parameters or credentials.","required":["authentication_id"],"properties":{"authentication_id":{"readOnly":true,"$ref":"#/components/schemas/AMBAuthenticationID"}}},"AMBInteractive":{"type":"object","additionalProperties":false,"x-sensitive":true,"description":"Something for the customer to tap: exactly one of `quick_reply`, `list_picker`, `event` (a time picker), `dynamic` (a form) or `imessage_app`. To introduce it with text or files, send `text` alongside it; that text arrives as its own bubble first. `payment` and `authenticate` are read-only. They appear on existing messages that contain an Apple Pay or identity verification request. Sends and templates do not accept them.","oneOf":[{"required":["quick_reply"],"not":{"anyOf":[{"required":["list_picker"],"properties":{"list_picker":{}}},{"required":["event"],"properties":{"event":{}}},{"required":["dynamic"],"properties":{"dynamic":{}}},{"required":["imessage_app"],"properties":{"imessage_app":{}}},{"required":["payment"],"properties":{"payment":{}}},{"required":["authenticate"],"properties":{"authenticate":{}}}]}},{"required":["list_picker"],"not":{"anyOf":[{"required":["quick_reply"],"properties":{"quick_reply":{}}},{"required":["event"],"properties":{"event":{}}},{"required":["dynamic"],"properties":{"dynamic":{}}},{"required":["imessage_app"],"properties":{"imessage_app":{}}},{"required":["payment"],"properties":{"payment":{}}},{"required":["authenticate"],"properties":{"authenticate":{}}}]}},{"required":["event"],"not":{"anyOf":[{"required":["quick_reply"],"properties":{"quick_reply":{}}},{"required":["list_picker"],"properties":{"list_picker":{}}},{"required":["dynamic"],"properties":{"dynamic":{}}},{"required":["imessage_app"],"properties":{"imessage_app":{}}},{"required":["payment"],"properties":{"payment":{}}},{"required":["authenticate"],"properties":{"authenticate":{}}}]}},{"required":["dynamic"],"not":{"anyOf":[{"required":["quick_reply"],"properties":{"quick_reply":{}}},{"required":["list_picker"],"properties":{"list_picker":{}}},{"required":["event"],"properties":{"event":{}}},{"required":["imessage_app"],"properties":{"imessage_app":{}}},{"required":["payment"],"properties":{"payment":{}}},{"required":["authenticate"],"properties":{"authenticate":{}}}]}},{"required":["imessage_app","received_message","reply_message"],"not":{"anyOf":[{"required":["quick_reply"],"properties":{"quick_reply":{}}},{"required":["list_picker"],"properties":{"list_picker":{}}},{"required":["event"],"properties":{"event":{}}},{"required":["dynamic"],"properties":{"dynamic":{}}},{"required":["payment"],"properties":{"payment":{}}},{"required":["authenticate"],"properties":{"authenticate":{}}},{"required":["images"],"properties":{"images":{}}},{"required":["request_identifier"],"properties":{"request_identifier":{}}}]}},{"required":["payment"],"not":{"anyOf":[{"required":["quick_reply"],"properties":{"quick_reply":{}}},{"required":["list_picker"],"properties":{"list_picker":{}}},{"required":["event"],"properties":{"event":{}}},{"required":["dynamic"],"properties":{"dynamic":{}}},{"required":["imessage_app"],"properties":{"imessage_app":{}}},{"required":["authenticate"],"properties":{"authenticate":{}}}]}},{"required":["authenticate"],"not":{"anyOf":[{"required":["quick_reply"],"properties":{"quick_reply":{}}},{"required":["list_picker"],"properties":{"list_picker":{}}},{"required":["event"],"properties":{"event":{}}},{"required":["dynamic"],"properties":{"dynamic":{}}},{"required":["imessage_app"],"properties":{"imessage_app":{}}},{"required":["payment"],"properties":{"payment":{}}}]}}],"properties":{"received_message":{"$ref":"#/components/schemas/AMBMessageBubble","description":"Content Messages shows in the received message bubble. For a list picker, time picker or form, this is the visible introduction."},"reply_message":{"$ref":"#/components/schemas/AMBMessageBubble","description":"Content Messages shows in the reply message bubble."},"session_identifier":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$","description":"Session UUID to preserve across interactions. Apple creates one when omitted."},"request_identifier":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$","description":"Correlation identifier for this interaction. Bird generates one when omitted. Use a new value for each message. A reply is linked to its request only when no other sent message in the conversation uses the same identifier."},"images":{"type":"array","items":{"$ref":"#/components/schemas/AMBNativeImage"},"description":"Images the interaction references by `image_identifier`, such as list picker thumbnails."},"quick_reply":{"$ref":"#/components/schemas/AMBNativeQuickReply"},"list_picker":{"$ref":"#/components/schemas/AMBNativeListPicker"},"event":{"$ref":"#/components/schemas/AMBNativeEvent"},"dynamic":{"$ref":"#/components/schemas/AMBNativeDynamic"},"imessage_app":{"$ref":"#/components/schemas/AMBIMessageApp"},"payment":{"$ref":"#/components/schemas/AMBNativePayment","readOnly":true},"authenticate":{"$ref":"#/components/schemas/AMBNativeAuthentication","readOnly":true}},"example":{"received_message":{"title":"Pick a delivery slot"},"list_picker":{"sections":[{"title":"Tomorrow","items":[{"identifier":"am","title":"Morning"}]}]}}},"AMBNativeInboundImage":{"type":"object","additionalProperties":false,"required":["identifier","download_url"],"properties":{"identifier":{"type":"string","description":"Identifier used by the received message.","minLength":1},"description":{"type":"string","description":"Accessibility description supplied by Apple.","x-sensitive":true},"download_url":{"type":"string","description":"Relative Bird API URL for downloading the image with the same authentication and workspace as the message.","format":"uri-reference","minLength":1}}},"AMBNativeInboundQuickReply":{"type":"object","additionalProperties":false,"required":["selected_identifier"],"properties":{"selected_identifier":{"type":"string","description":"Identifier selected by the customer.","minLength":1},"selected_index":{"type":"integer","minimum":0,"description":"Index reported by Apple."},"items":{"type":"array","items":{"$ref":"#/components/schemas/AMBQuickReplyItem"},"description":"Items returned by the customer device."}}},"AMBNativeInboundListPickerSection":{"type":"object","additionalProperties":false,"required":["items"],"properties":{"title":{"type":"string","minLength":1,"description":"Heading shown above this section's rows."},"order":{"type":["integer","null"],"minimum":0,"description":"Where this section sits relative to its siblings, ascending. Sections omitting it are laid out in list order, after any that specify one."},"items":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/AMBListPickerItem"},"description":"The rows in this section."},"multiple_selection":{"type":"boolean","default":false,"description":"Whether the customer can select more than one row in this section."}}},"AMBNativeInboundListPicker":{"type":"object","additionalProperties":false,"required":["sections"],"properties":{"sections":{"type":"array","items":{"$ref":"#/components/schemas/AMBNativeInboundListPickerSection"},"description":"Sections returned by Apple. Sections can include unselected options; preserve their titles and item grouping."}}},"AMBNativeInboundEvent":{"type":"object","additionalProperties":false,"properties":{"identifier":{"type":"string","minLength":1,"description":"Event identifier returned by Apple, when provided."},"location":{"$ref":"#/components/schemas/AMBLocation","description":"Optional appointment location."},"timezone_offset":{"type":"integer","description":"Minutes from GMT at the event location. Omit to use the customer's time zone."},"timeslots":{"type":"array","items":{"$ref":"#/components/schemas/AMBTimeSlot"},"description":"Time slots returned by Apple. May be empty when the device supplies only a selected label."},"image_identifier":{"type":"string","minLength":1,"description":"Identifier of the event image in `interactive_reply.images`."},"title":{"type":"string","description":"Event title."}}},"AMBFormPageType":{"type":"string","minLength":1,"enum":["select","picker","date_picker","input"],"description":"Type of form page in an Apple Messages for Business interactive form:\n\n- `select` means a single-choice or multiple-choice selection list.\n- `picker` means a wheel picker over a list of items.\n- `date_picker` means a date selector.\n- `input` means a single-line or multi-line text field.\n"},"AMBInboundFormItem":{"type":"object","additionalProperties":false,"required":["identifier","type","title","value"],"properties":{"identifier":{"type":"string","minLength":1},"type":{"$ref":"#/components/schemas/AMBFormPageType"},"title":{"type":"string","minLength":0,"x-sensitive":true,"description":"Display value Apple returned, including any input prefix. May be empty for an optional input."},"value":{"type":"string","minLength":0,"x-sensitive":true,"description":"Machine value Apple returned for the selection or input. May be empty for an optional input."}}},"AMBInboundFormSelection":{"type":"object","additionalProperties":false,"required":["page_identifier","title","subtitle","items"],"properties":{"page_identifier":{"type":"string","minLength":1},"title":{"type":"string","minLength":0,"description":"Page title returned by Apple. Empty when the page has no title."},"subtitle":{"type":"string","minLength":1},"items":{"type":"array","items":{"$ref":"#/components/schemas/AMBInboundFormItem"}}}},"AMBNativeInboundFormData":{"type":"object","additionalProperties":false,"required":["selections"],"properties":{"private":{"type":"boolean","default":false,"description":"Whether the sender asked the MSP to treat this form response as private."},"selections":{"type":"array","items":{"$ref":"#/components/schemas/AMBInboundFormSelection"}}}},"AMBNativeInboundDynamic":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"$ref":"#/components/schemas/AMBNativeInboundFormData"}}},"AMBNativeInboundPayment":{"type":"object","additionalProperties":false,"x-sensitive":true,"properties":{"state":{"type":"string","description":"Payment state reported by Apple. This does not confirm that a payment settled."}}},"AMBNativeInboundAuthentication":{"type":"object","additionalProperties":false,"x-sensitive":true,"properties":{"status":{"type":"string","description":"Authentication status reported by Apple. This does not establish an authenticated Bird session."}}},"AMBInboundIMessageApp":{"type":"object","additionalProperties":false,"description":"The custom iMessage app a customer replied from.","properties":{"app_id":{"type":"string","description":"Custom app identifier."},"app_name":{"type":"string","description":"Custom app name."},"bid":{"type":"string","description":"Apple extension identifier."},"url":{"type":"string","description":"Opaque custom app response URL.","x-sensitive":true},"use_live_layout":{"type":"boolean","description":"Whether the app uses live layout."},"app_icon_url":{"type":"string","description":"Relative Bird API URL for downloading the custom app icon with the same authentication and workspace as the message.","format":"uri-reference"}}},"AMBInteractiveReply":{"type":"object","additionalProperties":false,"x-sensitive":true,"description":"What the customer answered on an interactive message: their choice, time slot, form answers, payment result, sign-in result or custom app reply, under the same key as the request. Inbound only; a message that offers something to tap reads as `interactive` instead.","properties":{"received_message":{"$ref":"#/components/schemas/AMBMessageBubble"},"reply_message":{"$ref":"#/components/schemas/AMBMessageBubble"},"session_identifier":{"type":"string","description":"Apple interaction session identifier."},"request_identifier":{"type":"string","description":"Correlation identifier reported by Apple."},"images":{"type":"array","items":{"$ref":"#/components/schemas/AMBNativeInboundImage"},"description":"Images returned by Apple, with authenticated download URLs."},"quick_reply":{"$ref":"#/components/schemas/AMBNativeInboundQuickReply"},"list_picker":{"$ref":"#/components/schemas/AMBNativeInboundListPicker"},"event":{"$ref":"#/components/schemas/AMBNativeInboundEvent"},"dynamic":{"$ref":"#/components/schemas/AMBNativeInboundDynamic"},"payment":{"$ref":"#/components/schemas/AMBNativeInboundPayment"},"authenticate":{"$ref":"#/components/schemas/AMBNativeInboundAuthentication"},"imessage_app":{"$ref":"#/components/schemas/AMBInboundIMessageApp"}},"example":{"request_identifier":"6f1c2a4e-8b7d-4c3a-9e1f-2d5b7a9c0e3f","quick_reply":{"selected_identifier":"yes","selected_index":0}}},"AMBMessagePartKind":{"type":"string","minLength":1,"x-extensible-enum":["text","link_preview","rich_link","interactive"],"description":"What one part of an outbound message was:\n\n- `text`: Part of the message's text, with the attachments placed in it.\n- `link_preview`: A link from the text, sent as a preview Bird built from the page.\n- `rich_link`: The message's own `rich_link`.\n- `interactive`: The message's own `interactive`.\n"},"AMBMessagePart":{"type":"object","additionalProperties":false,"description":"One part of the split an outbound message was sent in. `title`, `image_url` and `layout` record what a card showed, not what a request chose. Bird reads them when it sends the part, except on a `rich_link` Apple built from its URL, where it reads the linked page around the time Apple accepts the part. They can be absent, as each field says.","required":["kind","sent"],"properties":{"kind":{"$ref":"#/components/schemas/AMBMessagePartKind"},"body":{"type":"string","minLength":1,"description":"The text this part sent. U+FFFC marks an attachment's place, as in `text.body`.","example":"Track your order:","x-sensitive":true},"subject":{"type":"string","minLength":1,"description":"The message's subject, on the part that had it.","example":"Your order","x-sensitive":true},"attachments":{"type":"array","items":{"type":"integer","minimum":0},"description":"Positions in `text.attachments` of the attachments this part sent.","example":[0]},"url":{"type":"string","minLength":1,"format":"uri","description":"The link a `link_preview` part previewed, as Bird sent it.","example":"https://example.com/orders/123","x-sensitive":true},"title":{"type":"string","minLength":1,"description":"The title a card showed. On a `link_preview` part it is the page's title, read when the part was sent. On a `rich_link` part Apple built from its URL it is the title Apple returned for the card. When Apple returned none, or returned a web address in its place, it is the linked page's title. Apple builds that card on the device, so the title it shows can differ. A title longer than 512 bytes is cut to that length. Absent on other parts, on a part Apple did not accept, and on a `rich_link` Apple built when Apple supplied no title or only a web address and the linked page supplied none or Bird could not read it. On a `link_preview` part it is also absent when Bird sent the part in an earlier attempt of a retried send, or had to save the send's result again.","example":"Your order","x-sensitive":true},"image_url":{"type":"string","minLength":1,"format":"uri","description":"The address of the image a card showed. On a `link_preview` part it is the page image Bird fetched and sent. On a `rich_link` part Apple built from its URL it is the image the linked page offers, read around the time Apple accepted the part. Apple builds that card on the device, so the image it shows can differ. On both kinds the address is the page's own. Bird keeps no copy of the image, and the address can stop serving it later. Absent on other parts, on a part Apple did not accept, when the address is longer than 2,048 bytes, and when Bird could not read the page or the page offers no image. On a `link_preview` part it is also absent when Bird sent the part in an earlier attempt of a retried send, or had to save the send's result again.","example":"https://example.com/orders/123/cover.png","x-sensitive":true},"layout":{"$ref":"#/components/schemas/AMBRichLinkLayout","description":"The layout Apple's sizing rules give the image Bird sent for a `link_preview` or `rich_link` part, measured from that image's width and shape. Bird does not see the device. A `large` image keeps its own proportions unless `large` was the chosen layout. Absent on other parts, on a part Apple did not accept, on a `rich_link` Apple built from its URL, because Bird sends no image for it, and when Bird sent the part in an earlier attempt of a retried send, or had to save the send's result again."},"sent":{"type":"boolean","description":"Whether Bird saw Apple accept this part. After a failed send, the part that failed and every part after it are `false`, but a `false` part may still have arrived if Apple's answer was lost, so do not resend it on that alone.","example":true}},"if":{"properties":{"kind":{"const":"link_preview"}}},"then":{"required":["url"],"properties":{"kind":{},"subject":{},"sent":{},"url":{},"title":{},"image_url":{},"layout":{},"body":{"not":{}},"attachments":{"not":{}}}},"else":{"properties":{"kind":{},"body":{},"subject":{},"attachments":{},"sent":{},"layout":{},"title":{},"image_url":{},"url":{"not":{}}}}},"AMBError":{"type":["object","null"],"additionalProperties":false,"readOnly":true,"required":["code","description","occurred_at"],"description":"Failure detail for a message or invitation that could not be sent or was rejected.","properties":{"code":{"$ref":"#/components/schemas/AMBStatsErrorCode"},"description":{"type":"string","minLength":1,"description":"The failure in words. Free-form, so branch on `code` and show this to a human.","example":"Apple refused the message with HTTP status 404."},"occurred_at":{"type":"string","format":"date-time","minLength":1,"description":"When the failure occurred."}}},"AMBTemplateVersionID":{"type":"string","minLength":1,"pattern":"^amv_[0-9a-hjkmnp-tv-z]{26}$","example":"amv_01krdgeqcxet5s7t44vh8rt9mg"},"AMBTemplateContentHash":{"type":"string","minLength":1,"readOnly":true,"description":"A fingerprint of Apple Messages template content, prefixed with its algorithm. Compare it within this API version to identify the exact source without transferring it.\n","example":"sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"},"AMBMessage":{"type":"object","additionalProperties":false,"dependentRequired":{"reply_message_id":["replied_at"],"replied_at":["reply_message_id"]},"required":["id","conversation_id","business_account_id","direction","status","kind","created_at","cost","requested_language","resolved_language","template_id","template_version_id","template_content_hash"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/AMBMessageID","description":"ID of the message, assigned when it is accepted or received. Pass it as `message_id` to the get-message and list-events endpoints."},"conversation_id":{"readOnly":true,"$ref":"#/components/schemas/AMBConversationID","description":"The conversation this message belongs to."},"business_account_id":{"readOnly":true,"$ref":"#/components/schemas/AMBBusinessID","description":"The business the message was sent from or received by."},"from":{"type":"string","readOnly":true,"minLength":1,"description":"Apple business identifier on outbound messages, or the customer's opaque Apple identifier on inbound messages. Omitted when that address is unavailable on a historical record."},"to":{"type":"string","readOnly":true,"minLength":1,"description":"Customer's opaque Apple identifier on outbound messages, or the Apple business identifier on inbound messages. Omitted when that address is unavailable on a historical record."},"direction":{"readOnly":true,"$ref":"#/components/schemas/AMBMessageDirection"},"status":{"readOnly":true,"$ref":"#/components/schemas/AMBMessageStatus"},"kind":{"readOnly":true,"$ref":"#/components/schemas/AMBContentKind","description":"Derived content classification for filtering and statistics."},"source":{"readOnly":true,"$ref":"#/components/schemas/AMBMessageSource","description":"Who sent this message. Absent on an inbound message, which has no source to report."},"text":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/AMBText"}],"description":"The message's text and files. Next to `rich_link`, `interactive` or `interactive_reply`, it is the text that came with them."},"rich_link":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/AMBRichLink"}],"description":"The link preview an outbound message carried.","example":{"rich_link_construct":{"url":"https://apps.apple.com/app/id123456789?clip=1","store_region":"US"}}},"interactive":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/AMBInteractive"}],"description":"What an outbound message offered the customer to tap."},"interactive_reply":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/AMBInteractiveReply"}],"description":"What the customer answered, on an inbound message replying to an interactive message."},"parts":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/AMBMessagePart"},"description":"The parts an outbound message was sent as, in the order Bird sent them, so one message can arrive as several. Each link in the text goes as its own preview. A `rich_link` takes the place of the first copy of its URL in the text, which splits the text around it, and goes last when the text does not contain it. An `interactive` goes after the text. A card part also says what it showed, when Bird still has that when the send finishes. A message can also go out as one `rich_link` or `interactive` part that has its text. Set when the send finishes as `sent` or `send_failed`. Absent on inbound messages, when the text could not be split so nothing was sent, such as a text with more than 20 links, and on older messages, so treat a missing `parts` as unknown.","example":[{"kind":"text","body":"Track your order:","sent":true},{"kind":"link_preview","url":"https://example.com/orders/123","title":"Your order","image_url":"https://example.com/orders/123/cover.png","layout":"large","sent":true}]},"in_reply_to_message_id":{"readOnly":true,"$ref":"#/components/schemas/AMBMessageID","description":"Original message matched through Apple’s request identifier within the same workspace, business, and conversation. Omitted when no verified match exists, including when more than one sent message in the conversation uses the reply's request identifier."},"reply_message_id":{"readOnly":true,"$ref":"#/components/schemas/AMBMessageID","example":"amb_01krdgh7m2zq8w4x6y9b3c5d7e","description":"Latest customer reply whose `in_reply_to_message_id` names this message. Omitted until a reply is matched, and in webhook payloads."},"replied_at":{"type":"string","format":"date-time","readOnly":true,"description":"When Apple delivered the reply in `reply_message_id` to Bird. This can be slightly earlier than that reply's `created_at`, which records when Bird processed it. Omitted until a reply is matched, and in webhook payloads.","example":"2026-10-13T10:09:00Z"},"locale":{"type":["string","null"],"readOnly":true,"minLength":1,"description":"Locale for this message, preserved in Apple’s format, for example en_US. Outbound messages use the request override, then the conversation locale, then the business default. Inbound messages preserve the locale in Apple’s callback. Null when unknown.","example":"en_US"},"category":{"type":"string","readOnly":true,"description":"The category this message was sent with, for reporting only. It does not affect sending or suppression policy, or select an Apple department or purpose. Defaults to an empty string when a send names no category. Absent on an inbound message, which has no category to report.","example":"order_update"},"metadata":{"type":"object","additionalProperties":true,"description":"Arbitrary JSON object for per-message context. Maximum 2 KB serialized. Top-level keys beginning with `__bird` are reserved. Returned in the send response, message reads and customer message webhooks.","readOnly":true},"tags":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/Tag"},"description":"Structured `{name, value}` filter labels applied to this message. Absent on an inbound message."},"reference":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/MessageReference"}],"description":"The `reference` from the send request. Absent when the send set none, and on inbound messages."},"cost":{"readOnly":true,"$ref":"#/components/schemas/MessageCost","description":"Recorded per-message charge before MAC pricing. Null in the initial send response, while unpriced, and for MAC-covered replies. MAC fees belong to monthly contact usage, not individual messages. Historical charges have no priced passthrough component."},"last_error":{"readOnly":true,"description":"Failure detail on a message whose send failed or that Bird rejected before any send attempt. Omitted when there is no failure detail.","$ref":"#/components/schemas/AMBError"},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"The moment this message was accepted (outbound), or recorded by Bird after Apple delivered it (inbound). This is the timestamp the outbound statistics families bucket and attribute on; there is no separate `accepted_at` field."},"sent_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the selected sending outcome occurred. Null unless the current status is `sent` and the message is outbound. For older messages without a retained sending event, the stored record time is used."},"group":{"type":"string","readOnly":true,"minLength":1,"description":"Apple department identifier carried by this message. Omitted when absent from the message or unavailable on a historical record."},"intent":{"type":"string","readOnly":true,"minLength":1,"description":"Apple purpose identifier carried by this message. Omitted when absent from the message or unavailable on a historical record."},"requested_language":{"readOnly":true,"description":"The template language requested by the send, in canonical form. Null when the send named no language or used no template.\n","oneOf":[{"$ref":"#/components/schemas/LanguageTag"},{"type":"null"}]},"resolved_language":{"readOnly":true,"description":"The template language whose text was rendered, in canonical form. Null when the send used no template. This can differ from `requested_language` when the template's fallback policy selects another language.\n","oneOf":[{"$ref":"#/components/schemas/LanguageTag"},{"type":"null"}]},"template_id":{"readOnly":true,"description":"The template rendered for this message, or null for a message sent with native content.","oneOf":[{"$ref":"#/components/schemas/AMBTemplateID"},{"type":"null"}]},"template_version_id":{"readOnly":true,"description":"The workspace published version or synthetic built-in version rendered at acceptance, or null for a message sent with native content. For a built-in template, `template_content_hash` identifies the exact catalogue source.\n","oneOf":[{"$ref":"#/components/schemas/AMBTemplateVersionID"},{"type":"null"}]},"template_content_hash":{"readOnly":true,"description":"The rendered language's source fingerprint, or null for a message sent with native content.","oneOf":[{"$ref":"#/components/schemas/AMBTemplateContentHash"},{"type":"null"}]}}},"AMBMessageList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of Apple Messages for Business messages, newest first.","items":{"$ref":"#/components/schemas/AMBMessage"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"AMBTemplateSend":{"type":"object","additionalProperties":false,"description":"A send-by-template reference. Identify the template by `id` or `slug`. Supply exactly one reference, optionally select a language, and pass variable values in `parameters`.\n","oneOf":[{"required":["id"]},{"required":["slug"]}],"properties":{"id":{"description":"The workspace or built-in template to send, by ID.","$ref":"#/components/schemas/AMBTemplateID"},"slug":{"allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"description":"The workspace or built-in template to send, by its immutable slug. Read the template's live version to see its variables.\n","example":"bird_order_update"},"language":{"allOf":[{"$ref":"#/components/schemas/LanguageTag"}],"description":"Which of the template's languages to send. Omit it to send the template's default language, unless the template sets `language_source_required`, in which case a send naming no language is rejected. When the template does not carry the language you ask for, its own `on_missing_language` setting decides whether the closest available language is sent instead or the send is rejected.\n","example":"fr"},"parameters":{"type":"object","additionalProperties":true,"description":"Values for the template's variables, keyed by variable name. Read the live version to see the accepted keys and formats. A `location` variable takes an object with `latitude` and `longitude`, and optionally `name`, which becomes the location's title. `address` is accepted for parity with WhatsApp and is not shown on Apple Messages. Every other variable takes a string, number or boolean. A missing required key, an undeclared key, an invalid value, or a serialized object over 16 KiB returns `422`.\n","example":{"name":"Jamie"}}}},"AMBMessageSendRequest":{"type":"object","additionalProperties":false,"description":"A message to send. Supply `text`, `rich_link` or `interactive` (the last two optionally with `text` to introduce them), or `template` (a stored template, whose category is derived).\n","required":["from","to"],"not":{"anyOf":[{"required":["rich_link","interactive"],"properties":{"rich_link":{},"interactive":{}}},{"required":["template","text"],"properties":{"template":{},"text":{}}},{"required":["template","rich_link"],"properties":{"template":{},"rich_link":{}}},{"required":["template","interactive"],"properties":{"template":{},"interactive":{}}},{"required":["template","category"],"properties":{"template":{},"category":{}}}]},"properties":{"from":{"type":"string","minLength":1,"description":"Apple business identifier of the brand sending the message. Read it from the business’s apple_business_id. The customer must have opened the conversation with this business.","example":"b52d6267-2b62-4f8a-8842-0533d0f1dc07"},"to":{"example":"opaque-customer-id","type":"string","minLength":1,"description":"Apple’s opaque customer identifier for this business, available as the conversation’s recipient.opaque_user_id. The conversation must exist and its native status must be open."},"source":{"$ref":"#/components/schemas/AMBMessageSource","description":"Who this message is sent as. A signed-in session may send as `operator` or `automation`; an API key may send as `api` or `automation`. Omit it to take the default for your credential. Naming a source your credential cannot use is refused with a `422` `AMBMessageSourceNotPermitted`."},"text":{"allOf":[{"$ref":"#/components/schemas/AMBText"}],"description":"A text message. Alongside `interactive`, it is sent first as its own text bubble, in the same message. Alongside `rich_link`, the card takes the place of the first copy of its URL in `body`, splitting the text around it, or follows the text when `body` does not contain that URL. Later copies of that URL are removed."},"rich_link":{"allOf":[{"$ref":"#/components/schemas/AMBRichLink"}],"description":"A link with a preview card."},"interactive":{"allOf":[{"$ref":"#/components/schemas/AMBInteractive"}],"description":"Something for the customer to tap, such as quick replies, a list picker, a time picker, a form or a custom iMessage app."},"template":{"allOf":[{"$ref":"#/components/schemas/AMBTemplateSend"}],"description":"Send using a stored template instead of `text`, `rich_link` or `interactive`. The category is derived from the template, so `category` is rejected alongside it.\n"},"category":{"type":"string","maxLength":64,"description":"Free-form reporting label; it does not change sending or suppression policy, for example `order_update`. Omit it to send with the default empty category. Rejected alongside `template`, where the category is derived from the template.","example":"order_update"},"metadata":{"type":"object","additionalProperties":true,"description":"Arbitrary JSON object for per-message context. Maximum 2 KB serialized. Top-level keys beginning with `__bird` are reserved. Returned in the send response, message reads and customer message webhooks."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"},"maxItems":20,"description":"Structured `{name, value}` labels for filtering. Maximum 20 tags per send."},"reference":{"allOf":[{"$ref":"#/components/schemas/MessageReference"}],"description":"An identifier you want to find this message by, such as an order or ticket number, matched exactly by the message list's `reference` filter. Set it only when you need to search on it, and put any other data in `metadata`. Stored on the message, returned on reads and echoed in webhook payloads. Several messages can share one.\n"},"group":{"type":"string","description":"Department identifier for this message."},"intent":{"type":"string","description":"Purpose of this conversation."},"locale":{"type":"string","description":"Apple locale identifier, for example en_US. Defaults to the conversation locale."},"skip_typing":{"type":"boolean","default":false,"description":"Send the first part without the typing indicator and one-second pause Bird otherwise shows before it. Set it only after you sent `typing_start` with the conversation typing operation, so the customer already sees typing. A first part that Apple accepts clears that indicator when it arrives. If Bird accepts the message but it fails before then, such as a failed send or a rejection during processing, Bird sends `typing_end` instead. If the request itself returns an error, nothing is sent, so send `typing_end` yourself. When Bird splits the message into several parts, such as text around a link, the parts after the first keep their typing indicator.\n"}},"example":{"from":"b52d6267-2b62-4f8a-8842-0533d0f1dc07","to":"opaque-customer-id","text":{"body":"Your order is ready."}}},"AMBMessageEventType":{"type":"string","minLength":1,"description":"Message timeline event type:\n\n- `amb.accepted`: The API accepted the request.\n- `amb.sent`: The message was handed to Apple.\n- `amb.send_failed`: Apple refused the message, or its send attempts were exhausted.\n- `amb.rejected`: Bird refused the message before any send attempt.\n- `amb.received`: An inbound message arrived from the customer.\n\nThis is an open enum. Accept unrecognized values.\n","x-extensible-enum":["amb.accepted","amb.sent","amb.send_failed","amb.rejected","amb.received"],"example":"amb.sent"},"AMBMessageEvent":{"type":"object","additionalProperties":false,"required":["id","type","occurred_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/AMBEventID","description":"ID of the event, unique within the message's timeline."},"type":{"readOnly":true,"$ref":"#/components/schemas/AMBMessageEventType"},"occurred_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When this event occurred."},"error":{"readOnly":true,"$ref":"#/components/schemas/AMBError","description":"Failure detail, on an `amb.send_failed` or `amb.rejected` event. Null on every other event type."}}},"AMBMessageEventList":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","description":"The message's events, oldest first. Not paginated: a message's timeline is bounded and returned in full.\n","items":{"$ref":"#/components/schemas/AMBMessageEvent"}}}},"AMBConversationStatus":{"type":"string","minLength":1,"enum":["open","closed"],"description":"Apple's native conversation state, which determines whether replies can be sent. A customer close or an Apple 410 response closes it; a newer inbound message reopens it. This API has no native close operation. Use `inbox_status` to resolve workspace inbox work independently.\n"},"AMBConversationRecipient":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The customer on the other side of this Apple Messages for Business conversation.","required":["opaque_user_id","phone_number"],"properties":{"opaque_user_id":{"type":["string","null"],"minLength":1,"description":"Apple's opaque identifier for this customer with this business. Null when no identifier is recorded."},"phone_number":{"type":["string","null"],"minLength":1,"description":"Customer phone number, or null when unknown. An invitation's destination remains on the invitation's `to` field."},"display_name":{"type":["string","null"],"minLength":1,"description":"Name from the last successful identity verification, or null when none was collected. It can refer to a previous verification and does not establish a current login session."}}},"AMBConversationRouting":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Routing context the conversation is filed under. Routing rules set it when the conversation opens or reopens, or when the customer writes after it was resolved. A teammate can move the queue or apply a pending `routing_change`.","required":["group_id","intent_id","entry_point","queue"],"properties":{"group_id":{"type":["string","null"],"minLength":1,"description":"The business's routing group carried by Apple from the entry point. This identifies a routing destination within the business. Null when the message that set the current routing carried no group."},"intent_id":{"type":["string","null"],"minLength":1,"description":"Intent carried by Apple from the entry point, used with `group_id` to route the conversation. Null when the message that set the current routing carried none."},"entry_point":{"type":["string","null"],"minLength":1,"description":"Configured entry point matching the current group and intent. Null when none matched.","example":"support"},"queue":{"type":["string","null"],"minLength":1,"description":"Workspace queue selected by routing or set by a teammate. Null when the conversation is unrouted.","example":"support"}}},"AMBConversationRoutingChange":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Routing from the customer's latest message that names a different group or intent than the conversation's current `routing`. `message_id` is that inbound message and `received_at` is when it arrived. Routing rules select its queue when the message arrives, but the conversation keeps its current queue until you apply the change.","required":["group_id","intent_id","entry_point","queue","message_id","received_at"],"properties":{"group_id":{"type":["string","null"],"minLength":1,"description":"Group carried by the message. Null when the message carried only an intent."},"intent_id":{"type":["string","null"],"minLength":1,"description":"Intent carried by the message. Null when the message carried only a group."},"entry_point":{"type":["string","null"],"minLength":1,"description":"Configured entry point matching the message's group and intent. Null when none matched.","example":"billing"},"queue":{"type":["string","null"],"minLength":1,"description":"Queue routing rules selected for the message's group and intent when it arrived. Null when no rule matched.","example":"billing"},"message_id":{"$ref":"#/components/schemas/AMBMessageID","description":"Inbound message that carried the new group or intent."},"received_at":{"type":"string","format":"date-time","minLength":1,"description":"When that message was received."}}},"AMBConversationLastMessage":{"type":"object","additionalProperties":false,"readOnly":true,"description":"A reference to the most recent message in either direction. Read its content through the conversation's message list.","required":["id","direction","created_at"],"properties":{"id":{"$ref":"#/components/schemas/AMBMessageID","description":"ID of the message."},"direction":{"$ref":"#/components/schemas/AMBMessageDirection"},"created_at":{"type":"string","format":"date-time","minLength":1,"description":"The same `created_at` returned when reading the message. This reference and the conversation transcript use message creation order. Processing an older message again does not move the reference backwards."}}},"AMBConversationOrigin":{"type":"string","minLength":1,"enum":["entry_point","invitation"],"description":"How the conversation started. `entry_point` means the customer opened it from one of your configured Apple Messages for Business entry points. `invitation` means the customer accepted an invitation, which opened the conversation, or whose first message opened it when the acceptance could not (for example while the business was disconnected). This is set once when the conversation is created and never changes.\n"},"AMBConversationClosedReason":{"type":"string","enum":["user_close","gone"],"description":"Why a closed conversation was closed. `user_close` means the customer sent a close message from their device. `gone` means Apple returned a 410 for the conversation. The console renders this as a banner on a closed conversation.\n"},"AMBAuthenticationStatus":{"type":"string","description":"Progress of an authentication request. Every value except `pending` and `processing` is terminal.\n\n- `pending`: the sign-in message was accepted and the customer has not finished.\n- `processing`: the authorization code is being exchanged or Bird is waiting for confirmation from the originating Messages device.\n- `succeeded`: the identity was validated and the originating Messages device confirmed sign-in.\n- `failed`: delivery, identity verification or device confirmation failed, or the provider callback was replayed.\n- `cancelled`: the customer or the provider declined authorization.\n- `expired`: the request passed its ten-minute lifetime.\n- `superseded`: a newer request, or a change to the conversation, business or provider, replaced the request.\n","enum":["pending","processing","succeeded","failed","cancelled","expired","superseded"],"minLength":1},"AMBVerifiedIdentity":{"type":"object","additionalProperties":false,"description":"Validated identity claims. Verification does not create a persistent login session or grant access to customer systems.","required":["issuer","subject","verified_at"],"properties":{"issuer":{"type":"string","minLength":1,"description":"Issuer that verified the identity.","format":"uri","readOnly":true},"subject":{"type":"string","minLength":1,"description":"Provider-issued user identifier. Not necessarily your CRM customer ID.","maxLength":255,"readOnly":true},"name":{"type":"string","minLength":1,"description":"Name supplied by the provider when name collection is enabled.","maxLength":512,"readOnly":true},"email":{"type":"string","minLength":1,"description":"Email supplied by the provider when email collection is enabled.","maxLength":320,"readOnly":true},"email_verified":{"type":"boolean","description":"Whether the provider verified this email address.","readOnly":true},"authenticated_at":{"type":"string","minLength":1,"description":"When the provider says the user authenticated. May precede this verification.","format":"date-time","readOnly":true},"verified_at":{"type":"string","minLength":1,"description":"When Bird completed identity validation and confirmed the originating Messages conversation.","format":"date-time","readOnly":true}}},"AMBAuthentication":{"type":"object","additionalProperties":false,"description":"A single attempt to verify the identity associated with an Apple Messages for Business conversation.","required":["id","conversation_id","provider_id","provider_revision","message_id","status","created_at","expires_at"],"properties":{"id":{"$ref":"#/components/schemas/AMBAuthenticationID","readOnly":true},"conversation_id":{"$ref":"#/components/schemas/AMBConversationID","readOnly":true},"provider_id":{"$ref":"#/components/schemas/AMBAuthenticationProviderID","readOnly":true},"provider_revision":{"type":"integer","format":"int64","minimum":1,"description":"Provider revision used by this attempt.","readOnly":true},"message_id":{"oneOf":[{"$ref":"#/components/schemas/AMBMessageID"},{"type":"null"}],"description":"Authentication message reference, or null before acceptance.","readOnly":true},"status":{"$ref":"#/components/schemas/AMBAuthenticationStatus","readOnly":true},"created_at":{"type":"string","minLength":1,"description":"When the attempt was created.","format":"date-time","readOnly":true},"expires_at":{"type":"string","minLength":1,"description":"When this attempt expires.","format":"date-time","readOnly":true},"completed_at":{"type":"string","minLength":1,"description":"When the attempt reached a terminal outcome.","format":"date-time","readOnly":true},"failure_code":{"type":"string","minLength":1,"description":"Why the request did not succeed. Contains no provider response or credentials.\n\n- `authentication_expired`: ten minutes passed. Request a new sign-in.\n- `new_authentication`: a newer request replaced this one.\n- `conversation_closed` and `conversation_changed`: the conversation closed or reopened. Wait for the customer to write again.\n- `configuration_changed`: the provider settings changed or the business was disconnected.\n- `user_cancelled`, `apple_authentication_cancel`: the customer declined.\n- `provider_rejected`, `token_exchange_failed`, `identity_verification_failed`: the provider response could not be accepted. Check the provider settings, then request a new sign-in.\n- `processing_interrupted`: the exchange or device confirmation did not finish within one minute. Ask the customer to sign in again and return to Messages.\n- `apple_authentication_failure`: the Messages device reported a failed sign-in. Request a new sign-in.\n- `authentication_replayed`: the provider callback was used more than once. Request a new sign-in.\n- `message_submission_failed`, `message_failed`: the sign-in message could not be sent.\n\nOther values are message delivery reasons passed through unchanged.\n","maxLength":128,"readOnly":true},"identity":{"$ref":"#/components/schemas/AMBVerifiedIdentity","readOnly":true}}},"AMBConversationVerifiedIdentity":{"type":"object","additionalProperties":false,"description":"Most recent successful identity verification for this conversation.","required":["authentication_id","provider_id","provider_revision","identity","historical"],"properties":{"authentication_id":{"$ref":"#/components/schemas/AMBAuthenticationID","readOnly":true},"provider_id":{"$ref":"#/components/schemas/AMBAuthenticationProviderID","readOnly":true},"provider_revision":{"type":"integer","format":"int64","minimum":1,"description":"Provider revision used for verification.","readOnly":true},"identity":{"$ref":"#/components/schemas/AMBVerifiedIdentity","readOnly":true},"historical":{"type":"boolean","description":"The conversation or provider changed after verification. This result is retained as history.","readOnly":true}}},"AMBConversationAuthentication":{"type":"object","additionalProperties":false,"description":"Latest attempt and last successful verification. A new pending attempt does not erase an earlier success.","properties":{"latest_attempt":{"$ref":"#/components/schemas/AMBAuthentication","readOnly":true},"last_verified":{"$ref":"#/components/schemas/AMBConversationVerifiedIdentity","readOnly":true}}},"AMBConversation":{"type":"object","readOnly":true,"additionalProperties":false,"description":"A conversation between your business and one customer on Apple Messages for Business. It holds the customer's device capabilities, the console's read state, assignment, and labels, and the routing queue the conversation is in.\n","required":["id","business_account_id","status","inbox_status","recipient","routing","routing_change","last_message","origin","device_capabilities","supported_content_kinds","locale","unread_count","assigned_to","labels","closed_at","closed_reason","created_at","updated_at"],"properties":{"inbox_status":{"$ref":"#/components/schemas/ConversationInboxStatus"},"recipient":{"$ref":"#/components/schemas/AMBConversationRecipient"},"routing":{"$ref":"#/components/schemas/AMBConversationRouting"},"routing_change":{"oneOf":[{"$ref":"#/components/schemas/AMBConversationRoutingChange"},{"type":"null"}],"description":"Routing from a later customer message that differs from `routing`, waiting for a teammate to apply or dismiss it. Null when there is none. Only recorded while the inbox status is open; resolving the conversation or moving its queue clears it."},"last_message":{"oneOf":[{"$ref":"#/components/schemas/AMBConversationLastMessage"},{"type":"null"}],"description":"Most recent message, or null when no message identity has been recorded for the conversation, for example one opened by an invitation acceptance before its first message."},"id":{"$ref":"#/components/schemas/AMBConversationID","description":"Conversation ID."},"business_account_id":{"$ref":"#/components/schemas/AMBBusinessID","description":"Business this conversation belongs to."},"status":{"$ref":"#/components/schemas/AMBConversationStatus"},"origin":{"$ref":"#/components/schemas/AMBConversationOrigin"},"device_capabilities":{"type":"array","items":{"type":"string","minLength":1},"description":"The device capability tokens recorded for this conversation. When an inbound message creates, reopens, or updates an open conversation, a non-empty list replaces the previous tokens. Empty lists and delayed messages that leave the conversation closed preserve the previous tokens. An empty stored list means the device's capabilities are unknown. Implemented message types may still be sent, but device rendering support has not been confirmed. Authentication requires an explicitly advertised AUTH2 capability.\n","example":["QUICK","LIST","TIME"]},"supported_content_kinds":{"type":"array","items":{"$ref":"#/components/schemas/AMBContentKind"},"description":"Implemented baseline types plus interactive types confirmed by `device_capabilities`. An empty capability list yields text, attachments and rich links; it does not establish support for other types. Unadvertised quick replies, list pickers, time pickers and forms are refused when capabilities are known. Custom apps and opaque interactive references are not included because their device support cannot be inferred from these tokens. Unsupported roadmap types cannot be sent.\n"},"locale":{"type":"string","minLength":0,"description":"The customer's locale recorded for this conversation. Messages without a locale and delayed messages that leave the conversation closed preserve the previous value. Empty when no locale is known. Preserved in Apple's locale format, for example `en_US@rg=nlzzzz`.\n","example":"en-US"},"unread_count":{"type":"integer","minimum":0,"description":"Number of inbound messages the workspace has not acknowledged. Shared across the workspace. Pass read with a date-time to acknowledge received inbound messages through that timestamp. Sending a reply does not change this count.\n"},"assigned_to":{"oneOf":[{"$ref":"#/components/schemas/UserID"},{"type":"null"}],"description":"The user this conversation is assigned to, or null when unassigned. Assignment is not rechecked against workspace membership on read, so it can still name a user whose access was removed.\n"},"labels":{"$ref":"#/components/schemas/ConversationLabels"},"closed_at":{"type":["string","null"],"format":"date-time","description":"When the native Apple conversation was closed. Null while its native status is open; independent of inbox status."},"closed_reason":{"oneOf":[{"$ref":"#/components/schemas/AMBConversationClosedReason"},{"type":"null"}],"description":"Why the native Apple conversation was closed. Null while its native status is open; independent of inbox status."},"created_at":{"type":"string","format":"date-time","minLength":1,"description":"When this conversation was created."},"updated_at":{"type":"string","format":"date-time","minLength":1,"description":"When this conversation last changed."},"authentication":{"allOf":[{"$ref":"#/components/schemas/AMBConversationAuthentication"}],"description":"Latest authentication request and the last verified identity. Included when you read one conversation, not in list results."}}},"AMBConversationList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of conversations, newest first by last message.","items":{"$ref":"#/components/schemas/AMBConversation"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"AMBConversationRoutingChangeAction":{"type":"string","minLength":1,"enum":["apply","dismiss"],"description":"`apply` adopts the pending change's group, intent, entry point and queue. `dismiss` discards it and leaves group, intent and entry point unchanged."},"AMBConversationRoutingChangeDecision":{"type":"object","additionalProperties":false,"description":"Settles the conversation's pending `routing_change`. `message_id` names the change you reviewed: the request fails with `409` when the pending change has a different message ID, because a newer customer message replaced it or a teammate already settled it. Either action clears `routing_change`.","required":["action","message_id"],"properties":{"action":{"$ref":"#/components/schemas/AMBConversationRoutingChangeAction"},"message_id":{"$ref":"#/components/schemas/AMBMessageID"}},"example":{"action":"dismiss","message_id":"amb_01krdgeqcxet5s7t44vh8rt9mg"}},"AMBConversationUpdate":{"description":"Assignment, labels, inbox status, queue, routing change and workspace read state. Omit a field to leave it unchanged. Inbox status is independent of the Apple channel's open or closed state. `queue` moves the conversation and clears any pending `routing_change`; it can be combined with a `dismiss` decision but not with `apply`, which sets the queue itself.\n","allOf":[{"$ref":"#/components/schemas/_ConversationUpdate"},{"type":"object","properties":{"queue":{"type":["string","null"],"minLength":1,"maxLength":64,"description":"Queue to move the conversation to, or null to leave it unrouted. Routing rules do not run, and the conversation keeps its group and intent. Moving the queue clears any pending `routing_change`, and cannot be combined with an `apply` decision.","example":"billing"},"routing_change":{"$ref":"#/components/schemas/AMBConversationRoutingChangeDecision"}}}],"not":{"anyOf":[{"required":["queue","routing_change"],"properties":{"queue":{},"routing_change":{"required":["action"],"properties":{"action":{"const":"apply"}}}}}]},"unevaluatedProperties":false},"AMBAuthenticationTemplate":{"type":"object","additionalProperties":false,"description":"A sign-in message template reference. Identify the template by `id` or `slug`. Supply exactly one reference, optionally select a language, and pass variable values in `parameters`.\n","oneOf":[{"required":["id"]},{"required":["slug"]}],"properties":{"id":{"description":"The workspace or built-in sign-in message template to send, by ID.","$ref":"#/components/schemas/AMBTemplateID"},"slug":{"allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"description":"The workspace or built-in sign-in message template to send, by its immutable slug. Read the template's live version to see its variables.\n","example":"account_sign_in"},"language":{"allOf":[{"$ref":"#/components/schemas/LanguageTag"}],"description":"Which of the template's languages to send. When the template does not have the language you ask for, its `on_missing_language` setting decides whether the closest available language is sent instead or the request is rejected. Omit it to send the first of these the template has: the conversation's locale, the business's default locale, then the template's default language. A request that omits it is never rejected for its language, and `language_source_required` does not apply.\n","example":"fr"},"parameters":{"type":"object","additionalProperties":true,"description":"Values for the template's variables, keyed by variable name. Read the live version to see the accepted keys and formats. A missing required key, an undeclared key, an invalid value, or a serialized object over 16 KiB returns `422`.\n","example":{"first_name":"Avery"}}}},"AMBAuthenticationCreate":{"type":"object","additionalProperties":false,"description":"Options for a sign-in request. Omit the body to send the business's sign-in message.\n","properties":{"template":{"allOf":[{"$ref":"#/components/schemas/AMBAuthenticationTemplate"}],"description":"The sign-in message template to send in place of the business's sign-in message. The template must be a published sign-in message.\n"}},"example":{"template":{"slug":"account_sign_in","language":"fr"}}},"AMBConversationTypingEvent":{"type":"string","minLength":1,"enum":["typing_start","typing_end"],"description":"The typing signal to send. `typing_start` tells the customer's device that an operator is composing a reply. `typing_end` tells it composition stopped without a message following. Apple expects at most one `typing_start` before the reply it precedes; sending it again before that reply is not meaningful and may be dropped. `typing_end`'s behavior against a live conversation is unproven: the legacy platform's implementation was disabled after it caused issues, so treat it as best-effort.\n"},"AMBConversationTypingRequest":{"type":"object","additionalProperties":false,"description":"A typing indicator to send to the customer's device on this conversation.\n","required":["event"],"properties":{"event":{"$ref":"#/components/schemas/AMBConversationTypingEvent"}}},"AMBSuppressionReasonFilter":{"type":"string","enum":["manual","opted_out"]},"AMBSuppressionList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of suppressions in force, most recent first by `effective_at`. Ended suppressions are left out; fetch one by ID to read it.\n","items":{"$ref":"#/components/schemas/AMBSuppression"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"AMBSuppressionCreate":{"type":"object","additionalProperties":false,"description":"Stops messages to one address, for one business account or for every account in the workspace.\n","required":["address","address_type"],"properties":{"business_account_id":{"$ref":"#/components/schemas/AMBBusinessID","description":"The business account to stop. Omit to stop the address for every account in the workspace. An account in another workspace returns `404`.\n"},"address":{"type":"string","minLength":1,"description":"The customer to stop messaging: a phone number in E.164 format with a leading plus sign, or the exact opaque identifier Apple supplied. `address_type` says which.\n","example":"+15551234567","maxLength":1024},"address_type":{"$ref":"#/components/schemas/AMBSuppressionAddressType"}}},"AMBStatsSeriesPeriod":{"type":"object","additionalProperties":false,"description":"The window and bucket grain the response covers, echoed from the request, plus the freshness boundary the data is current to.\n","required":["from","to","grain"],"properties":{"from":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive start of the window. A calendar day (YYYY-MM-DD) on the day grain, an RFC 3339 instant on the hour grain. Historical starts are preserved; the maximum request length does not impose a historical cutoff.","example":"2026-05-01"},"to":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive end of the window. A calendar day (YYYY-MM-DD) on the day grain, an RFC 3339 instant on the hour grain.","example":"2026-05-25"},"grain":{"$ref":"#/components/schemas/StatsGrain","readOnly":true},"data_as_of":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"Latest time reflected in the statistics. More recent events might not be included yet. Null when the freshness boundary is unavailable.\n","example":"2026-05-25T14:03:10Z"}}},"AMBStatsResponse":{"type":"object","additionalProperties":false,"description":"Time-series stats payload. `period` echoes the range and bucket grain the server computed against; `data` is one row per bucket in chronological order.\n","required":["period","attribution","data"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSeriesPeriod"},"attribution":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsAttribution","description":"Always `accepted_time` for outbound statistics."},"data":{"type":"array","readOnly":true,"description":"One row per day or hour in chronological order. Buckets with no activity contain zero counts.","items":{"$ref":"#/components/schemas/AMBStatsPoint"}}}},"AMBBusinessAccountStatsPoint":{"type":"object","additionalProperties":false,"description":"Outbound counts and latency percentiles for a single business over the requested period.","required":["business_account_id","counts","latency"],"properties":{"business_account_id":{"$ref":"#/components/schemas/AMBBusinessID","readOnly":true,"description":"The business these messages were sent from."},"counts":{"readOnly":true,"$ref":"#/components/schemas/AMBOutboundStatsCounts"},"latency":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsLatency"},"first_response":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsQuantiles","description":"First-response latency percentiles for this business. Omitted when no qualifying message contributes a measurement."}}},"AMBStatsByBusinessResponse":{"type":"object","additionalProperties":false,"description":"Per-business breakdown for the requested period, ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200).","required":["period","attribution","data","total"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSummaryPeriod","description":"The window the response covers (echoed back), plus `data_as_of`."},"attribution":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsAttribution","description":"Always `accepted_time` for outbound statistics."},"data":{"type":"array","readOnly":true,"description":"Business rows ranked by accepted volume descending.","items":{"$ref":"#/components/schemas/AMBBusinessAccountStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total distinct businesses with activity in the period, regardless of `limit`.","example":1}}},"AMBIntentStatsPoint":{"type":"object","additionalProperties":false,"description":"Outbound counts and latency percentiles for a single entry-point intent over the requested period.","required":["intent","counts","latency"],"properties":{"intent":{"type":"string","minLength":1,"readOnly":true,"description":"The intent these messages were routed under, as configured in the business's entry points. Intents are workspace-defined and have no fixed vocabulary.","example":"order_support"},"counts":{"readOnly":true,"$ref":"#/components/schemas/AMBOutboundStatsCounts"},"latency":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsLatency"},"first_response":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsQuantiles","description":"First-response latency percentiles for this intent. Omitted when no qualifying message contributes a measurement."}}},"AMBStatsByIntentResponse":{"type":"object","additionalProperties":false,"description":"Per-intent breakdown for the requested period, ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200).","required":["period","attribution","data","total"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSummaryPeriod","description":"The window the response covers (echoed back), plus `data_as_of`."},"attribution":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsAttribution","description":"Always `accepted_time` for outbound statistics."},"data":{"type":"array","readOnly":true,"description":"Intent rows ranked by accepted volume descending.","items":{"$ref":"#/components/schemas/AMBIntentStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total distinct intents with activity in the period, regardless of `limit`.","example":5}}},"AMBGroupStatsPoint":{"type":"object","additionalProperties":false,"description":"Outbound counts and latency percentiles for a single entry-point group over the requested period.","required":["group","counts","latency"],"properties":{"group":{"type":"string","minLength":1,"readOnly":true,"description":"The group these messages were routed under, as configured in the business's entry points. Groups are workspace-defined and have no fixed vocabulary.","example":"sales"},"counts":{"readOnly":true,"$ref":"#/components/schemas/AMBOutboundStatsCounts"},"latency":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsLatency"},"first_response":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsQuantiles","description":"First-response latency percentiles for this group. Omitted when no qualifying message contributes a measurement."}}},"AMBStatsByGroupResponse":{"type":"object","additionalProperties":false,"description":"Per-group breakdown for the requested period, ranked by accepted volume descending and capped at the requested `limit` (default 50, max 200).","required":["period","attribution","data","total"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSummaryPeriod","description":"The window the response covers (echoed back), plus `data_as_of`."},"attribution":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsAttribution","description":"Always `accepted_time` for outbound statistics."},"data":{"type":"array","readOnly":true,"description":"Group rows ranked by accepted volume descending.","items":{"$ref":"#/components/schemas/AMBGroupStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total distinct groups with activity in the period, regardless of `limit`.","example":3}}},"AMBInboundStatsResponse":{"type":"object","additionalProperties":false,"description":"Received-message time series. `period` echoes the range the server computed against; `data` is one row per bucket in chronological order.\n","required":["period","attribution","data"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSeriesPeriod"},"attribution":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsAttribution","description":"Always `event_time` for inbound statistics."},"data":{"type":"array","readOnly":true,"description":"One row per bucket (day or hour, matching the request) in the period, in chronological order. Buckets with no activity are included with a count of zero, so the series charts continuously without client-side gap handling.","items":{"$ref":"#/components/schemas/AMBInboundStatsPoint"}}}},"AMBInboundBusinessStatsPoint":{"type":"object","additionalProperties":false,"description":"Received-message count for a single business over the requested period.","required":["business_account_id","received"],"properties":{"business_account_id":{"$ref":"#/components/schemas/AMBBusinessID","readOnly":true,"description":"The business that received these messages."},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages received by this business in the period.","example":640}}},"AMBInboundStatsByBusinessResponse":{"type":"object","additionalProperties":false,"description":"Per-business breakdown of received messages for the requested period, ranked by volume descending and capped at the requested `limit` (default 50, max 200).","required":["period","attribution","data","total"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSummaryPeriod","description":"The window the response covers (echoed back), plus `data_as_of`."},"attribution":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsAttribution","description":"Always `event_time` for inbound statistics."},"data":{"type":"array","readOnly":true,"description":"Business rows ranked by received-message volume descending, capped at the requested `limit`. A business with no received messages in the period is absent rather than zero-filled, because unlike a time bucket it is not part of a continuous axis.","items":{"$ref":"#/components/schemas/AMBInboundBusinessStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total distinct businesses with received messages in the period, regardless of `limit`.","example":1}}},"AMBInboundIntentStatsPoint":{"type":"object","additionalProperties":false,"description":"Received-message count for a single entry-point intent over the requested period.","required":["intent","received"],"properties":{"intent":{"type":"string","minLength":1,"readOnly":true,"description":"The intent these messages arrived under, as configured in the business's entry points. Intents are workspace-defined and have no fixed vocabulary.","example":"order_support"},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct messages received under this intent in the period.","example":305}}},"AMBInboundStatsByIntentResponse":{"type":"object","additionalProperties":false,"description":"Per-intent breakdown of received messages for the requested period, ranked by volume descending and capped at the requested `limit` (default 50, max 200).","required":["period","attribution","data","total"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSummaryPeriod","description":"The window the response covers (echoed back), plus `data_as_of`."},"attribution":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsAttribution","description":"Always `event_time` for inbound statistics."},"data":{"type":"array","readOnly":true,"description":"Intent rows ranked by received-message volume descending, capped at the requested `limit`. An intent with no received messages in the period is absent rather than zero-filled, because unlike a time bucket it is not part of a continuous axis.","items":{"$ref":"#/components/schemas/AMBInboundIntentStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total distinct intents with received messages in the period, regardless of `limit`.","example":4}}},"AMBConversationStatsResponse":{"type":"object","additionalProperties":false,"description":"Conversation lifecycle time series. `period` echoes the range and bucket grain the server computed against; `data` is one row per bucket in chronological order.\n","required":["period","attribution","data"],"properties":{"period":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsSeriesPeriod"},"attribution":{"readOnly":true,"$ref":"#/components/schemas/AMBStatsAttribution","description":"Always `event_time` for conversation statistics."},"data":{"type":"array","readOnly":true,"description":"One row per day or hour in chronological order. Buckets with no activity contain zero counts.","items":{"$ref":"#/components/schemas/AMBConversationStatsPoint"}}}},"AMBTemplateCategory":{"type":"string","minLength":1,"enum":["transactional","marketing"],"description":"Why messages use this template, fixed at creation. On Apple Messages the category describes intent and becomes the message's reporting `category`; it grants and restricts nothing. Use `marketing` for promotions and `transactional` for service messages.\n"},"AMBTemplateSortField":{"type":"string","enum":["created_at"],"default":"created_at","description":"Field to sort Apple Messages templates and their versions by."},"AMBTemplateLanguageState":{"type":"object","additionalProperties":false,"description":"Whether a language is live and whether its draft has unpublished changes.","required":["status"],"properties":{"status":{"readOnly":true,"$ref":"#/components/schemas/TemplateLanguageStatus"},"draft":{"type":"boolean","readOnly":true,"description":"Whether the draft has an unpublished change for this language. When true beside `live`, sends keep using the older published content until submit.\n"}}},"AMBTemplateSummary":{"type":"object","additionalProperties":false,"description":"An Apple Messages template without content or draft concurrency settings.","required":["id","workspace_id","slug","name","description","scope","status","category","content_kind","customize_before_use","default_language","available_languages","languages","draft_version_id","live_version_id","published_version_id","last_submitted_at","created_at","updated_at"],"properties":{"id":{"readOnly":true,"description":"Template ID.","$ref":"#/components/schemas/AMBTemplateID"},"workspace_id":{"readOnly":true,"description":"The workspace that owns the template. Null for a built-in `system` template.","oneOf":[{"$ref":"#/components/schemas/WorkspaceID"},{"type":"null"}]},"slug":{"allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"readOnly":true,"description":"The immutable handle used to address and send the template."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"The template's display name."},"description":{"type":["string","null"],"description":"What the template is for. Null if it has no description."},"scope":{"$ref":"#/components/schemas/TemplateScope"},"status":{"$ref":"#/components/schemas/TemplateStatus"},"category":{"$ref":"#/components/schemas/AMBTemplateCategory"},"content_kind":{"readOnly":true,"description":"Derived message classification, matching the default language's content.\n","$ref":"#/components/schemas/AMBContentKind"},"customize_before_use":{"type":"boolean","readOnly":true,"description":"Whether this built-in template holds sample business details, such as a store location or product images, that must be replaced before it can be sent. Sending it returns `422`; duplicate it into your workspace and customize the copy. Always false on workspace templates.\n"},"draft_version_id":{"readOnly":true,"description":"The permanent editable draft version. Null for a built-in template.","oneOf":[{"$ref":"#/components/schemas/AMBTemplateVersionID"},{"type":"null"}]},"live_version_id":{"readOnly":true,"description":"The version sends resolve to, or null before first publication.","oneOf":[{"$ref":"#/components/schemas/AMBTemplateVersionID"},{"type":"null"}]},"published_version_id":{"readOnly":true,"deprecated":true,"description":"Deprecated. Use `live_version_id`, which carries the same value.","oneOf":[{"$ref":"#/components/schemas/AMBTemplateVersionID"},{"type":"null"}]},"languages":{"type":"object","readOnly":true,"propertyNames":{"type":"string","minLength":2,"maxLength":35},"additionalProperties":{"$ref":"#/components/schemas/AMBTemplateLanguageState"},"description":"Each language and its live or draft state, keyed by canonical BCP-47 tag."},"default_language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The draft's default language."},"available_languages":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/LanguageTag"},"description":"Languages the live version can currently send. Empty before first publication."},"last_submitted_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was last published. Null before first publication and for built-in templates."},"created_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was created. Null for built-in templates."},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was last modified. Null for built-in templates."}}},"AMBTemplateList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"One page of Apple Messages templates.","items":{"$ref":"#/components/schemas/AMBTemplateSummary"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"AMBSignInMessage":{"type":"object","additionalProperties":false,"x-sensitive":true,"description":"The message an authentication request sends: the sign-in request bubble, the bubble that replaces it after sign-in, their images and an optional confirmation text. Only a template holds it. An authentication request renders the template and sends it. A message send does not accept it.","required":["received_message","reply_message"],"properties":{"received_message":{"$ref":"#/components/schemas/AMBMessageBubble","description":"The sign-in request bubble the customer receives."},"reply_message":{"$ref":"#/components/schemas/AMBMessageBubble","description":"The bubble Messages shows after the customer signs in."},"images":{"type":"array","items":{"$ref":"#/components/schemas/AMBNativeImage"},"description":"Images the bubbles reference by `image_identifier`."},"confirmation_text":{"type":"string","minLength":1,"description":"Text Bird sends as a message after the customer's device confirms the sign-in. Omit it to send no confirmation. It may contain `{{ }}` placeholders."}},"example":{"received_message":{"title":"Sign in to Example","subtitle":"Use your Example account"},"reply_message":{"title":"Signed in"},"confirmation_text":"Welcome back, {{ first_name }}."}},"AMBTemplate":{"type":"object","additionalProperties":false,"description":"One Apple Messages template identity and its authoring state. Content and variables live on versions, so this resource stays shallow.\n","required":["id","workspace_id","slug","name","description","scope","status","category","content_kind","customize_before_use","default_language","available_languages","languages","on_missing_language","language_source_required","draft_version_id","live_version_id","published_version_id","revision","last_submitted_at","created_at","updated_at"],"properties":{"id":{"readOnly":true,"description":"Template ID.","$ref":"#/components/schemas/AMBTemplateID"},"workspace_id":{"readOnly":true,"description":"The workspace that owns the template. Null for a built-in `system` template.","oneOf":[{"$ref":"#/components/schemas/WorkspaceID"},{"type":"null"}]},"slug":{"allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"readOnly":true,"description":"The immutable handle used to address and send the template. A built-in template's slug starts with `bird_`.\n","example":"order-shipped"},"name":{"type":"string","minLength":1,"maxLength":255,"description":"The template's display name. It defaults to the slug and can be changed on workspace templates.","example":"Order shipped"},"description":{"type":["string","null"],"description":"What the template is for. Null if it has no description."},"scope":{"$ref":"#/components/schemas/TemplateScope"},"status":{"$ref":"#/components/schemas/TemplateStatus"},"category":{"$ref":"#/components/schemas/AMBTemplateCategory"},"content_kind":{"readOnly":true,"description":"Derived message classification, matching the default language's content. Every language of a version shares one content_kind; a translation changes wording, not message type.\n","$ref":"#/components/schemas/AMBContentKind"},"customize_before_use":{"type":"boolean","readOnly":true,"description":"Whether this built-in template holds sample business details, such as a store location or product images, that must be replaced before it can be sent. Sending it returns `422`; duplicate it into your workspace and customize the copy. Always false on workspace templates.\n"},"draft_version_id":{"readOnly":true,"description":"The permanent editable draft version. Null for a built-in template.","oneOf":[{"$ref":"#/components/schemas/AMBTemplateVersionID"},{"type":"null"}]},"live_version_id":{"readOnly":true,"description":"The version sends resolve to, or null before a workspace template is first published. A built-in template points to a synthetic published version that projects its current catalogue content.\n","oneOf":[{"$ref":"#/components/schemas/AMBTemplateVersionID"},{"type":"null"}]},"published_version_id":{"readOnly":true,"deprecated":true,"description":"Deprecated. Use `live_version_id`, which carries the same value.","oneOf":[{"$ref":"#/components/schemas/AMBTemplateVersionID"},{"type":"null"}]},"revision":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"The draft revision to use for concurrent-edit checks. Null for a built-in template."},"languages":{"type":"object","readOnly":true,"propertyNames":{"type":"string","minLength":2,"maxLength":35},"additionalProperties":{"$ref":"#/components/schemas/AMBTemplateLanguageState"},"description":"Each language the template has, keyed by canonical BCP-47 tag, with its live state and whether the draft contains unpublished changes. Content is available from version reads.\n","example":{"en":{"status":"live"},"nl":{"status":"live","draft":true}}},"default_language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The draft's default language. Sends continue using the live version's default until the draft is published.\n"},"available_languages":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/LanguageTag"},"description":"Languages the live version can currently send. Empty before first publication.\n","example":["en"]},"on_missing_language":{"allOf":[{"$ref":"#/components/schemas/TemplateOnMissingLanguage"}],"readOnly":true,"description":"How a send handles a requested language that the live version does not have."},"language_source_required":{"type":"boolean","readOnly":true,"description":"Whether each send must name a language instead of using the live version's default."},"last_submitted_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was last published. Null before first publication and for built-in templates."},"created_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was created. Null for built-in templates."},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was last modified. Null for built-in templates."}}},"AMBTemplateVersionStatus":{"type":"string","minLength":1,"readOnly":true,"enum":["draft","published"],"description":"Whether the version is the editable draft or published. Published workspace versions are immutable and remain `published` after a later version goes live. A built-in template's synthetic published version projects the current catalogue entry.\n","example":"published"},"AMBTemplateVersionSummary":{"type":"object","additionalProperties":false,"description":"One Apple Messages template version without its content.","required":["id","template_id","version_number","status","revision","variables","default_language","available_languages","created_at","published_at"],"properties":{"id":{"readOnly":true,"description":"Template version ID.","$ref":"#/components/schemas/AMBTemplateVersionID"},"template_id":{"readOnly":true,"description":"The template this version belongs to.","$ref":"#/components/schemas/AMBTemplateID"},"version_number":{"type":["integer","null"],"minimum":1,"readOnly":true,"description":"Sequential publication number. Null for the draft; a built-in template reports 1."},"status":{"readOnly":true,"$ref":"#/components/schemas/AMBTemplateVersionStatus"},"revision":{"type":"integer","minimum":0,"readOnly":true,"description":"The version's revision counter."},"variables":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/TemplateVariable"},"description":"Variables inferred from the version's content and shared by each language."},"default_language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The language this version treats as its default."},"available_languages":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/LanguageTag"},"description":"Languages this version contains, without their content."},"created_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the version was created. Null for a built-in template's synthetic version."},"published_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the version was published. Null for the draft and for a built-in template's synthetic version."}},"example":{"id":"amv_01krdgeqcxet5s7t44vh8rt9mg","template_id":"amt_01krdgeqcxet5s7t44vh8rt9mg","version_number":1,"status":"published","revision":1,"variables":[{"key":"order_number","type":"text","required":true,"constraint":"A string, number, or boolean."}],"default_language":"en","created_at":"2026-09-10T09:00:00Z","published_at":"2026-09-10T09:00:00Z","available_languages":["en"]}},"AMBTemplateVersionList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"One page of the template's versions, newest first.","items":{"$ref":"#/components/schemas/AMBTemplateVersionSummary"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"AMBTemplateVersionLanguage":{"type":"object","additionalProperties":false,"description":"One language's content and revision metadata within a version.","required":["revision","content_hash","updated_at"],"properties":{"text":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/AMBText"}],"description":"Stored text and files. Includes its `{{ variable }}` placeholders."},"rich_link":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/AMBRichLink"}],"description":"Stored link preview. Includes its `{{ variable }}` placeholders."},"interactive":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/AMBInteractive"}],"description":"Stored interaction. Includes its `{{ variable }}` placeholders."},"sign_in":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/AMBSignInMessage"}],"description":"Stored sign-in message. Includes its `{{ variable }}` placeholders."},"revision":{"type":"integer","minimum":0,"readOnly":true,"description":"This language's revision counter."},"content_hash":{"readOnly":true,"$ref":"#/components/schemas/AMBTemplateContentHash"},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this language was last saved. Null for a built-in template."}},"example":{"text":{"body":"Your order {{ order_number }} is on its way."},"revision":1,"content_hash":"sha256:3d948846f5f773fb7bed8ab81b57f3d0ff2cbff24cb549718f4d389f1ab0300a","updated_at":"2026-09-10T09:00:00Z"}},"AMBTemplateVersion":{"type":"object","additionalProperties":false,"description":"One Apple Messages template version with its content. A workspace template keeps one editable draft and immutable published versions. A built-in template exposes its current catalogue content as one synthetic published version.\n","required":["id","template_id","version_number","status","revision","variables","languages","default_language","created_at","published_at"],"properties":{"id":{"readOnly":true,"description":"Template version ID.","$ref":"#/components/schemas/AMBTemplateVersionID"},"template_id":{"readOnly":true,"description":"The template this version belongs to.","$ref":"#/components/schemas/AMBTemplateID"},"version_number":{"type":["integer","null"],"minimum":1,"readOnly":true,"description":"Sequential publication number. Null for the draft; a built-in template reports 1."},"status":{"readOnly":true,"$ref":"#/components/schemas/AMBTemplateVersionStatus"},"revision":{"type":"integer","minimum":0,"readOnly":true,"description":"The version revision. A draft revision advances with each metadata or content change. Published workspace versions are frozen; a built-in template's synthetic version reports 0.\n"},"variables":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/TemplateVariable"},"description":"Variables inferred from the version's content. Every language in a publishable Apple Messages version uses the same set. Built-in templates may apply additional typed constraints described by each variable.\n"},"languages":{"type":"object","readOnly":true,"propertyNames":{"type":"string","minLength":2,"maxLength":35},"additionalProperties":{"$ref":"#/components/schemas/AMBTemplateVersionLanguage"},"description":"Full content for each language, keyed by canonical BCP-47 tag."},"default_language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The language this version treats as its default."},"created_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the version was created. Null for a built-in template's synthetic version."},"published_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the version was published. Null for the draft and for a built-in template's synthetic version."}},"example":{"id":"amv_01krdgeqcxet5s7t44vh8rt9mg","template_id":"amt_01krdgeqcxet5s7t44vh8rt9mg","version_number":1,"status":"published","revision":1,"variables":[{"key":"order_number","type":"text","required":true,"constraint":"A string, number, or boolean."}],"languages":{"en":{"text":{"body":"Your order {{ order_number }} is on its way."},"revision":1,"content_hash":"sha256:3d948846f5f773fb7bed8ab81b57f3d0ff2cbff24cb549718f4d389f1ab0300a","updated_at":"2026-09-10T09:00:00Z"}},"default_language":"en","created_at":"2026-09-10T09:00:00Z","published_at":"2026-09-10T09:00:00Z"}},"AMBTemplateLanguageSummary":{"type":"object","additionalProperties":false,"description":"One language of an Apple Messages template version without its content.","required":["language","revision","content_hash","updated_at"],"properties":{"language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The language in canonical BCP-47 form."},"revision":{"type":"integer","minimum":0,"readOnly":true,"description":"This language's revision counter."},"content_hash":{"readOnly":true,"$ref":"#/components/schemas/AMBTemplateContentHash"},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this language was last saved. Null for a built-in template."}},"example":{"language":"en","revision":1,"content_hash":"sha256:3d948846f5f773fb7bed8ab81b57f3d0ff2cbff24cb549718f4d389f1ab0300a","updated_at":"2026-09-10T09:00:00Z"}},"AMBTemplateLanguageList":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","description":"The version's languages ordered by canonical tag, without content.","items":{"$ref":"#/components/schemas/AMBTemplateLanguageSummary"}}}},"AMBTemplateLanguage":{"type":"object","additionalProperties":false,"description":"One language's full Apple Messages template content and revision metadata.","required":["language","revision","content_hash","updated_at"],"properties":{"language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The language in canonical BCP-47 form."},"text":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/AMBText"}],"description":"Stored text and files. Includes its `{{ variable }}` placeholders."},"rich_link":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/AMBRichLink"}],"description":"Stored link preview. Includes its `{{ variable }}` placeholders."},"interactive":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/AMBInteractive"}],"description":"Stored interaction. Includes its `{{ variable }}` placeholders."},"sign_in":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/AMBSignInMessage"}],"description":"Stored sign-in message. Includes its `{{ variable }}` placeholders."},"revision":{"type":"integer","minimum":0,"readOnly":true,"description":"This language's revision counter, used for concurrent-edit checks on draft writes."},"content_hash":{"readOnly":true,"$ref":"#/components/schemas/AMBTemplateContentHash"},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this language was last saved. Null for a built-in template."}},"example":{"language":"en","text":{"body":"Your order {{ order_number }} is on its way."},"revision":1,"content_hash":"sha256:3d948846f5f773fb7bed8ab81b57f3d0ff2cbff24cb549718f4d389f1ab0300a","updated_at":"2026-09-10T09:00:00Z"}},"WhatsAppBusinessAccountSortField":{"type":"string","enum":["created_at"],"default":"created_at","description":"Sortable fields for a WhatsApp Business Account list."},"WhatsAppBusinessAccountID":{"type":"string","minLength":1,"pattern":"^waa_[0-9a-hjkmnp-tv-z]{26}$","example":"waa_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppBusinessAccountStatus":{"type":"string","minLength":1,"x-extensible-enum":["active"],"description":"WhatsApp's own state for a WhatsApp Business Account. Values are WhatsApp's own tokens, lower-cased. This enum is open because WhatsApp documents the field in neither its API reference nor its machine-readable schema. The `active` value is the only value in WhatsApp's example response, so it is the only one Bird can name. Treat anything else as a state WhatsApp reports and this list has not caught up with.","example":"active"},"WhatsAppBusinessAccountReviewStatus":{"type":"string","minLength":1,"x-extensible-enum":["approved","deferred","pending","rejected"],"description":"How far WhatsApp's own review of this WhatsApp Business Account has got. `deferred` is WhatsApp postponing the review rather than refusing it. Values are WhatsApp's own tokens, lower-cased. Open enum: treat an unrecognized value as a review state WhatsApp added rather than as an error.","example":"approved"},"WhatsAppBusinessVerificationStatus":{"type":"string","minLength":1,"x-extensible-enum":["expired","failed","ineligible","not_verified","pending","pending_need_more_info","pending_submission","rejected","revoked","verified"],"description":"Whether Meta has verified the business behind this WhatsApp Business Account. Verification is one of the paths to a higher messaging limit, so a value other than `verified` is often the reason a limit has not moved. Values are Meta's own tokens, lower-cased. Open enum: treat an unrecognized value as a state Meta added rather than as an error.","example":"verified"},"WhatsAppBusinessAccountMarketingMessagesStatus":{"type":"string","minLength":1,"x-extensible-enum":["eligible","onboarded"],"description":"Whether this account can use WhatsApp's Marketing Messages API. `eligible` means WhatsApp would accept an onboarding request for it; `onboarded` means it has already been onboarded. Values are WhatsApp's own tokens, lower-cased. Open enum out of necessity. WhatsApp's onboarding guide names these two values and defers the rest to an API reference that does not document the field. Treat anything else as a state WhatsApp reports that this list has not caught up with.","example":"onboarded"},"WhatsAppBusinessPortfolioMarketingMessagesStatus":{"type":"string","minLength":1,"x-extensible-enum":["not_started","request_sent","term_of_service_signed"],"description":"How far the business portfolio has got through Meta's Marketing Messages\nterms of service.\n\n- `not_started`: the portfolio has not begun the process.\n- `request_sent`: a request is in.\n- `term_of_service_signed`: the terms are accepted.\n\nA portfolio property, so every account the portfolio owns reports the same\nvalue. Distinct from the account's own marketing-messages status, which Meta\nconfusingly gives the same name. Values are Meta's own tokens, lower-cased.\nOpen enum: treat an unrecognized value as a state Meta added rather than as\nan error.\n","example":"not_started"},"WhatsAppBusinessPortfolio":{"type":"object","additionalProperties":false,"readOnly":true,"required":["meta_id"],"description":"The Meta business portfolio that owns a WhatsApp Business Account. Bird holds no resource of its own for a portfolio, which is why the identifier is named `meta_id`: it is meaningful only against Meta's own tools, and it is not a Bird identifier.","properties":{"meta_id":{"type":"string","minLength":1,"readOnly":true,"description":"Meta's identifier for the portfolio. Treat it as an opaque string.","example":"178563218361309"},"name":{"type":"string","minLength":1,"readOnly":true,"description":"The portfolio's name, as Meta reports it. Absent when Meta returned none.","example":"Acme Holdings"},"marketing_messages_onboarding_status":{"allOf":[{"$ref":"#/components/schemas/WhatsAppBusinessPortfolioMarketingMessagesStatus"}],"readOnly":true,"description":"How far this portfolio has got through Meta's Marketing Messages terms of service. Absent until Meta has reported it. Distinct from the account's own `marketing_messages_onboarding_status`, which Meta gives the same field name but a different vocabulary: that one is the account's own eligibility, this one is the portfolio's Terms-of-Service progress."}}},"WhatsAppBusinessAccountBanState":{"type":"string","minLength":1,"enum":["disabled","scheduled_for_disable"],"description":"Whether WhatsApp has disabled a WhatsApp Business Account or scheduled it to be\ndisabled:\n\n- `disabled`: WhatsApp has disabled the account, and it cannot send.\n- `scheduled_for_disable`: WhatsApp has set a date to disable the account, which can\n  still send until then.\n\nAn account WhatsApp has reinstated reports no `ban` at all rather than a third value\nhere.\n","example":"disabled"},"WhatsAppBusinessAccountBan":{"type":"object","additionalProperties":false,"readOnly":true,"required":["state","occurred_at"],"description":"WhatsApp's ban on this account, as WhatsApp announced it. Absent when there is no ban, and also when there is one WhatsApp announced before Bird began recording bans, or whose notification never reached Bird, since WhatsApp does not replay them. This is what WhatsApp announced rather than the account's current state, so it is never the field to read to decide whether an account can send.","properties":{"state":{"allOf":[{"$ref":"#/components/schemas/WhatsAppBusinessAccountBanState"}],"readOnly":true},"occurred_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When WhatsApp reported the ban, by WhatsApp's own clock. Bird can learn of a ban later than this, so it is not when Bird recorded it.","example":"2026-04-10T09:12:00Z"},"appeal_url":{"type":"string","format":"uri","readOnly":true,"description":"Where to appeal WhatsApp's decision with Meta Business Support, because neither Bird nor this API can lift one. Absent when Bird does not know the account's Meta business portfolio, since there is no support-home path to build without one.","example":"https://business.facebook.com/business-support-home/178563218361309/102290129340398"}}},"WhatsAppMetaHealthVerdict":{"type":"string","minLength":1,"enum":["available","limited","blocked"],"description":"Meta's health verdict for one entity, or for the whole chain when read at the top\nlevel. Values are Meta's own tokens, lower-cased:\n\n- `available`: the entity meets every messaging or calling requirement.\n- `limited`: it can be used, but with a limitation Meta describes in `additional_info`\n  when it gave one.\n- `blocked`: it cannot be used. `errors` says why when Meta named a reason, and each\n  error carries `possible_solution` when Meta suggested one.\n","example":"available"},"WhatsAppMetaHealthEntityType":{"type":"string","minLength":1,"x-extensible-enum":["waba","business","app","phone_number","message_template"],"description":"Which node in Meta's messaging chain an entry describes. Values are Meta's own tokens,\nlower-cased.\n\n- `waba`: the WhatsApp Business Account.\n- `business`: the Meta business portfolio that owns the account.\n- `app`: the app the account messages through.\n- `phone_number`: a business phone number. An account read never carries one: Meta reports it only when a phone number is the node asked about.\n- `message_template`: a message template. An account read never carries one: Meta reports it only when a template is the node asked about.\n","example":"waba"},"WhatsAppMetaHealthError":{"type":"object","additionalProperties":false,"readOnly":true,"required":["error_code","error_description"],"description":"One reason Meta gives for a verdict that is not `available`. Field names are Meta's own. They are not Bird error codes and do not appear in Bird's error catalog.","properties":{"error_code":{"type":"integer","readOnly":true,"description":"Meta's numeric health error code, for example `141006` (payment method error), `141010` (business not verified), `141014` (account banned).","example":141006},"error_description":{"type":"string","minLength":1,"readOnly":true,"description":"Meta's own sentence describing the block.","example":"There is an error with the payment method. This will block business initiated conversations."},"possible_solution":{"type":"string","minLength":1,"readOnly":true,"description":"Meta's own suggested remedy. Absent when Meta gave none.","example":"There was an error with your payment method. Please add a new payment method to the account."}}},"WhatsAppMetaHealthEntity":{"type":"object","additionalProperties":false,"readOnly":true,"required":["entity_type","meta_id","can_send_message"],"description":"Meta's verdict for one node in the chain a message passes through.","properties":{"entity_type":{"allOf":[{"$ref":"#/components/schemas/WhatsAppMetaHealthEntityType"}],"readOnly":true},"meta_id":{"type":"string","minLength":1,"readOnly":true,"description":"Meta's identifier for the node. Treat it as an opaque string.","example":"1028574859896003"},"can_send_message":{"allOf":[{"$ref":"#/components/schemas/WhatsAppMetaHealthVerdict"}],"readOnly":true,"description":"Whether this node lets messages through."},"can_receive_call_sip":{"allOf":[{"$ref":"#/components/schemas/WhatsAppMetaHealthVerdict"}],"readOnly":true,"description":"Whether this node can receive a WhatsApp call over SIP, which Meta reports on `phone_number` and `app` entities. Absent on an account read: Meta reports it only when a phone number or template is the node asked about."},"additional_info":{"type":"array","readOnly":true,"items":{"type":"string","minLength":1},"description":"Meta's own notes on a `limited` verdict. Absent on an account read: Meta reports it only when a phone number or template is the node asked about.","example":["Your display name has not been approved yet. Your message limit will increase after the display name is approved."]},"errors":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/WhatsAppMetaHealthError"},"description":"Why this node is not `available`. Absent when Meta gave no reason."}}},"WhatsAppMetaHealthStatus":{"type":"object","additionalProperties":false,"readOnly":true,"required":["can_send_message","entities"],"description":"Meta's own messaging health for this account. `can_send_message` is Meta's aggregate: `blocked` if any entity is blocked, else `limited` if any is limited, else `available`. Read `entities` to see which node carries the verdict and why.","properties":{"can_send_message":{"allOf":[{"$ref":"#/components/schemas/WhatsAppMetaHealthVerdict"}],"readOnly":true},"entities":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/WhatsAppMetaHealthEntity"},"description":"One entry per node Meta evaluated. Order is Meta's."}},"example":{"can_send_message":"blocked","entities":[{"entity_type":"waba","meta_id":"1028574859896003","can_send_message":"blocked","errors":[{"error_code":141006,"error_description":"There is an error with the payment method. This will block business initiated conversations.","possible_solution":"There was an error with your payment method. Please add a new payment method to the account."}]},{"entity_type":"business","meta_id":"4392746181043198","can_send_message":"limited","errors":[{"error_code":141010,"error_description":"The Business has not passed business verification.","possible_solution":"Visit business settings and start or resolve the business verification request."}]},{"entity_type":"app","meta_id":"497937228432800","can_send_message":"available"}]}},"WhatsAppBusinessAccount":{"type":"object","additionalProperties":false,"required":["id","waba","name","status","created_at","updated_at"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/WhatsAppBusinessAccountID"}],"readOnly":true,"description":"Unique identifier for the WhatsApp Business Account."},"waba":{"type":"string","minLength":1,"readOnly":true,"description":"Meta's own identifier for this WhatsApp Business Account. This is the value to send when creating a template on the account.\n","example":"102290129340398"},"name":{"type":"string","minLength":1,"readOnly":true,"description":"The account's name, as WhatsApp reports it.","example":"Acme Inc"},"status":{"allOf":[{"$ref":"#/components/schemas/WhatsAppBusinessAccountStatus"}],"readOnly":true,"description":"WhatsApp's own state for this account as of `meta_synced_at`. The status is `active` until WhatsApp reports otherwise. WhatsApp already considers an account usable if Bird could connect a number under it. The absence of a reading is therefore not evidence of another state."},"account_review_status":{"allOf":[{"$ref":"#/components/schemas/WhatsAppBusinessAccountReviewStatus"}],"readOnly":true,"description":"How far WhatsApp's review of this account had got as of `meta_synced_at`. Absent until WhatsApp has reported it."},"business_verification_status":{"allOf":[{"$ref":"#/components/schemas/WhatsAppBusinessVerificationStatus"}],"readOnly":true,"description":"Whether Meta had verified the business behind this account as of `meta_synced_at`. Absent until Meta has reported it."},"marketing_messages_onboarding_status":{"allOf":[{"$ref":"#/components/schemas/WhatsAppBusinessAccountMarketingMessagesStatus"}],"readOnly":true,"description":"Whether this account can use WhatsApp's Marketing Messages API, as of `meta_synced_at`. Absent until WhatsApp has reported it. Distinct from the owning portfolio's `marketing_messages_onboarding_status` (`portfolio.marketing_messages_onboarding_status`), which Meta gives the same field name but a different vocabulary: this one is the account's own eligibility, that one is the portfolio's Terms-of-Service progress."},"portfolio":{"allOf":[{"$ref":"#/components/schemas/WhatsAppBusinessPortfolio"}],"readOnly":true,"description":"The Meta business portfolio that owns this account. Absent until Meta has reported it. The portfolio is where a messaging limit is set, so every account it owns shares one."},"ban":{"allOf":[{"$ref":"#/components/schemas/WhatsAppBusinessAccountBan"}],"readOnly":true,"description":"WhatsApp's ban on this account, absent unless Bird was told of one. `status` is what the account said when Bird last read it; this is what WhatsApp announced, which arrives only on the webhook that announces it and is never re-read."},"next":{"type":"array","readOnly":true,"description":"What to do next about this account's ban. Each entry names one action and says why\nit is worth taking. An empty list means Bird holds no `ban` record for this account.\nA ban Bird was never told of still shows as `banned` on the account's numbers, whose\nown `next` carries the appeal, and as Meta error `141014` on the `waba` entity in\n`meta_health_status`. Neither list says whether the account can send;\n`meta_health_status` does.\n\nWhile `ban` is present this links the account restrictions and appeals guide, which\nnames `ban.appeal_url`, because neither Bird nor this API can lift a ban.\n","items":{"$ref":"#/components/schemas/NextAction"},"example":[{"kind":"external","url":"https://bird.com/docs/knowledge-base/whatsapp/account-restrictions-and-appeals","description":"WhatsApp disabled this account, and neither Bird nor this API can lift it. Request a review at `ban.appeal_url`, or in Meta's Business Support Home for the owning portfolio when it is absent; the linked guide walks through it."},{"kind":"operation","operation":"getWhatsAppBusinessAccount","params":{"business_account_ref":"waa_01krdgeqcxet5s7t44vh8rt9mg"},"description":"Read the account again after Meta responds, to see whether it still carries `ban`."}]},"meta_health_status":{"allOf":[{"$ref":"#/components/schemas/WhatsAppMetaHealthStatus"}],"readOnly":true,"description":"Meta's own messaging health for this account as of `meta_synced_at`. Absent until Bird has read it, and absent again when the stored reading did not parse at all. An entity whose verdict falls outside this vocabulary is dropped on its own and the rest of the report still ships, so `entities` can be shorter than Meta's. A `blocked` verdict on the `waba` entity is why template sends fail with Meta's `#200` even though the number reads `active`: for example `error_code` `141006` names a payment method Meta rejected on the account."},"meta_synced_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When Bird last read this account's state from WhatsApp. `status`, `account_review_status`, `business_verification_status`, `marketing_messages_onboarding_status`, `portfolio` and `meta_health_status` are all that reading rather than live values; Bird re-reads roughly hourly. Absent for an account Bird has never read back."},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When this account was connected."},"updated_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When this account was last changed."}}},"WhatsAppBusinessAccountList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"The WhatsApp Business Accounts your workspace has connected.","items":{"$ref":"#/components/schemas/WhatsAppBusinessAccount"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"WhatsAppReachEstimateWindow":{"type":"string","description":"How many days of recent auctions a reach estimate is based on, ending now.","enum":["1d","7d","14d","28d"],"x-enum-varnames":["WhatsAppReachEstimateWindowOneDay","WhatsAppReachEstimateWindowSevenDays","WhatsAppReachEstimateWindowFourteenDays","WhatsAppReachEstimateWindowTwentyEightDays"],"default":"7d"},"WhatsAppReachEstimateRow":{"type":"object","additionalProperties":false,"required":["bid_amount","users","deliveries_lower_bound","deliveries_upper_bound","cost_lower_bound","cost_upper_bound"],"properties":{"bid_amount":{"type":"integer","format":"int64","description":"The candidate bid, per 1,000 deliveries in the smallest currency unit. It is the unit `optimization_spec.bid_amount` takes.","example":2590},"users":{"type":"integer","format":"int64","description":"The audience size the estimate is for.","example":1000},"deliveries_lower_bound":{"type":"integer","format":"int64","example":67},"deliveries_upper_bound":{"type":"integer","format":"int64","example":267},"cost_lower_bound":{"type":"number","format":"double","description":"The lower cost estimate, per 1,000 deliveries in the smallest currency unit.","example":1940.6530830145},"cost_upper_bound":{"type":"number","format":"double","description":"The upper cost estimate, per 1,000 deliveries in the smallest currency unit.","example":2590}}},"WhatsAppReachEstimate":{"type":"object","additionalProperties":false,"required":["currency_code","estimates"],"properties":{"currency_code":{"$ref":"#/components/schemas/CurrencyCode","description":"The currency of every amount in `estimates`."},"estimates":{"type":"array","description":"One estimate per candidate bid, in ascending bid order.","items":{"$ref":"#/components/schemas/WhatsAppReachEstimateRow"}}}},"WhatsAppSuppressionReasonFilter":{"type":"string","enum":["manual"]},"WhatsAppSuppressionID":{"type":"string","minLength":1,"pattern":"^was_[0-9a-hjkmnp-tv-z]{26}$","example":"was_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppSuppressionReason":{"type":"string","minLength":1,"x-extensible-enum":["manual"],"description":"Why the address cannot be messaged:\n\n- `manual`: Your workspace added the suppression through the API or the dashboard, and can end it.\n","example":"manual"},"WhatsAppSuppressionOrigin":{"type":"string","minLength":1,"x-extensible-enum":["api_key","user"],"description":"How the suppression came to exist:\n\n- `api_key`: an API call.\n- `user`: someone acting in the dashboard.\n\nKept beside the reason because one reason can arrive by more than one route.\n","example":"user"},"WhatsAppSuppressionCoverage":{"type":"string","minLength":1,"x-extensible-enum":["all"],"description":"Message categories blocked for this address. `all` blocks every category, including authentication and transactional messages, and is the only value in use. Treat unrecognized values as blocking every category.\n"},"WhatsAppSuppressionEndReason":{"type":"string","minLength":1,"x-extensible-enum":["api_key","user"],"description":"What ended it:\n\n- `api_key`: an API call.\n- `user`: someone acting in the dashboard.\n\nNull while the suppression is still stopping messages.\n"},"WhatsAppSuppression":{"type":"object","additionalProperties":false,"description":"One period during which messages to a WhatsApp address are stopped: when it started, what started it, and what ended it. An address suppressed, ended and suppressed again has two of these on record rather than one current state, the first ended and the second in force, and each keeps its own dates once it ends. The list returns the periods in force; fetch one by ID to read an ended one.\n","required":["id","address","waba","reason","origin","applies_to","source_whatsapp_id","blocking","effective_at","ended_at","ended_reason","ended_effective_at","created_at","last_asserted_at"],"properties":{"id":{"readOnly":true,"description":"Unique identifier for the suppression record.","$ref":"#/components/schemas/WhatsAppSuppressionID"},"address":{"type":"string","minLength":1,"description":"The suppressed WhatsApp address. For a phone number this is canonical E.164 with a leading plus sign, such as `+5511977670804`.\n","example":"+5511977670804"},"waba":{"type":["string","null"],"readOnly":true,"description":"The WhatsApp Business Account this stops, identified by its WhatsApp-issued account ID. Null when it stops the address for every account in the workspace, whichever one sends.\n","example":null},"reason":{"$ref":"#/components/schemas/WhatsAppSuppressionReason","readOnly":true},"origin":{"$ref":"#/components/schemas/WhatsAppSuppressionOrigin","readOnly":true},"applies_to":{"$ref":"#/components/schemas/WhatsAppSuppressionCoverage","readOnly":true},"blocking":{"type":"boolean","readOnly":true,"description":"Whether this is stopping messages right now. Always true in a list, which carries only the suppressions in force; false when you fetch one by ID that has since ended, which is also when `ended_at` is set.\n"},"source_whatsapp_id":{"oneOf":[{"$ref":"#/components/schemas/WhatsAppMessageID"},{"type":"null"}],"readOnly":true,"description":"The WhatsApp message a suppression was opened from. Null for a manual suppression, and Bird records no other kind today, so this is null on every record.\n"},"effective_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the suppression took effect. For one added through the API or the dashboard this is when it was added, so it matches `created_at`. This is what orders the list.\n"},"ended_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this stopped applying. Null while it is still stopping messages."},"ended_reason":{"oneOf":[{"$ref":"#/components/schemas/WhatsAppSuppressionEndReason"},{"type":"null"}],"readOnly":true},"ended_effective_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the end took effect. For one ended through the API or the dashboard this matches `ended_at`. Null while it is still stopping messages.\n"},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When we recorded it."},"last_asserted_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When we last recorded this suppression being stated. Later than `created_at` when your workspace added it again while it was already in force; a repeat adds no new record.\n"}}},"WhatsAppSuppressionList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of suppressions in force, most recent first by `effective_at`. Ended suppressions are left out; fetch one by ID to read it.\n","items":{"$ref":"#/components/schemas/WhatsAppSuppression"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"WhatsAppSuppressionCreate":{"type":"object","additionalProperties":false,"description":"Stops messages to one WhatsApp address, for one business account or for every account in the workspace.\n","required":["address"],"properties":{"address":{"type":"string","minLength":1,"description":"The WhatsApp address to stop messaging. For a phone number, supply canonical E.164 with a leading plus sign, such as `+5511977670804`. A value that is not a valid phone number or business-scoped user ID returns `422`.\n","example":"+5511977670804"},"waba":{"type":"string","minLength":1,"maxLength":64,"description":"The WhatsApp Business Account to stop, identified by its WhatsApp-issued account ID or by the `waa_` ID Bird gives it. Either form resolves to the same account, and the suppression stores and returns the WhatsApp-issued one. Omit it to stop the address for the whole workspace, whichever account sends. An account that is not one of yours returns `404` on a single create, and its row reports `error` in a bulk create.\n","example":"102290129340398"}}},"WhatsAppKeywordOperation":{"type":"string","minLength":1,"x-extensible-enum":["opt_in","opt_out"],"description":"What Bird does when an inbound message matches the rule.\n\n- `opt_out` records that the sender no longer consents to receive any messages from your\n  WhatsApp Business Account, including transactional ones. Typing the word is the person's\n  own statement, so it covers everything, unlike WhatsApp's built-in marketing opt-out\n  control, which stops marketing alone.\n- `opt_in` records that they consent again.\n\nA rule's operation is fixed once created, and a keyword belongs to exactly one operation, so\na keyword Bird ships for `opt_out` cannot be reused for `opt_in`.\n\nThis is an open enum. Accept unrecognized values: SMS already answers `help`, `info`, `confirm`\nand `custom`, and WhatsApp gains an operation without a new API version. Sending one Bird does\nnot answer yet is refused with `E15082`.\n","example":"opt_out"},"WhatsAppKeywordRuleScope":{"type":"string","minLength":1,"enum":["system","workspace"],"description":"Whether the rule is one Bird ships (`system`) or one your workspace created (`workspace`). Both kinds carry a `wkr_` ID and can be read; only a `workspace` rule can be changed or deleted. A `workspace` rule takes precedence over Bird's at the same grain, so it is how you replace a reply without losing the keywords Bird ships.\n","example":"workspace"},"WhatsAppKeywordRuleID":{"type":"string","minLength":1,"pattern":"^wkr_[0-9a-hjkmnp-tv-z]{26}$","example":"wkr_01krdgeqcxet5s7t44vh8rt9mg"},"WhatsAppKeywordRule":{"type":"object","additionalProperties":false,"readOnly":true,"required":["id","scope","operation","keywords","excluded_keywords","effective_keywords","created_at","updated_at"],"properties":{"id":{"$ref":"#/components/schemas/WhatsAppKeywordRuleID"},"scope":{"$ref":"#/components/schemas/WhatsAppKeywordRuleScope"},"operation":{"$ref":"#/components/schemas/WhatsAppKeywordOperation"},"country":{"type":["string","null"],"minLength":2,"maxLength":2,"description":"The country the rule applies in, as an ISO 3166-1 alpha-2 code. It is the country of the person who messaged you, worked out from their phone number, not the country of the account they messaged. Null means the rule applies worldwide, which is what Bird's own rules do. A rule for a country outranks a worldwide rule for the people it covers.\n","example":"US"},"waba":{"type":["string","null"],"description":"The WhatsApp Business Account the rule is limited to, identified by its WhatsApp-issued account ID, or null when it covers every account in your workspace. Bird's own rules are always null.\n","example":"102290129340398"},"keywords":{"type":"array","description":"The keywords this rule adds. For one of Bird's own rules this is the full set Bird ships. For a rule you created it is only what you added on top: it never restates Bird's keywords, so `effective_keywords` is what actually matches.\n","items":{"type":"string","minLength":1},"example":["no more texts","remove me"]},"excluded_keywords":{"type":"array","description":"Bird's keywords this rule removes from the set it inherits. Rules are tried most specific first, and a rule of yours with neither `country` nor `waba` comes after Bird's rule for the sender's country, as `effective_keywords` explains. When this rule answers a message that is exactly an excluded keyword, no one is opted in or out, no reply is sent, and no later rule acts on it, whether Bird's or another of yours that matches the same keyword. A more specific rule that answers first is unaffected. A rule with no `country` inherits Bird's keywords for each sender's country, so its exclusions apply only to senders whose set has the keyword. Excluding every one of Bird's keywords switches them off where this rule answers, though a keyword Bird adds later still matches unless it is already excluded. It changes no other rule's keywords. Always empty on one of Bird's own rules.\n","items":{"type":"string","minLength":1},"example":[]},"effective_keywords":{"type":"array","description":"Every keyword that matches this rule: Bird's keywords for the same operation and country, minus `excluded_keywords`, plus the ones you added. This is what an inbound message is compared against, and the whole message has to equal one of them. Keywords Bird adds later join it without you changing anything.\n\nFor a rule of **yours** with no `country`, this list is not the whole set it matches: such a rule compares against Bird's keywords for the sender's country, which the list cannot show because it does not know who is writing, so it shows Bird's worldwide keywords instead. Which rule answers decides whether that matters. Yours with no `country` and no `waba` sits below Bird's own country rule, so when a sender in a country Bird ships a rule for writes one of Bird's keywords, that rule answers and your reply is not used. A keyword you added reaches your rule only when no earlier rule matches it, and for a given sender the matched set can differ from this list in either direction. Yours with a `waba` and no `country` sits above it, so those senders match that country's keywords and get your reply, which is more keywords than this list names. Set a `country` on your own rule to see and extend exactly the set those senders match. A `system` rule is unaffected: each matches only its own keywords, and the ladder checks Bird's country rules separately from its worldwide one.\n","items":{"type":"string","minLength":1},"example":["stop","unsubscribe","optout","no more texts","remove me"]},"reply":{"type":["string","null"],"minLength":1,"description":"The message sent back when one of the keywords matches, or null when no reply is sent. The reply goes out on the conversation the inbound message opened.\n","example":"You're off the list. ACME Courier won't message you again."},"created_at":{"type":"string","format":"date-time","minLength":1,"description":"When the rule was created. On one of Bird's own rules this is when Bird last shipped a change to it.","example":"2026-09-15T10:04:00Z"},"updated_at":{"type":"string","format":"date-time","minLength":1,"description":"When the rule was last changed. On one of Bird's own rules this is when Bird last shipped a change to it.","example":"2026-09-15T10:04:00Z"}}},"WhatsAppKeywordRuleList":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","description":"The keyword rules that apply to your workspace, Bird's own included. Ordered most specific first, so the first rule whose keywords match an inbound message is the one that runs. The set is small and returned in full; this list is not paginated.\n","items":{"$ref":"#/components/schemas/WhatsAppKeywordRule"}}}},"WhatsAppKeywordOperationWrite":{"type":"string","minLength":1,"enum":["opt_in","opt_out"],"x-enum-varnames":["WhatsAppKeywordOperationWriteOptIn","WhatsAppKeywordOperationWriteOptOut"],"description":"What Bird does when an inbound message matches the rule.\n\n- `opt_out` records that the sender no longer consents to receive any messages from your\n  WhatsApp Business Account, including transactional ones. Typing the word is the person's\n  own statement, so it covers everything, unlike WhatsApp's built-in marketing opt-out\n  control, which stops marketing alone.\n- `opt_in` records that they consent again.\n\nA rule's operation is fixed once created, and a keyword belongs to exactly one operation, so\na keyword Bird ships for `opt_out` cannot be reused for `opt_in`.\n\nClosed on the write side: an operation Bird does not answer is rejected here rather than\nstored as a rule that never fires. The read side is open, because Bird can gain an operation\nwithout a new API version.\n","example":"opt_out"},"WhatsAppKeywordRuleCreate":{"type":"object","additionalProperties":false,"required":["operation"],"properties":{"operation":{"$ref":"#/components/schemas/WhatsAppKeywordOperationWrite"},"country":{"type":"string","minLength":2,"maxLength":2,"description":"The country this rule applies in, as an ISO 3166-1 alpha-2 code. It matches the country of the person who messaged you, worked out from their phone number. Omit it to cover everyone, which is what Bird's own rules do.\n","example":"US"},"waba":{"type":"string","minLength":1,"description":"Limit the rule to one WhatsApp Business Account, identified by its WhatsApp-issued account ID or by the `waa_` ID Bird gives it. Either form resolves to the same account, and the rule stores and returns the WhatsApp-issued one. Omit it to cover every account in your workspace. The account must be one of yours.\n","example":"102290129340398"},"keywords":{"type":"array","description":"Extra keywords to match, on top of the ones Bird already ships for this operation. Omit to keep Bird's keywords and change only the reply, including keywords Bird adds later. Use `excluded_keywords` to remove one of Bird's. A keyword Bird has bound to the other operation cannot be reused here.\n","items":{"type":"string","minLength":1},"example":["no more texts","remove me"]},"excluded_keywords":{"type":"array","description":"Bird's keywords to remove for the people this rule covers. Rules are tried most specific first: a more specific rule of yours answers before this one, and with neither `country` nor `waba` so does Bird's rule for the sender's country. When this rule answers a message that is exactly an excluded keyword, no one is opted in or out, no reply is sent, and no less specific rule acts on it, so you must honour opt-outs it carries yourself. Without a `country`, the rule inherits Bird's keywords for each sender's country, so an exclusion covers only senders whose set has that keyword. Exclude every one of Bird's keywords to switch them off where this rule answers; a keyword Bird adds later still matches unless it is already excluded. It changes none of your other rules. A keyword cannot be both added and excluded.\n","items":{"type":"string","minLength":1}},"reply":{"type":"string","minLength":1,"description":"The message to send back when a keyword matches. Omit it to send nothing.\n","example":"You're off the list. ACME Courier won't message you again."}}},"WhatsAppKeywordRuleUpdate":{"type":"object","additionalProperties":false,"description":"Changes the reply, the added keywords and the excluded ones. What a rule applies to (its operation, country and WhatsApp Business Account) is fixed once created: those decide which inbound messages reach it, so changing one would make it a different rule. Delete it and create the one you want.\n","properties":{"keywords":{"type":"array","description":"Replaces the extra keywords this rule matches, on top of the ones Bird ships. Send an empty array to keep Bird's keywords only. Omit to leave the current ones unchanged.\n","items":{"type":"string","minLength":1},"example":["no more texts"]},"excluded_keywords":{"type":"array","description":"Replaces the Bird keywords this rule removes. Send an empty array to remove none. Omit to leave the current ones unchanged.\n","items":{"type":"string","minLength":1}},"reply":{"type":["string","null"],"minLength":1,"description":"Replaces the message sent back when a keyword matches. Set it to null to send nothing. Omit to leave it unchanged.\n","example":"You're off the list. ACME Courier won't message you again."}}},"EmailInboxInsightsGroupBy":{"type":"string","minLength":1,"description":"The bucket size a series is grouped by. Day suits the product's charts; wider grains suit long ranges.\n","enum":["day","week","month"],"example":"day"},"EmailInboxInsightsCompare":{"type":"string","minLength":1,"description":"Set to `previous_period` to include the immediately preceding window of equal length in the same response, so deltas need no second request.\n","enum":["previous_period"],"example":"previous_period"},"EmailInboxInsightsWeightingSource":{"type":"string","minLength":1,"description":"Where the audience mix behind the placement weighting came from: `account` when it was configured for this account, `global` when a general default was used instead.\n","enum":["account","global"],"example":"account"},"EmailInboxInsightsWeighting":{"type":"object","additionalProperties":false,"description":"How the placement figures in this response were weighted, so a number is\nself-describing wherever it is quoted or screenshotted.\n\nPlacement rates are a weighted average of per-provider rates against an\naudience mix (the share of recipients expected at each mailbox provider)\nrather than a share of delivered volume.\n","required":["weight_set_id","source","basis"],"properties":{"weight_set_id":{"type":"string","minLength":1,"readOnly":true,"description":"The measurement's own identifier for the audience mix, carried through so a client can tell two weightings apart without comparing `basis` strings. No operation accepts it.\n","example":"12"},"source":{"oneOf":[{"$ref":"#/components/schemas/EmailInboxInsightsWeightingSource"},{"type":"null"}],"readOnly":true,"description":"Which audience mix the weighting used. Null when the measurement weighted these figures by a method this API does not model: the enum is closed so that a client can branch on it exhaustively, which means an unfamiliar method has to answer \"not one of these\" rather than be passed through. `basis` usually still describes the method in words when that happens.\n"},"basis":{"type":["string","null"],"minLength":1,"readOnly":true,"description":"The weighting method behind the rates, as the measurement names it. A slug rather than a sentence, so render it as a label and do not expect it to read as English. Null when the measurement did not state one, which pairs with `source`: both describe the method, so neither can claim to know it when the measurement was silent.\n","example":"weighted-mean-of-per-isp-rates"}}},"EmailInboxInsightsMeasurement":{"type":"object","additionalProperties":false,"description":"How the figures in this response were measured, so a number is self-describing in a screenshot or a bug report.\n","required":["sources"],"properties":{"sources":{"type":"array","readOnly":true,"description":"Identifiers of the measurement systems that contributed to these figures. The set grows as measurement coverage does, so treat the values as labels rather than a closed list.\n","items":{"type":"string","minLength":1,"x-extensible-enum":["panel","intelliseed_public","intelliseed_private","eds"]},"example":["panel","intelliseed_public"]},"weighting":{"$ref":"#/components/schemas/EmailInboxInsightsWeighting","readOnly":true,"description":"How the figures were weighted. Present on figures weighted against an audience mix, which is placement's method; measurements that weight nothing carry no weighting block.\n"}}},"EmailInboxInsightsFreshness":{"type":"object","additionalProperties":false,"description":"How current the figures are. Freshness differs per resource (authentication data can lag a day or more while blocklist lookups are near real time), so any \"as of\" label binds from this field, never from a fixed string.\n","required":["as_of","lag_hint"],"properties":{"as_of":{"type":["string","null"],"format":"date","readOnly":true,"description":"The most recent UTC day the figures include, or null for a live lookup that has no measurement window.\n","example":"2026-08-17"},"lag_hint":{"type":["string","null"],"readOnly":true,"description":"How far behind real time this resource usually runs. A lowercase\nidentifier rather than a display label, so pick your own wording for it,\nand treat the set as open: the measurement names a hint per resource and\ncan add one without notice.\n\nNull when the measurement reports no hint, which several resources do:\nshow the figures without an age rather than inventing one.\n","x-extensible-enum":["daily","nightly","near_real_time"],"example":"daily"}}},"EmailInboxInsightsEnvelopeBase":{"type":"object","description":"The meta every Inbox Insights resource carries, whatever it measures, so one client adapter serves them all.\n","required":["resource","domain","generated_at","freshness"],"properties":{"resource":{"type":"string","minLength":1,"readOnly":true,"description":"Which resource this response is, echoed for self-description.","example":"placement"},"domain":{"type":"string","minLength":1,"readOnly":true,"description":"The sending domain the figures describe.","example":"mail.acme.com"},"measurement":{"$ref":"#/components/schemas/EmailInboxInsightsMeasurement","readOnly":true,"description":"How the figures were measured. Present only where a figure was weighted or drawn from a named set of sources, which today means placement and the industry benchmark. Absent on the reputation resources and on a live lookup, neither of which weights anything.\n"},"generated_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When these figures were computed. The measurement service's own stamp where it publishes one; on the resources Bird derives from daily rates it has none to publish, and this is when Bird computed them.\n","example":"2026-08-18T09:34:00Z"},"freshness":{"$ref":"#/components/schemas/EmailInboxInsightsFreshness","readOnly":true},"cached_at":{"type":"string","format":"date-time","readOnly":true,"description":"Present when the response was served from a short-lived copy rather than fetched for this request: when that copy was fetched.\n","example":"2026-08-18T09:40:02Z"}}},"EmailInboxInsightsWindow":{"type":"object","additionalProperties":false,"description":"The period every figure in the response covers: whole UTC calendar days,\ninclusive on both ends. The same window convention the email statistics\nendpoints use, so figures from the two sources describe the same days and\ncan be combined without adjustment.\n","required":["start","end"],"properties":{"start":{"type":"string","format":"date","minLength":1,"readOnly":true,"description":"First UTC day of the period, inclusive.","example":"2026-08-12"},"end":{"type":"string","format":"date","minLength":1,"readOnly":true,"description":"Last UTC day of the period, inclusive.","example":"2026-08-18"},"group_by":{"$ref":"#/components/schemas/EmailInboxInsightsGroupBy","readOnly":true,"description":"The bucket size any series in this response is grouped by. Absent on resources with no series."}}},"EmailInboxInsightsComparedTo":{"type":"object","additionalProperties":false,"description":"The prior equal-length period the delta figures compare against. Present only when the request asked for a comparison.\n","required":["start","end"],"properties":{"start":{"type":"string","format":"date","minLength":1,"readOnly":true,"description":"First UTC day of the prior period, inclusive.","example":"2026-06-19"},"end":{"type":"string","format":"date","minLength":1,"readOnly":true,"description":"Last UTC day of the prior period, inclusive.","example":"2026-07-18"}}},"EmailInboxInsightsEnvelope":{"type":"object","description":"The meta a windowed Inbox Insights resource carries: the common fields plus the period the figures cover and how they were measured.\n","allOf":[{"$ref":"#/components/schemas/EmailInboxInsightsEnvelopeBase"},{"type":"object","required":["window"],"properties":{"window":{"$ref":"#/components/schemas/EmailInboxInsightsWindow"},"compared_to":{"$ref":"#/components/schemas/EmailInboxInsightsComparedTo"}}}]},"EmailInboxInsightsPlacementCounts":{"type":"object","additionalProperties":false,"description":"Raw measured placements behind a set of rates, before any weighting. A measured placement is one message whose mailbox destination the measurement observed.\n","required":["inbox","spam","missing","measured"],"properties":{"inbox":{"type":"integer","minimum":0,"readOnly":true,"description":"Measured placements observed in the inbox.","example":418211},"spam":{"type":"integer","minimum":0,"readOnly":true,"description":"Measured placements observed in spam.","example":60233},"missing":{"type":"integer","minimum":0,"readOnly":true,"description":"Measured sends that arrived in neither folder.","example":0},"measured":{"type":"integer","minimum":0,"readOnly":true,"description":"Total measured placements the rates were computed over.","example":478444}}},"EmailInboxInsightsPlacementDeltaPts":{"type":"object","additionalProperties":false,"readOnly":true,"description":"How the domain-wide rates moved against the prior period, in percentage points. Present only when the request asked for a comparison and the prior period had data. Without a requested comparison or comparable prior data they are absent, not zero change.\n","required":["inbox","spam"],"properties":{"inbox":{"type":"number","readOnly":true,"description":"Inbox-rate movement in percentage points; negative means it fell.","example":-3.1},"spam":{"type":"number","readOnly":true,"description":"Spam-rate movement in percentage points.","example":3.1}}},"EmailInboxInsightsSectionStatus":{"type":"string","minLength":1,"description":"Whether a section of the response carries figures, and when it does not, why.\n\n`ok` means the section is populated. `no_data` means the measurement ran and\nobserved nothing to report for this domain in the period. `not_configured`\nmeans the section needs a setup step that has not been completed yet, such as\nconnecting Google Postmaster Tools; treat it as an invitation to finish\nsetup rather than a fault. `unavailable` means the figures could not be retrieved this time and\nthe same request may well succeed on a retry; the rest of the response is\nunaffected. `not_applicable` means the section is meaningless for this domain\nin this period, so there is nothing to show or fix.\n\nA successful response never implies every section is populated; read each\nsection's status rather than assuming figures are present.\n","enum":["ok","no_data","not_configured","unavailable","not_applicable"],"example":"ok"},"EmailInboxInsightsPlacementSummary":{"type":"object","additionalProperties":false,"description":"The domain-wide placement figures for the period.\n\nThese rates are weighted against the audience mix in `measurement.weighting`,\nso they can legitimately differ from any single provider row, which has no\nmix to weight. Rates are percentages of measured placements, never of\ndelivered volume.\n","required":["inbox_rate_percent","spam_rate_percent","missing_rate_percent","raw_counts","read_rate_percent","status"],"properties":{"inbox_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Estimated share of measured placements that landed in the inbox, as a percentage.","example":87.4},"spam_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Estimated share of measured placements that landed in spam, as a percentage.","example":12.6},"missing_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Estimated share of measured sends that arrived in neither folder, as a percentage.","example":0},"raw_counts":{"oneOf":[{"$ref":"#/components/schemas/EmailInboxInsightsPlacementCounts"},{"type":"null"}],"readOnly":true,"description":"The measured placements the rates above were computed over, or null when the summary has none: a period with no measured mail reports null here rather than four zeros, because a zero count is a real measurement and would read as \"we looked and found nothing\" for a domain nothing looked at. Read `status` alongside it.\n"},"read_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Estimated share of inbox-placed mail that was read, as a percentage, measured by the panel's dwell time. This is not an open rate; the two count different things and are not interchangeable.\n","example":21.4},"delta_pts":{"$ref":"#/components/schemas/EmailInboxInsightsPlacementDeltaPts","readOnly":true},"status":{"$ref":"#/components/schemas/EmailInboxInsightsSectionStatus","readOnly":true}}},"EmailInboxInsightsMailboxProvider":{"type":"string","minLength":1,"readOnly":true,"description":"A mailbox provider, as the measurement identifies it. A lowercase identifier rather than\na display name, so pick your own label for it, and treat the set as open: this is a long\ntail rather than a handful of household names, and some entries are domains\n(`fastmail.com`, `seznam.cz`) rather than brands.\n\nThe measurement places mail into its own seed lists, so its buckets are not the ones the\n[mailbox-provider stats breakdown](/docs/api/reference/get-email-stats-by-mailbox-provider)\nreports: Microsoft's properties appear here as `hotmail` rather than `microsoft`, and\n`apple` appears here where the Competitive Insights panel has no measurement for it at\nall. None of the three is a joinable dimension against the others.\n","example":"gmail"},"EmailInboxInsightsPlacementProvider":{"type":"object","additionalProperties":false,"description":"One mailbox provider's placement for the period. Unlike the domain-wide summary, a single provider's rates are unweighted: there is no audience mix to weight within one provider.\n","required":["mailbox_provider","inbox_rate_percent","spam_rate_percent","raw_counts","read_rate_percent"],"properties":{"mailbox_provider":{"$ref":"#/components/schemas/EmailInboxInsightsMailboxProvider","readOnly":true,"description":"The provider whose placement this row describes."},"inbox_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of this provider's measured placements that landed in the inbox, as a percentage.","example":89.2},"spam_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of this provider's measured placements that landed in spam, as a percentage.","example":10.8},"raw_counts":{"$ref":"#/components/schemas/EmailInboxInsightsPlacementCounts","readOnly":true},"delta_pts":{"type":"number","readOnly":true,"description":"Inbox-rate movement against the prior period, in percentage points. Present only when the request asked for a comparison and the prior period had data for this provider; absence is not zero change.\n","example":0.4},"read_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of this provider's inbox-placed mail that was read, as a percentage.","example":24.3}}},"EmailInboxInsightsPlacementProviders":{"type":"object","additionalProperties":false,"description":"The per-provider placement table.","required":["items","status"],"properties":{"items":{"type":"array","readOnly":true,"description":"One row per mailbox provider the measurement observed for this domain in the period.","items":{"$ref":"#/components/schemas/EmailInboxInsightsPlacementProvider"}},"status":{"$ref":"#/components/schemas/EmailInboxInsightsSectionStatus","readOnly":true}}},"EmailInboxInsightsPlacementSeriesPoint":{"type":"object","additionalProperties":false,"description":"One bucket of the placement series.","required":["date","mailbox_provider","inbox_rate_percent","spam_rate_percent","inbox_raw_count","spam_raw_count"],"properties":{"date":{"type":"string","format":"date","minLength":1,"readOnly":true,"description":"First UTC day of the bucket.","example":"2026-07-19"},"mailbox_provider":{"oneOf":[{"$ref":"#/components/schemas/EmailInboxInsightsMailboxProvider"},{"type":"null"}],"readOnly":true,"description":"The provider this point describes, or null on the domain-wide line. Per-provider points appear only when the request named providers.\n","example":null},"inbox_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Inbox share of the bucket's measured placements, as a percentage.","example":90.6},"spam_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Spam share of the bucket's measured placements, as a percentage.","example":9.4},"inbox_raw_count":{"type":"integer","minimum":0,"readOnly":true,"description":"Measured placements observed in the inbox in this bucket.","example":14201},"spam_raw_count":{"type":"integer","minimum":0,"readOnly":true,"description":"Measured placements observed in spam in this bucket.","example":1473}}},"EmailInboxInsightsPlacementSeries":{"type":"object","additionalProperties":false,"description":"The placement time series, at the grain named in `window.group_by`.\n\nThe series is sparse: buckets with no measured placement are omitted rather\nthan returned as zeros, because an invented zero would be indistinguishable\nfrom a measured one. Index by date, never by position.\n","required":["items","status"],"properties":{"items":{"type":"array","readOnly":true,"description":"One point per bucket with measured placements. With providers named in the request, one point per bucket per provider.\n","items":{"$ref":"#/components/schemas/EmailInboxInsightsPlacementSeriesPoint"}},"status":{"$ref":"#/components/schemas/EmailInboxInsightsSectionStatus","readOnly":true}}},"EmailInboxInsightsGmailTab":{"type":"string","minLength":1,"readOnly":true,"description":"A Gmail tab, as the measurement identifies it. A lowercase identifier rather than a\ndisplay name, so pick your own label for it, and treat the set as open: these are\nGmail's own tabs, and the measurement reports whichever one it saw.\n\n`none` is a value rather than an absence: Gmail delivered the mail under no tab at all,\nwhich is an ordinary outcome and not a gap in the measurement.\n","x-extensible-enum":["primary","promotions","updates","forums","social","none"],"example":"promotions"},"EmailInboxInsightsGmailTabCategory":{"type":"object","additionalProperties":false,"description":"How the domain's Gmail-placed mail split across one Gmail tab.","required":["category","overall_percent","inbox_percent","spam_percent"],"properties":{"category":{"$ref":"#/components/schemas/EmailInboxInsightsGmailTab","readOnly":true,"description":"The tab this row describes."},"overall_percent":{"type":["number","null"],"readOnly":true,"description":"Share of the domain's Gmail-placed mail that landed under this tab, as a percentage.","example":34},"inbox_percent":{"type":["number","null"],"readOnly":true,"description":"Share of this tab's mail that placed in the inbox, as a percentage.","example":94},"spam_percent":{"type":["number","null"],"readOnly":true,"description":"Share of this tab's mail that placed in spam, as a percentage.","example":6}}},"EmailInboxInsightsGmailTabs":{"type":"object","additionalProperties":false,"description":"Where the domain's Gmail-placed mail landed across Gmail's tabs. The status is `not_applicable` when the domain had no Gmail placement in the period; hide the section rather than showing an empty split.\n","required":["categories","status"],"properties":{"categories":{"type":"array","readOnly":true,"description":"One entry per Gmail tab that received mail.","items":{"$ref":"#/components/schemas/EmailInboxInsightsGmailTabCategory"}},"status":{"$ref":"#/components/schemas/EmailInboxInsightsSectionStatus","readOnly":true}}},"EmailInboxInsightsPlacementIpDetail":{"type":"object","additionalProperties":false,"description":"One sending IP's placement and authentication pass rates for the period.","required":["ip","inbox_rate_percent","raw_counts","spf_pass_rate_percent","dkim_pass_rate_percent"],"properties":{"ip":{"type":"string","minLength":1,"readOnly":true,"description":"The sending IP address.","example":"147.253.40.16"},"inbox_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of this IP's measured placements that landed in the inbox, as a percentage.","example":89.9},"raw_counts":{"$ref":"#/components/schemas/EmailInboxInsightsPlacementCounts","readOnly":true},"spf_pass_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of this IP's measured mail that passed SPF, as a percentage.","example":99.8},"dkim_pass_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of this IP's measured mail that passed DKIM, as a percentage.","example":99.9}}},"EmailInboxInsightsPlacementIpDetails":{"type":"object","additionalProperties":false,"description":"Per-IP placement detail for the domain's sending infrastructure. Returned only when the request asked for IP detail.\n","required":["items","status"],"properties":{"items":{"type":"array","readOnly":true,"description":"One row per sending IP the measurement observed for this domain in the period.","items":{"$ref":"#/components/schemas/EmailInboxInsightsPlacementIpDetail"}},"status":{"$ref":"#/components/schemas/EmailInboxInsightsSectionStatus","readOnly":true}}},"EmailInboxInsightsPlacement":{"description":"Where a sending domain's measured mail landed over the period: the\ndomain-wide summary, the per-provider table, the time series, the Gmail tab\nsplit, and optionally per-IP detail.\n\nPlacement figures are estimates from a measurement panel of real mailboxes,\nand every rate is a percentage of measured placements, never of delivered\nvolume. Each section carries its own status; a successful response never\nimplies every section is populated.\n","unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/EmailInboxInsightsEnvelope"},{"type":"object","required":["summary","providers","series","gmail_tabs","measurement"],"properties":{"summary":{"$ref":"#/components/schemas/EmailInboxInsightsPlacementSummary"},"providers":{"$ref":"#/components/schemas/EmailInboxInsightsPlacementProviders"},"series":{"$ref":"#/components/schemas/EmailInboxInsightsPlacementSeries"},"gmail_tabs":{"$ref":"#/components/schemas/EmailInboxInsightsGmailTabs"},"ip_details":{"$ref":"#/components/schemas/EmailInboxInsightsPlacementIpDetails"}}}]},"EmailInboxInsightsAuthPassRate":{"type":"object","additionalProperties":false,"description":"One authentication check's pass rate over the period.","required":["pass_rate_percent","source","status"],"properties":{"pass_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of the domain's measured mail that passed this check, as a percentage.","example":99.8},"delta_pts":{"type":"number","readOnly":true,"description":"How the pass rate moved against the prior period, in percentage points. Present only when the request asked for a comparison and the prior period had data; absence is not zero change.\n","example":0.1},"source":{"type":["string","null"],"minLength":1,"readOnly":true,"description":"Where this figure comes from. `dmarc_rua` is authoritative aggregate\nreporting and covers every sender of the domain, forwarders included;\n`google_postmaster` is a fallback covering only mail Google received. It\ncan differ from the source of the DMARC figures, so surface it per check\nrather than once per response.\n\nNull on a check that reports no figure at all, which is what a\n`not_configured` status means: there is no measurement, so there is no\nsource to name.\n","x-extensible-enum":["dmarc_rua","google_postmaster"],"example":"dmarc_rua"},"status":{"$ref":"#/components/schemas/EmailInboxInsightsSectionStatus","readOnly":true}}},"EmailInboxInsightsDmarcPolicy":{"type":"string","minLength":1,"description":"The DMARC policy published in the domain's DNS record: what receivers are asked to do with mail that fails DMARC.\n","enum":["none","quarantine","reject"],"example":"quarantine"},"EmailInboxInsightsDmarcReadinessReason":{"type":"string","minLength":1,"description":"Why the domain is not yet ready to move its DMARC policy to `reject`. `source_below_threshold` means at least one legitimate sender is not authenticating well enough yet; `data_too_stale` means the reporting is too old to judge; `no_rua_data` means no aggregate reports have arrived at all; `no_policy` means the domain publishes no DMARC record to tighten. The reporting decides this set and can add to it, so show an unrecognised value rather than treating it as no reason at all.\n","x-extensible-enum":["source_below_threshold","data_too_stale","no_rua_data","no_policy"],"example":"source_below_threshold"},"EmailInboxInsightsDmarc":{"type":"object","additionalProperties":false,"description":"The domain's DMARC standing over the period.","required":["aligned_rate_percent","policy","ready_for_reject","readiness_reasons","source","status"],"properties":{"aligned_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of the domain's measured mail that passed DMARC alignment, as a percentage.","example":98.6},"policy":{"oneOf":[{"$ref":"#/components/schemas/EmailInboxInsightsDmarcPolicy"},{"type":"null"}],"readOnly":true,"description":"The policy published in the domain's DNS record, or null when the domain publishes no DMARC record at all. Null is not `none`: `none` is a policy, asking receivers to take no action while the domain monitors its reporting, and a domain that has one is already set up. A null asks for a record to be published, which is a different first step.\n"},"ready_for_reject":{"type":["boolean","null"],"readOnly":true,"description":"Whether the domain's authentication is consistent enough to move the policy to `reject` without losing legitimate mail. Deliberately conservative: false whenever the data is insufficient to be sure. Null when the measurement reached no verdict, which is what a `status` other than `ok` means here: false would read as a considered \"not yet\" rather than as no assessment having been made.\n","example":false},"readiness_reasons":{"type":["array","null"],"readOnly":true,"description":"Why `ready_for_reject` is false, so the answer is actionable rather than a bare refusal. Empty when nothing is holding the domain back, and null when readiness was not assessed, which pairs with `ready_for_reject`: an empty list alongside a null verdict would say the opposite of what was measured. Render these rather than a plain \"not ready\": the fix differs per reason, and a domain held back only by stale reporting needs no configuration change at all.\n","items":{"$ref":"#/components/schemas/EmailInboxInsightsDmarcReadinessReason"}},"delta_pts":{"type":"number","readOnly":true,"description":"How the aligned rate moved against the prior period, in percentage points. Present only when the request asked for a comparison and the prior period had data; absence is not zero change.\n","example":-0.2},"source":{"type":["string","null"],"minLength":1,"readOnly":true,"description":"Where the DMARC figures come from. `dmarc_rua` is authoritative\naggregate reporting and covers every sender of the domain, forwarders\nincluded; `google_postmaster` is a fallback covering only mail Google\nreceived. The two are not equivalent, so surface which one is shown.\n\nNull when the section reports no figures, which is what a\n`not_configured` status means for a domain with no aggregate reporting\nand no Postmaster connection.\n","x-extensible-enum":["dmarc_rua","google_postmaster"],"example":"dmarc_rua"},"status":{"$ref":"#/components/schemas/EmailInboxInsightsSectionStatus","readOnly":true}}},"EmailInboxInsightsDmarcVerdict":{"type":"string","minLength":1,"description":"How a sending source's mail authenticates against the domain's DMARC policy. `aligned` passes with both SPF and DKIM aligned; `dkim_only` and `spf_only` pass on one mechanism; `fails_policy` passes neither. The reporting decides this set and can add to it, so treat an unrecognised value as a label to show rather than a case to exhaust. A source whose verdict is new still belongs in the table.\n","x-extensible-enum":["aligned","dkim_only","spf_only","fails_policy"],"example":"aligned"},"EmailInboxInsightsAuthSource":{"type":"object","additionalProperties":false,"description":"One system observed sending as this domain, with how its mail authenticates.","required":["name","category","volume","spf_aligned_rate_percent","dkim_aligned_rate_percent","dmarc_pass_rate_percent","verdict","qualifies_for_readiness"],"properties":{"name":{"type":"string","minLength":1,"readOnly":true,"description":"The sending source as the reporting identifies it. Not a fixed list: unidentified senders, mostly forwarders, appear as a real category.\n","example":"Bird (mail.acme.com)"},"category":{"type":["string","null"],"minLength":1,"readOnly":true,"description":"A coarse classification of the source. The set can grow; treat values as labels. Null when the measurement did not classify this sender.\n","x-extensible-enum":["esp","unknown"],"example":"esp"},"volume":{"type":"integer","format":"int64","minimum":0,"readOnly":true,"description":"Messages the reporting attributes to this source over the period.","example":4820000},"spf_aligned_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of this source's mail that passed SPF with alignment, as a percentage.","example":99.8},"dkim_aligned_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of this source's mail that passed DKIM with alignment, as a percentage.","example":99.9},"dmarc_pass_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of this source's mail that passed DMARC, as a percentage.","example":99.9},"verdict":{"$ref":"#/components/schemas/EmailInboxInsightsDmarcVerdict","readOnly":true},"qualifies_for_readiness":{"type":"boolean","readOnly":true,"description":"Whether this source counts toward the reject recommendation. A source that does not is excluded from that judgement, which is what lets this table explain a conservative recommendation instead of contradicting it.\n","example":true}}},"EmailInboxInsightsAuthSources":{"type":"object","additionalProperties":false,"description":"Every system observed sending as this domain, with how each authenticates. This is the table that shows who else sends under the domain's name.\n","required":["items","latest_data_date","status"],"properties":{"items":{"type":"array","readOnly":true,"description":"One row per observed sending source.","items":{"$ref":"#/components/schemas/EmailInboxInsightsAuthSource"}},"latest_data_date":{"type":["string","null"],"format":"date","readOnly":true,"description":"The most recent UTC day the source reporting includes. Aggregate DMARC reports arrive on reporters' own schedules, routinely a day or more behind, so the newest days look sparse; label from this date rather than treating the dip as a regression.\n","example":"2026-08-15"},"status":{"$ref":"#/components/schemas/EmailInboxInsightsSectionStatus","readOnly":true}}},"EmailInboxInsightsAuthentication":{"description":"Whether the domain's mail authenticates, and who sends as the domain: SPF\nand DKIM pass rates, the DMARC standing with its published policy, and the\nper-source table that shows every system observed sending under the\ndomain's name.\n\nWithout a completed Google Postmaster connection and without aggregate\nDMARC reporting, sections report `not_configured`: an invitation to finish\nsetup rather than a fault. Each section carries its own status.\n","unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/EmailInboxInsightsEnvelope"},{"type":"object","required":["spf","dkim","dmarc","sources"],"properties":{"spf":{"$ref":"#/components/schemas/EmailInboxInsightsAuthPassRate","description":"The domain's SPF pass rate."},"dkim":{"$ref":"#/components/schemas/EmailInboxInsightsAuthPassRate","description":"The domain's DKIM pass rate."},"dmarc":{"$ref":"#/components/schemas/EmailInboxInsightsDmarc"},"sources":{"$ref":"#/components/schemas/EmailInboxInsightsAuthSources"}}}]},"EmailInboxInsightsComplaintPeak":{"type":"object","additionalProperties":false,"description":"The worst day for complaints in the period.","required":["date","value_percent"],"properties":{"date":{"type":"string","format":"date","minLength":1,"readOnly":true,"description":"The UTC day the highest rate fell on.","example":"2026-08-02"},"value_percent":{"type":"number","readOnly":true,"description":"The rate on that day, as a percentage.","example":0.34}}},"EmailInboxInsightsComplaintRate":{"type":"object","additionalProperties":false,"description":"The rate at which the domain's mail is reported as spam, as Google Postmaster measures it.","required":["gmail_postmaster_spam_rate_percent","status"],"properties":{"gmail_postmaster_spam_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of the domain's Gmail-received mail that recipients reported as spam, as a percentage, from Google Postmaster.\n","example":0.11},"delta_pts":{"type":"number","readOnly":true,"description":"How the rate moved against the prior period, in percentage points. Present only when the request asked for a comparison and the prior period had data; absence is not zero change.\n","example":0.03},"peak":{"$ref":"#/components/schemas/EmailInboxInsightsComplaintPeak","readOnly":true,"description":"The worst day in the period, so a spike can be named without scanning the series. Absent when there is no rate to peak.\n"},"status":{"$ref":"#/components/schemas/EmailInboxInsightsSectionStatus","readOnly":true}}},"EmailInboxInsightsComplaintSeriesPoint":{"type":"object","additionalProperties":false,"description":"One bucket of the complaint-rate series.","required":["date","gmail_postmaster_spam_rate_percent"],"properties":{"date":{"type":"string","format":"date","minLength":1,"readOnly":true,"description":"First UTC day of the bucket.","example":"2026-07-19"},"gmail_postmaster_spam_rate_percent":{"type":["number","null"],"readOnly":true,"description":"The bucket's Google Postmaster spam rate, as a percentage.","example":0.08}}},"EmailInboxInsightsComplaintSeries":{"type":"object","additionalProperties":false,"description":"The complaint-rate series, at the grain named in `window.group_by`. Index by date, never by position.\n","required":["items","status"],"properties":{"items":{"type":"array","readOnly":true,"description":"One point per bucket.","items":{"$ref":"#/components/schemas/EmailInboxInsightsComplaintSeriesPoint"}},"status":{"$ref":"#/components/schemas/EmailInboxInsightsSectionStatus","readOnly":true}}},"EmailInboxInsightsComplaints":{"description":"How often the domain's mail is reported as spam, as Google Postmaster\nmeasures it. This is Google's number for Gmail-received mail only; the\nfeedback-loop complaint rate for all providers is a Bird-measured figure\nserved by the email statistics endpoints, and the two are different\nmeasurements of different mail.\n\nFor a domain without a completed Google Postmaster connection every section\nreports `not_configured`: an invitation to finish setup rather than a fault.\n","unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/EmailInboxInsightsEnvelope"},{"type":"object","required":["rate","series"],"properties":{"rate":{"$ref":"#/components/schemas/EmailInboxInsightsComplaintRate"},"series":{"$ref":"#/components/schemas/EmailInboxInsightsComplaintSeries"}}}]},"EmailInboxInsightsTrapType":{"type":"string","minLength":1,"description":"What kind of spam trap was hit. `pristine` addresses were never used by a real person and never subscribed to anything, so a hit means the address was harvested or guessed rather than collected. `recycled` addresses belonged to a real person once and were retired, so hits point at stale list data. `typo` addresses catch misspellings of real domains, `parked` addresses sit on domains that are registered but not used for real mail, and `mixed` covers hits the trap network reports without a single kind. The trap network decides this set and can add to it, so treat an unrecognised value as a label to show rather than a case to exhaust. A hit whose kind is new is still a hit worth acting on.\n","x-extensible-enum":["pristine","recycled","typo","parked","mixed"],"example":"recycled"},"EmailInboxInsightsSpamTrapTypeCount":{"type":"object","additionalProperties":false,"description":"Trap hits of one kind.","required":["type","hits"],"properties":{"type":{"$ref":"#/components/schemas/EmailInboxInsightsTrapType","readOnly":true},"hits":{"type":"integer","minimum":0,"readOnly":true,"description":"Hits of this kind over the period. A zero is a measured zero, not missing data: no pristine hits is a genuinely good result rather than an empty state.\n","example":3}}},"EmailInboxInsightsTrapSource":{"type":"string","minLength":1,"description":"The trap network that observed a hit. The set grows as coverage does, so treat the values as labels rather than a closed list.\n","x-extensible-enum":["cloudmark","abusix"],"example":"cloudmark"},"EmailInboxInsightsSpamTrapSourceCount":{"type":"object","additionalProperties":false,"description":"Trap hits attributed to one trap network.","required":["source","hits"],"properties":{"source":{"$ref":"#/components/schemas/EmailInboxInsightsTrapSource","readOnly":true},"hits":{"type":"integer","minimum":0,"readOnly":true,"description":"Hits this network observed over the period.","example":2}}},"EmailInboxInsightsSpamTrapHit":{"type":"object","additionalProperties":false,"description":"One trap address this domain's mail reached, with enough detail to trace where the address came from. A row can represent several hits on the same trap, so read `hit_count` rather than counting rows.\n","required":["first_seen","last_seen","ip_address","source","type","trap_age_days"],"properties":{"first_seen":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the trap network first observed mail from this domain at this trap.","example":"2026-08-14T06:21:00Z"},"last_seen":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"The most recent sighting, or null when the trap was seen only once. On a row with several hits this is the far end of the period they span.\n","example":"2026-08-16T11:04:00Z"},"ip_address":{"type":"string","minLength":1,"readOnly":true,"description":"The sending IP the message came from.","example":"147.253.40.16"},"source":{"$ref":"#/components/schemas/EmailInboxInsightsTrapSource","readOnly":true},"type":{"$ref":"#/components/schemas/EmailInboxInsightsTrapType","readOnly":true},"hit_count":{"type":"integer","minimum":1,"readOnly":true,"description":"How many times this trap was hit over the period, so rows do not sum to `total` on their own: one repeatedly hit trap is one row. Absent when the trap network does not break the count out, which is not the same as one hit. A row exists because the trap was reached at least once either way.\n","example":2},"trap_age_days":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"How long the trap address has been a trap, in days, or null when the network does not say. A high age on a recycled trap suggests the address has been dead in the list for a long time.\n","example":430}}},"EmailInboxInsightsSpamTrapHits":{"type":"object","additionalProperties":false,"description":"The individual trap hits behind the totals. A sample rather than a guaranteed complete list, and its rows do not count hits: one row is one trap address, carrying a `hit_count` for how many times that address was reached. Neither the number of rows nor the sum of `hit_count` reconstructs `total`, because that field is absent wherever the trap network does not break the figure out. Read `truncated_types` for what the measurement capped rather than inferring completeness by comparing counts.\n","required":["items","truncated_types","status"],"properties":{"items":{"type":"array","readOnly":true,"description":"One entry per trap reached, newest first.","items":{"$ref":"#/components/schemas/EmailInboxInsightsSpamTrapHit"}},"truncated_types":{"type":"array","readOnly":true,"description":"Trap kinds whose hits the measurement capped, so the rows shown for them are incomplete by design rather than by chance. Typo-trap hits, for instance, only ever cover the last seven days. An empty array means nothing was capped.\n","items":{"$ref":"#/components/schemas/EmailInboxInsightsTrapType"}},"status":{"$ref":"#/components/schemas/EmailInboxInsightsSectionStatus","readOnly":true}}},"EmailInboxInsightsSpamTraps":{"description":"Whether the domain's mail is reaching spam traps: addresses that exist only\nto catch senders mailing lists they should not be mailing.\n\nZero hits is a measured zero and a good result, so the totals read as real\nfigures rather than as an empty state. The kind of trap matters more than\nthe count: pristine hits point at harvested or guessed addresses, while\nrecycled hits point at stale list data.\n","unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/EmailInboxInsightsEnvelope"},{"type":"object","required":["total","by_type","by_source","hit_rows"],"properties":{"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Trap hits observed over the period, across every trap network. The authoritative count: `hit_rows` holds a sample of the rows behind it.\n","example":3},"delta":{"type":"integer","readOnly":true,"description":"How the hit count moved against the prior period, as a change in the number of hits rather than in percentage points. Negative is an improvement. Present only when the request asked for a comparison and the prior period had data; absence is not zero change.\n","example":-2},"by_type":{"type":"array","readOnly":true,"description":"Hits split by kind, one entry per kind the trap network reported. Read counts from here rather than assuming a fixed set of kinds: the set can grow, and an entry that is absent was not reported rather than being a measured zero. These sum to `total`.\n","items":{"$ref":"#/components/schemas/EmailInboxInsightsSpamTrapTypeCount"}},"by_source":{"type":"array","readOnly":true,"description":"Hits split by the trap network that observed them.","items":{"$ref":"#/components/schemas/EmailInboxInsightsSpamTrapSourceCount"}},"hit_rows":{"$ref":"#/components/schemas/EmailInboxInsightsSpamTrapHits","readOnly":true}}}]},"EmailInboxInsightsBlocklistListing":{"type":"object","additionalProperties":false,"description":"One listing of a target on one blocklist.","required":["provider","is_active","reason_code","reason","first_detected","last_detected"],"properties":{"is_active":{"type":"boolean","readOnly":true,"description":"Whether this listing is in force now. A false entry is history: it shows the target was listed and has since cleared, which is why the target's `is_listed` can be false while listings are present.\n","example":false},"reason_code":{"type":["string","null"],"readOnly":true,"description":"The provider's own short code for the listing reason, or null when it gives none. Stable where the prose in `reason` is not, so branch on this and display that.\n","example":"CSS"},"provider":{"type":"string","minLength":1,"readOnly":true,"description":"The blocklist that carries the listing. Providers publishing several lists are reported per list rather than under one combined name, because what a listing means and how it is cleared differ per list.\n","example":"Spamhaus CSS"},"reason":{"type":["string","null"],"readOnly":true,"description":"The reason the provider gives for the listing, or null when it publishes none.","example":"Automated listing of a suspected snowshoe range"},"first_detected":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When this listing was first observed.","example":"2026-07-31T00:00:00Z"},"last_detected":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this listing was most recently observed, or null while the listing is still in force. A provider records a last sighting only once one exists, so a null here reads as \"still listed\" rather than \"never seen\".\n","example":"2026-08-04T00:00:00Z"}}},"EmailInboxInsightsBlocklistTarget":{"type":"object","additionalProperties":false,"description":"One target lookup result, its current status, and the listings seen against it.\n\nRead `status` before `is_listed`. Each target is looked up independently and\nany one of them can fail while the rest succeed, so a target whose status is\nnot `ok` was not checked and `is_listed: false` on it means nothing. Rendering\nthat as \"clear\" is the one outcome this resource must never produce.\n","required":["target","target_type","is_listed","status","checked_at","listings"],"properties":{"target":{"type":"string","minLength":1,"readOnly":true,"description":"The sending IP or domain selected for lookup.","example":"147.253.40.18"},"target_type":{"type":["string","null"],"minLength":1,"readOnly":true,"description":"Whether this target is an IP address or a hostname. Null when the measurement did not report a kind for it, which is possible on a target whose check did not complete.\n","x-extensible-enum":["ip","domain"],"example":"ip"},"is_listed":{"type":"boolean","readOnly":true,"description":"Whether the target is on at least one blocklist right now. Meaningful only when `status` is `ok`: on any other status this target was not checked, so the value carries no finding either way.\n","example":false},"status":{"$ref":"#/components/schemas/EmailInboxInsightsSectionStatus","readOnly":true,"description":"Whether this target was actually checked. `unavailable` means the lookup failed or timed out for this target while others may have succeeded, so the honest rendering is \"could not check\" rather than a result.\n"},"checked_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this target was looked up, or null when it was not. Per target rather than per response, because each is a separate live lookup.\n","example":"2026-08-20T09:12:04Z"},"listings":{"type":"array","readOnly":true,"description":"Listings seen against this target, including ones that have since cleared, so a recent history is visible even when nothing is active. Read each listing's `is_active` rather than assuming every entry is current.\n","items":{"$ref":"#/components/schemas/EmailInboxInsightsBlocklistListing"}}}},"EmailInboxInsightsBlocklists":{"description":"Whether the domain's sending infrastructure is on any blocklist, checked\nwhen the request is made.\n\nThis is a live lookup rather than a measurement over a period, so it carries\nno window: `freshness.as_of` is null and only the lag hint applies.\n\nInspect each returned target's `status` before `is_listed`. A target whose\nlookup did not complete can report `is_listed: false`; that value carries no\nfinding. Partial failures are represented by the individual target statuses.\n\n`active_count` is null when the lookup service supplies no count. Zero reports\nno active target listings, but does not establish coverage: the response can\ncontain an empty `targets` array. Use the returned targets and their statuses\nto determine which addresses were checked. A failed request provides no\nlookup result.\n","unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/EmailInboxInsightsEnvelopeBase"},{"type":"object","required":["active_count","targets"],"properties":{"active_count":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"Number of successfully checked targets reported with an active listing. A target on three blocklists counts once. Null when the lookup service supplies no count; do not treat null as zero. Zero does not establish that the domain or its IPs were checked. Inspect `targets` and each target's `status` for lookup coverage, including partial failures.\n","example":0},"targets":{"type":"array","readOnly":true,"description":"Returned sending IP or domain lookup results, including failed lookups. An empty array does not establish that the domain or its IPs are clear.","items":{"$ref":"#/components/schemas/EmailInboxInsightsBlocklistTarget"}}}}]},"EmailInboxInsightsIndustry":{"type":"object","additionalProperties":false,"description":"The industry a sending domain was classified into.","required":["id","name"],"properties":{"id":{"type":"string","minLength":1,"readOnly":true,"description":"The measurement's own identifier for this industry, carried through so a client can tell two cohorts apart without comparing labels. No operation accepts it.\n","example":"44"},"name":{"type":"string","minLength":1,"readOnly":true,"description":"Display name of the industry. The classification is broad, so bind this label rather than assuming a finer category exists.\n","example":"Apparel"}}},"EmailInboxInsightsIndustryBenchmark":{"description":"How senders in a domain's industry place, as a median across the industry's\nmeasured senders.\n\nThe benchmark describes the industry, not the domain, so it carries no\ncomparison of its own: compute that against the domain's own placement rate.\nIts weighting is a general default rather than any one account's audience\nmix, which is a deliberate asymmetry with the placement figure it is\ncompared against.\n\nThe status is `no_data` when too few measured senders share the industry for\na median to be meaningful, when the domain's industry is not classified, or\nbefore the industry figures have been computed. Handle that state from the\nstart: it is the normal state for a young industry cohort rather than an\nedge case.\n","unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/EmailInboxInsightsEnvelopeBase"},{"type":"object","required":["industry","median_inbox_rate_percent","cohort_size","status"],"properties":{"industry":{"oneOf":[{"$ref":"#/components/schemas/EmailInboxInsightsIndustry"},{"type":"null"}],"readOnly":true,"description":"The cohort the median describes, or null when the domain is not classified into an industry. This description already names that as a `no_data` cause and a normal state for a young cohort, so it needs a representation: without one the only way to report an unclassified domain is a cohort with a blank name.\n"},"median_inbox_rate_percent":{"type":["number","null"],"readOnly":true,"description":"The industry's median inbox rate, as a percentage.","example":92.1},"window_days":{"type":"integer","minimum":1,"readOnly":true,"description":"How many days the cohort figure covers. Reported rather than assumed because the period is the one the nightly computation produced, not one the caller chose, so a label built from a requested window would be wrong. Absent when the computation does not report it, in which case a label must not name a period at all.\n","example":30},"cohort_size":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"How many measured senders the median was computed across.","example":214},"status":{"$ref":"#/components/schemas/EmailInboxInsightsSectionStatus","readOnly":true}}}]},"EmailInboxInsightsSeedListType":{"type":"string","minLength":1,"description":"Which pool of seed addresses a test uses. Which pools an account can use depends on what has been provisioned for it, so read the usable set from the seed-test options rather than assuming these are the only values.\n","x-extensible-enum":["private","public","exclusive"],"example":"private"},"EmailInboxInsightsSeedEngagementProfile":{"type":"string","minLength":1,"description":"Which engagement behaviour the seed addresses simulate. `all` mixes engaged and dormant seeds, which is what makes an engagement split measurable; single-cohort profiles exist too, and the usable set comes from the seed-test options rather than from this list.\n","x-extensible-enum":["all","engaging","non_engaging"],"example":"all"},"AutomaticSeedingSettings":{"type":"object","additionalProperties":false,"required":["enabled","revision"],"description":"Workspace automatic seeding settings. Before setup, revision is zero and the trigger address is absent. Unset list type, engagement profile and regions are omitted. Saved preferences are not checked against available seed-test options.","properties":{"revision":{"type":"integer","format":"int64","minimum":0,"description":"Current settings revision. Supply it when updating settings. Initialize settings before rotating the trigger address."},"trigger_address":{"type":"string","format":"email","maxLength":254,"description":"Workspace trigger address for seeding examples. Absent before the first settings update. Using it requires authenticated sending access to this workspace; the address itself grants no access."},"enabled":{"type":"boolean","description":"Saved automatic-seeding preference."},"list_type":{"$ref":"#/components/schemas/EmailInboxInsightsSeedListType","maxLength":100},"engagement_profile":{"$ref":"#/components/schemas/EmailInboxInsightsSeedEngagementProfile","maxLength":100},"regions":{"type":"array","maxItems":100,"uniqueItems":true,"description":"Saved regions to place seeds in, as `regions[].value` names from `GET /v1/email/inbox-insights/seed-tests/configuration`. They are not checked against that list when saved.","items":{"type":"string","minLength":1,"maxLength":100}}},"example":{"revision":3,"trigger_address":"4f9a2c7e1b8d4a60935ce7f2b1d0a8c3@seeds.bird.com","enabled":true,"list_type":"private","engagement_profile":"all","regions":["North America - US"]}},"AutomaticSeedingSettingsUpdate":{"type":"object","additionalProperties":false,"required":["expected_revision","enabled"],"description":"Replace automatic seeding settings. Omitted selections clear the saved values. Enabling requires a list type, engagement profile and at least one region. Preferences are not checked against available seed-test options. A stale revision returns a conflict without changing settings.","properties":{"expected_revision":{"type":"integer","format":"int64","minimum":0,"example":0,"description":"Revision from the latest settings read, or zero for initial setup."},"enabled":{"type":"boolean","example":false,"description":"Saved automatic-seeding preference."},"list_type":{"$ref":"#/components/schemas/EmailInboxInsightsSeedListType","maxLength":100},"engagement_profile":{"$ref":"#/components/schemas/EmailInboxInsightsSeedEngagementProfile","maxLength":100},"regions":{"type":"array","maxItems":100,"uniqueItems":true,"description":"Regions to place seeds in. Use `regions[].value` exactly as returned by `GET /v1/email/inbox-insights/seed-tests/configuration` for the sending domain your examples come from. Whitespace-only names are rejected, but names are not checked against that list when saved; a name it does not offer makes a later run end with `selection_unavailable`.","items":{"type":"string","minLength":1,"maxLength":100}}}},"AutomaticSeedingRotate":{"type":"object","additionalProperties":false,"required":["expected_revision"],"description":"Rotate the trigger address once at the supplied settings revision. Settings must have been initialized by a successful settings update; rotation before setup returns 404. A stale revision returns 409 without rotating again.","properties":{"expected_revision":{"type":"integer","format":"int64","minimum":0,"example":1,"description":"Revision from the latest settings read after initial setup. Revision zero from an unconfigured workspace cannot be used to rotate an address."}}},"AutomaticSeedingRunSort":{"type":"string","enum":["created_at"],"default":"created_at","description":"Automatic seeding run ordering field."},"AutomaticSeedingSourceKind":{"type":"string","description":"Origin of the source: `api` is an immediate API submission; `smtp` is an immediate SMTP submission; `scheduled` is an API-scheduled email; `broadcast` is a broadcast. This identifies origin regardless of capture outcome or run creation, including skipped unsupported broadcasts. Scheduled examples can be captured only when due. SMTP submissions cannot be scheduled.","enum":["api","smtp","scheduled","broadcast"]},"AutomaticSeedingRunState":{"type":"string","enum":["pending","registering","registration_uncertain","ready","dispatching","dispatch_complete","stopped","failed"],"description":"Execution state, separate from delivery and inbox placement:\n- `pending`: the run is recorded and registration has not started.\n- `registering`: registration is in progress. A stop request can coexist with an in-flight registration.\n- `registration_uncertain`: the registration result is unknown. Registration is not automatically repeated, and uncertainty remains visible after a stop.\n- `ready`: registration has produced a retained seed plan; dispatch scheduling has not started.\n- `dispatching`: the scheduler is admitting planned copies or recovering earlier handoffs.\n- `dispatch_complete`: scheduler work is acknowledged. Uncertain admission and pending delivery can remain.\n- `stopped`: new admissions are closed by a stop request, settings or trigger changes, or the dispatch deadline. Already granted copies may still send.\n- `failed`: registration failed or the source control was refused. New admissions cannot proceed; retained progress describes any copies already granted.\nInspect progress and stop_requested_at alongside this state. A terminal run state does not recall previously granted or queued copies.\n"},"AutomaticSeedingRunID":{"type":"string","minLength":1,"pattern":"^esrun_[0-9a-hjkmnp-tv-z]{26}$","example":"esrun_01krdgeqcxet5s7t44vh8rt9mg"},"AutomaticSeedingEmailSourceKind":{"type":"string","enum":["api","smtp","scheduled"],"description":"Original source kind for this reference."},"AutomaticSeedingEmailSource":{"type":"object","additionalProperties":false,"required":["kind","email_id"],"properties":{"kind":{"$ref":"#/components/schemas/AutomaticSeedingEmailSourceKind"},"email_id":{"$ref":"#/components/schemas/EmailID"}}},"AutomaticSeedingBroadcastSourceKind":{"type":"string","enum":["broadcast"],"description":"Original source kind for this reference."},"AutomaticSeedingBroadcastSource":{"type":"object","additionalProperties":false,"required":["kind","broadcast_id"],"properties":{"kind":{"$ref":"#/components/schemas/AutomaticSeedingBroadcastSourceKind"},"broadcast_id":{"$ref":"#/components/schemas/EmailBroadcastID"}}},"AutomaticSeedingSource":{"description":"Original customer source. This never identifies a generated seed copy. Scheduled means an API-scheduled email.","oneOf":[{"$ref":"#/components/schemas/AutomaticSeedingEmailSource"},{"$ref":"#/components/schemas/AutomaticSeedingBroadcastSource"}]},"AutomaticSeedingTriggerLabel":{"type":"string","description":"Label from a trigger address, such as `spring-launch` in `<token>+spring-launch@...`. It is a display name and selects nothing.","minLength":1,"maxLength":32,"pattern":"^[a-z0-9_-]+$"},"AutomaticSeedingProgress":{"type":"object","additionalProperties":false,"required":["planned","admitted","provider_accepted","delivered","failed","not_sent","unknown","pending"],"properties":{"planned":{"type":"integer","format":"int64","minimum":0,"description":"Number of retained planned copies."},"admitted":{"type":"integer","format":"int64","minimum":0,"description":"Copies admitted to Bird email processing. Independent milestone; not provider acceptance."},"provider_accepted":{"type":"integer","format":"int64","minimum":0,"description":"Copies explicitly accepted by the sending provider. Independent milestone; not delivery or placement."},"delivered":{"type":"integer","format":"int64","minimum":0,"description":"Copies with receiving-server delivery or complaint evidence. Does not establish inbox placement."},"failed":{"type":"integer","format":"int64","minimum":0,"description":"Copies with terminal bounce, rejection or block evidence."},"not_sent":{"type":"integer","format":"int64","minimum":0,"description":"Copies refused or canceled before sending, including ungranted copies after a run fence."},"unknown":{"type":"integer","format":"int64","minimum":0,"description":"Copies with unresolved admission or provider outcome uncertainty."},"pending":{"type":"integer","format":"int64","minimum":0,"description":"Remaining copies awaiting admission or a delivery outcome."}},"description":"Delivered, failed, not_sent, unknown and pending partition planned copies. Admitted and provider_accepted overlap those buckets and must not be added to them. Late outcomes can move a copy between buckets."},"AutomaticSeedingReason":{"type":"string","minLength":1,"x-extensible-enum":["registration_rejected","allowance_exhausted","selection_unavailable","sending_domain_not_measured","vendor_outcome_unknown","invalid_registration_response","canceled_or_expired","run_stopped","settings_disabled","trigger_rotated","dispatch_deadline_exceeded","control_rejected","source_stopped","conflicting_examples","unsupported_source","mixed_recipients","invalid_trigger","seeding_unavailable","contact_template_unsupported","source_not_authorized","content_blocked","capture_expired","capture_failed","preparation_unavailable","policy_refused","unavailable","bounced","rejected","blocked","canceled","provider_outcome_unknown","admission_uncertain","admission_refused"],"description":"A reason for a run or source outcome, or a seed-copy delivery or admission outcome.\n\n- `registration_rejected` means the seed-list registration was refused; no seed plan was created.\n- `allowance_exhausted` means the organization's seed-test allowance for this billing period was used up before registration; no seed plan was created.\n- `selection_unavailable` means the saved seed-list type, engagement profile or region is no longer offered for the sending domain; no seed plan was created.\n- `sending_domain_not_measured` means Inbox Insights is not measuring the example's sending domain; no seed plan was created.\n- `vendor_outcome_unknown` means the seed-list registration result is unknown; automatic registration retries are stopped and investigation is required.\n- `invalid_registration_response` means the returned seed list could not be used; no copies will be sent from that response.\n- `canceled_or_expired` means new seed admissions stopped because the run was canceled or its eligibility expired.\n- `run_stopped` means a stop request ended future seed admissions; already granted copies may still send.\n- `settings_disabled` means automatic seeding was disabled before the copy was granted.\n- `trigger_rotated` means the run's cancellation generation changed before the copy was granted, either through trigger rotation or disabling seeding. Re-enabling does not advance the generation or undo that fence. This code alone does not establish that the trigger address changed.\n- `dispatch_deadline_exceeded` means the deadline for admitting this copy passed.\n- `control_rejected` means the trigger message was rejected.\n- `source_stopped` means the original source no longer authorizes seed sending.\n- `conflicting_examples` means the source contained conflicting examples, so none was selected.\n- `unsupported_source` means capture is unavailable for this source type.\n- `mixed_recipients` means the original message did not have exactly one recipient consisting of the trigger address.\n- `invalid_trigger` means the trigger address was invalid or no longer valid for this workspace.\n- `seeding_unavailable` means automatic-seeding capture was unavailable for this source.\n- `contact_template_unsupported` means the source template uses contact values that this capture path cannot freeze.\n- `source_not_authorized` means the source failed sending authorization during capture or registration.\n- `content_blocked` means the source content was rejected before capture.\n- `capture_expired` means the example capture deadline passed.\n- `capture_failed` means the example could not be captured.\n- `preparation_unavailable` means the frozen example could not be used for registration or preparation of a seed copy.\n- `policy_refused` means the seed copy failed sending-policy checks.\n- `unavailable` means a more specific reason cannot be shown.\n- `bounced` means the seed copy received a bounce outcome.\n- `rejected` means the seed copy received a rejection outcome.\n- `blocked` means the seed copy was blocked from sending.\n- `canceled` means the seed copy was canceled before sending.\n- `provider_outcome_unknown` means a provider submission may have occurred, but its result is unknown; the copy is not automatically resent.\n- `admission_uncertain` means the seed copy may have entered sending, but admission is unconfirmed; it is not automatically admitted again.\n- `admission_refused` means the seed copy was refused before entering sending.\n"},"AutomaticSeedingIssue":{"type":"object","additionalProperties":false,"required":["code","count"],"properties":{"code":{"$ref":"#/components/schemas/AutomaticSeedingReason","description":"A reason or delivery status affecting these copies. Unrecognized persisted reasons become unavailable."},"count":{"type":"integer","format":"int64","minimum":1}}},"AutomaticSeedingRun":{"description":"Retained run metadata. `created_at` records run intent creation; `updated_at` records run metadata changes, not every delivery outcome. `label` is omitted when the trigger address carried none.","unevaluatedProperties":false,"allOf":[{"type":"object","required":["id","state","source","source_created_at","retain_until","progress","issues"],"properties":{"id":{"$ref":"#/components/schemas/AutomaticSeedingRunID"},"state":{"$ref":"#/components/schemas/AutomaticSeedingRunState"},"source":{"$ref":"#/components/schemas/AutomaticSeedingSource"},"label":{"$ref":"#/components/schemas/AutomaticSeedingTriggerLabel"},"source_created_at":{"type":"string","format":"date-time","description":"Original source execution time.","minLength":1},"retain_until":{"type":"string","format":"date-time","description":"Time after which this run is no longer available.","minLength":1},"progress":{"$ref":"#/components/schemas/AutomaticSeedingProgress"},"sending_domain":{"type":"string","description":"Present after registration establishes the sending domain."},"list_type":{"$ref":"#/components/schemas/EmailInboxInsightsSeedListType","maxLength":100,"description":"List type frozen at run admission."},"engagement_profile":{"$ref":"#/components/schemas/EmailInboxInsightsSeedEngagementProfile","maxLength":100,"description":"Engagement profile frozen at run admission."},"regions":{"type":"array","maxItems":100,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":100},"description":"Regions frozen at run admission."},"registration_started_at":{"type":"string","format":"date-time","description":"Registration admission time."},"registration_finished_at":{"type":"string","format":"date-time","description":"Time the registration response was persisted."},"dispatch_deadline":{"type":"string","format":"date-time","description":"Fixed deadline for new seed admissions."},"dispatch_finished_at":{"type":"string","format":"date-time","description":"Time scheduler work completed; uncertain admission or delivery may remain."},"stop_requested_at":{"type":"string","format":"date-time","description":"First durable stop, whether requested explicitly or imposed automatically. Already granted copies may still send."},"reason":{"$ref":"#/components/schemas/AutomaticSeedingReason","description":"Sanitized reason code. Unknown stored details become unavailable; provider error text is never returned."},"issues":{"type":"array","description":"Counts of sanitized terminal or uncertain copy outcomes. No seed addresses or provider error text. Counts overlap the progress buckets.","items":{"$ref":"#/components/schemas/AutomaticSeedingIssue"}}}},{"$ref":"#/components/schemas/Timestamps"}],"example":{"id":"esrun_01krdgeqcxet5s7t44vh8rt9mg","state":"dispatch_complete","source":{"kind":"api","email_id":"em_01krdgeqcxet5s7t44vh8rt9mg"},"label":"spring-launch","source_created_at":"2026-05-20T09:14:52Z","retain_until":"2027-06-19T09:14:52Z","progress":{"planned":48,"admitted":48,"provider_accepted":48,"delivered":46,"failed":1,"not_sent":0,"unknown":0,"pending":1},"sending_domain":"mail.example.com","list_type":"private","engagement_profile":"all","regions":["North America - US"],"registration_started_at":"2026-05-20T09:14:55Z","registration_finished_at":"2026-05-20T09:15:02Z","dispatch_deadline":"2026-05-20T10:14:52Z","dispatch_finished_at":"2026-05-20T09:31:10Z","issues":[{"code":"bounced","count":1}],"created_at":"2026-05-20T09:14:53Z","updated_at":"2026-05-20T09:31:10Z"}},"AutomaticSeedingRunList":{"unevaluatedProperties":false,"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AutomaticSeedingRun"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"AutomaticSeedingSourceSort":{"type":"string","enum":["created_at"],"default":"created_at","description":"Automatic seeding source ordering field."},"AutomaticSeedingSourceState":{"type":"string","enum":["scheduled","capturing","captured","skipped","stopped","failed"],"description":"State of the source example, separate from the run's sending progress:\n- `scheduled`: the API-scheduled source is waiting for its due time; capture has not started.\n- `capturing`: capture is in progress and can already have an associated run.\n- `captured`: immutable example content was committed for a run; this does not mean seeds were sent.\n- `skipped`: the source did not complete eligible capture. The reason explains the refusal; a run can exist if refusal occurred after admission.\n- `stopped`: the scheduled source was canceled; capture will not continue.\n- `failed`: the scheduled source failed; capture will not continue.\nSource observations can exist without a run. run_id is present only while an associated run is retained.\n"},"AutomaticSeedingSourceObservation":{"description":"Retained capture observation. `created_at` records observation creation; `updated_at` records the last capture observation change. `label` is omitted when the trigger address carried none.","unevaluatedProperties":false,"allOf":[{"type":"object","required":["source","source_created_at","retain_until","state"],"properties":{"source":{"$ref":"#/components/schemas/AutomaticSeedingSource"},"source_created_at":{"type":"string","format":"date-time","description":"Original source execution time.","minLength":1},"retain_until":{"type":"string","format":"date-time","description":"Time after which the observation is unavailable.","minLength":1},"state":{"$ref":"#/components/schemas/AutomaticSeedingSourceState"},"reason":{"$ref":"#/components/schemas/AutomaticSeedingReason","description":"Sanitized capture reason; absent for a successful or pending observation."},"run_id":{"$ref":"#/components/schemas/AutomaticSeedingRunID"},"label":{"$ref":"#/components/schemas/AutomaticSeedingTriggerLabel"}}},{"$ref":"#/components/schemas/Timestamps"}],"example":{"source":{"kind":"api","email_id":"em_01krdgeqcxet5s7t44vh8rt9mg"},"source_created_at":"2026-05-20T09:14:52Z","retain_until":"2027-06-19T09:14:52Z","state":"captured","run_id":"esrun_01krdgeqcxet5s7t44vh8rt9mg","label":"spring-launch","created_at":"2026-05-20T09:14:53Z","updated_at":"2026-05-20T09:14:58Z"}},"AutomaticSeedingSourceList":{"unevaluatedProperties":false,"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AutomaticSeedingSourceObservation"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"EmailInboxInsightsSeedTestSummary":{"type":"object","description":"The fields every view of a seed test carries.\n\nThere is no status field. The measurement reports none for a test it has\nalready run, and nothing else on the surface stands in for one, so a test\nthat is still waiting for its send says so by having no subject and no\ntested-at date rather than by being labelled.\n","required":["test_id","subject","tested_at","list_type","engagement_profile","seed_count","inbox_rate_percent"],"properties":{"test_id":{"type":"string","minLength":1,"readOnly":true,"description":"The test's identifier. It is a string and needs to stay one: the values are long enough that any language storing every number as a floating point value will round them, and a rounded identifier matches no test.\n","example":"91901"},"subject":{"type":["string","null"],"readOnly":true,"description":"Subject line of the tested send, or null before the send goes out. With `tested_at`, this is what distinguishes a test that has run from one still waiting for its send.\n","example":"Fall Preview, first look"},"tested_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the tested send went out, or null while the test is still awaiting it.","example":"2026-08-13T09:12:00Z"},"list_type":{"oneOf":[{"$ref":"#/components/schemas/EmailInboxInsightsSeedListType"},{"type":"null"}],"readOnly":true,"description":"The seed pool the test used, or null on a test that predates the recording of it.\n"},"engagement_profile":{"oneOf":[{"$ref":"#/components/schemas/EmailInboxInsightsSeedEngagementProfile"},{"type":"null"}],"readOnly":true,"description":"The engagement behaviour the seeds simulated, or null on a test that predates the recording of it.\n"},"seed_count":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"How many seed addresses the test used.","example":212},"inbox_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of the test's seed addresses that received the message in the inbox, as a percentage. Null until results arrive.\n","example":89.2}}},"EmailInboxInsightsSeedTestRow":{"description":"One seed test as it appears in the history list.","unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/EmailInboxInsightsSeedTestSummary"},{"type":"object","required":["domain","regions","delta_pts_vs_prior"],"properties":{"domain":{"type":"string","minLength":1,"readOnly":true,"description":"The sending domain the test was run for.","example":"mail.acme.com"},"regions":{"type":["array","null"],"readOnly":true,"description":"The regions the test placed seeds in, as the seed-test options name them. Null on a test that predates registration, whose regions were never recorded (the same unknown `list_type` and `engagement_profile` carry), and not an empty list, which would claim a test placed seeds in no region at all.\n","items":{"type":"string","minLength":1},"example":["North America - US","Europe - UK"]},"delta_pts_vs_prior":{"type":["number","null"],"readOnly":true,"description":"How this test's inbox rate compares with the previous test for the same domain, in percentage points. Null when there is no earlier test to compare against.\n","example":-3.1}}}]},"EmailInboxInsightsSeedTestList":{"type":"object","additionalProperties":false,"description":"The domain's seed tests over the period, newest first, up to 100 of them. The list is capped rather than paged, so `truncated` says whether older tests in the period were left out.\n","required":["items","truncated","status"],"properties":{"items":{"type":"array","readOnly":true,"description":"One row per seed test, newest first.","items":{"$ref":"#/components/schemas/EmailInboxInsightsSeedTestRow"}},"truncated":{"type":"boolean","readOnly":true,"description":"True when the period holds more than the 100 tests returned, so the list is the newest of them rather than all of them. Request an earlier period to reach the tests left out.\n","example":false},"status":{"$ref":"#/components/schemas/EmailInboxInsightsSectionStatus","readOnly":true}}},"EmailInboxInsightsGmailCategory":{"type":"object","additionalProperties":false,"description":"Which Gmail tab the test's Gmail seeds mostly landed under.","required":["category","share_percent"],"properties":{"category":{"$ref":"#/components/schemas/EmailInboxInsightsGmailTab","readOnly":true,"description":"The tab the test's Gmail seeds mostly landed under."},"share_percent":{"type":["number","null"],"readOnly":true,"description":"Share of the test's Gmail seeds that landed under this tab, as a percentage.","example":61}}},"EmailInboxInsightsSeedTestProvider":{"type":"object","additionalProperties":false,"description":"How one mailbox provider treated the test, with the seed counts behind the rates. Seed counts are small by nature, so a single seed moves a rate noticeably.\n","required":["mailbox_provider","inbox_rate_percent","spam_rate_percent","inbox_seeds","spam_seeds","total_seeds"],"properties":{"mailbox_provider":{"$ref":"#/components/schemas/EmailInboxInsightsMailboxProvider","readOnly":true,"description":"The provider whose treatment of the test this row describes."},"inbox_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of this provider's seeds that received the message in the inbox, as a percentage.","example":95},"spam_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of this provider's seeds that received the message in spam, as a percentage.","example":5},"inbox_seeds":{"type":"integer","minimum":0,"readOnly":true,"description":"Seed addresses at this provider that received the message in the inbox.","example":61},"spam_seeds":{"type":"integer","minimum":0,"readOnly":true,"description":"Seed addresses at this provider that received the message in spam.","example":3},"total_seeds":{"type":"integer","minimum":0,"readOnly":true,"description":"Seed addresses at this provider included in the test.","example":64},"gmail_category":{"$ref":"#/components/schemas/EmailInboxInsightsGmailCategory","readOnly":true,"description":"Which Gmail tab the seeds landed under. Present only on the Gmail row, since no other provider sorts mail into tabs.\n"}}},"EmailInboxInsightsSeedTestProviders":{"type":"object","additionalProperties":false,"description":"The per-provider grid for one seed test.","required":["items","status"],"properties":{"items":{"type":"array","readOnly":true,"description":"One row per mailbox provider the test placed seeds at.","items":{"$ref":"#/components/schemas/EmailInboxInsightsSeedTestProvider"}},"status":{"$ref":"#/components/schemas/EmailInboxInsightsSectionStatus","readOnly":true}}},"EmailInboxInsightsSeedTestAuth":{"type":"object","additionalProperties":false,"description":"How the tested send authenticated, measured on the seed mail itself rather than on reporting from receivers.\n","required":["spf_pass_rate_percent","dkim_pass_rate_percent","dmarc_aligned_rate_percent","status"],"properties":{"spf_pass_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of the test's seed mail that passed SPF, as a percentage.","example":100},"dkim_pass_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of the test's seed mail that passed DKIM, as a percentage.","example":100},"dmarc_aligned_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Share of the test's seed mail that passed DMARC alignment, as a percentage.","example":100},"status":{"$ref":"#/components/schemas/EmailInboxInsightsSectionStatus","readOnly":true}}},"EmailInboxInsightsSeedEngagementSplitRow":{"type":"object","additionalProperties":false,"description":"How one provider treated engaged seeds against dormant ones. A gap means the provider is sorting the same mail differently by how the recipient behaves.\n","required":["mailbox_provider","engaged_inbox_rate_percent","dormant_inbox_rate_percent","gap_pts","engaged_seeds","dormant_seeds"],"properties":{"mailbox_provider":{"$ref":"#/components/schemas/EmailInboxInsightsMailboxProvider","readOnly":true,"description":"The provider whose treatment of engaged and dormant seeds this row compares."},"engaged_inbox_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Inbox rate across seeds simulating engaged recipients, as a percentage.","example":96},"dormant_inbox_rate_percent":{"type":["number","null"],"readOnly":true,"description":"Inbox rate across seeds simulating dormant recipients, as a percentage.","example":71},"gap_pts":{"type":["number","null"],"readOnly":true,"description":"Engaged inbox rate minus dormant inbox rate, in percentage points. The value can be negative, which means dormant seeds placed better, and is reported as measured rather than floored at zero.\n","example":25},"engaged_seeds":{"type":"integer","minimum":0,"readOnly":true,"description":"Seeds simulating engaged recipients at this provider.","example":32},"dormant_seeds":{"type":"integer","minimum":0,"readOnly":true,"description":"Seeds simulating dormant recipients at this provider.","example":32}}},"EmailInboxInsightsSeedEngagementSplit":{"type":"object","additionalProperties":false,"description":"Engaged against dormant placement, per provider. The status is `not_applicable` for a test run with a single-cohort engagement profile, where there is no second group to compare: hide the comparison rather than showing a zero gap.\n","required":["items","status"],"properties":{"items":{"type":"array","readOnly":true,"description":"One row per provider where both cohorts placed seeds.","items":{"$ref":"#/components/schemas/EmailInboxInsightsSeedEngagementSplitRow"}},"status":{"$ref":"#/components/schemas/EmailInboxInsightsSectionStatus","readOnly":true}}},"EmailInboxInsightsSeedTestDetail":{"type":"object","description":"One seed test with its full results.","allOf":[{"$ref":"#/components/schemas/EmailInboxInsightsSeedTestSummary"},{"type":"object","required":["providers","auth","engagement_split"],"properties":{"providers":{"$ref":"#/components/schemas/EmailInboxInsightsSeedTestProviders"},"auth":{"$ref":"#/components/schemas/EmailInboxInsightsSeedTestAuth"},"engagement_split":{"$ref":"#/components/schemas/EmailInboxInsightsSeedEngagementSplit"}}}]},"EmailInboxInsightsSeedTestQuota":{"type":"object","additionalProperties":false,"description":"The organization's seed-test allowance for the current billing period. Registering a test spends one of the allowance whether or not its send goes out, and a test that expires unused does not return it. Uncertain registrations can retain allowance.\n","required":["used","limit","resets_at"],"properties":{"used":{"type":"integer","minimum":0,"readOnly":true,"description":"Allowance used in the current billing period, including retained uncertain registrations. When `limit` is null, usage is not tracked and this field is zero.\n","example":112},"limit":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"Seed tests included in the billing period, or null when no cap applies to this organization.\n","example":300},"resets_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the billing-period allowance next resets.","example":"2026-09-01T00:00:00Z"}}},"EmailInboxInsightsSeedTests":{"description":"The domain's seed tests over the period, with the newest test's full results\nand the organization's billing-period allowance.\n\nA seed test sends to a panel of real mailboxes across many providers and\nreports exactly where each copy landed, which is a direct measurement rather\nthan an estimate. Seed counts are small by nature, so a single seed moves a\nrate noticeably.\n","unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/EmailInboxInsightsEnvelope"},{"type":"object","required":["tests","quota"],"properties":{"tests":{"$ref":"#/components/schemas/EmailInboxInsightsSeedTestList"},"latest":{"$ref":"#/components/schemas/EmailInboxInsightsSeedTestDetail","description":"The newest test in the period with its full results, so the summary panels need no second request. Absent when the period holds no tests.\n"},"quota":{"$ref":"#/components/schemas/EmailInboxInsightsSeedTestQuota"}}}]},"EmailInboxInsightsSeedRegions":{"type":"array","minItems":1,"description":"Region names exactly as returned by the seed-test configuration.","items":{"type":"string","minLength":1},"example":["Primary Webmail"]},"EmailInboxInsightsSeedTestCreate":{"type":"object","additionalProperties":false,"description":"How to configure a seed test. The choices available for a domain come from the seed-test configuration.\n","required":["sending_domain","list_type","engagement_profile","regions"],"properties":{"sending_domain":{"type":"string","minLength":1,"description":"The sending domain the test measures: one of the workspace's verified sending domains, exactly as it appears there.\n","example":"mail.acme.com"},"list_type":{"$ref":"#/components/schemas/EmailInboxInsightsSeedListType","description":"Which seed pool to draw addresses from. Use a value the seed-test configuration reports as available for this account.\n"},"engagement_profile":{"$ref":"#/components/schemas/EmailInboxInsightsSeedEngagementProfile","description":"Which engagement behaviour the seeds should simulate. Mixing both behaviours is what makes the engaged-against-dormant comparison measurable.\n"},"regions":{"$ref":"#/components/schemas/EmailInboxInsightsSeedRegions","description":"The regions to place seeds in, as the seed-test configuration names them.","example":["North America - US","Europe - UK"]},"label":{"type":"string","minLength":1,"maxLength":200,"description":"A name attached to this registration. It is not returned in seed-test history.","example":"Fall preview send"}}},"EmailInboxInsightsSeedAddress":{"type":"object","additionalProperties":false,"description":"One seed address to include in the tested send.","required":["address","mailbox_provider","region","engaging"],"properties":{"address":{"type":"string","minLength":1,"readOnly":true,"description":"The address to add to the send's recipients. Include it exactly as given; an altered address is not a seed and will not be measured.\n","example":"sd8241.hk@example-seeds.net"},"mailbox_provider":{"$ref":"#/components/schemas/EmailInboxInsightsMailboxProvider","readOnly":true,"description":"The provider this address is hosted at."},"region":{"type":"string","minLength":1,"readOnly":true,"description":"The region this address sits in, as the seed-test choices name it.","example":"North America - US"},"engaging":{"type":"boolean","readOnly":true,"description":"Whether this address simulates a recipient who engages with mail. There are two behaviours rather than a scale, so a test either mixes both or uses one of them.\n","example":true}}},"EmailInboxInsightsSeedTestRegistration":{"type":"object","additionalProperties":false,"description":"A registered seed test and the addresses it measures.\n\nRegistering a test does not put the addresses into a send. Add them to the\nrecipients of the send you want measured, and the test appears in the\nseed-test list for the domain once its seed mail has been measured.\n\nThere is no status field. The measurement reports none for a seed test at any\npoint, so read the test's own fields instead: a registered test has addresses\nand an expiry date, and it gains a subject and a tested-at date once its send\ngoes out.\n","required":["registration_id","seed_addresses","seed_count","expires_at"],"properties":{"registration_id":{"type":"string","minLength":1,"readOnly":true,"description":"Identifies this registration. It is not the identifier the seed-test list\nreports for the resulting test.\n\nIt is here so a registration can be quoted in a support conversation, and\nso a client can tell two registrations apart. To read the results, find\nthe test in the seed-test list for this domain.\n","example":"43ea66c8-6837-48a4-b81b-26fdf5cc8cd8"},"seed_addresses":{"type":"array","readOnly":true,"description":"Every address to include in the tested send. Copy them into the send's recipients; results are measured from mail these addresses receive.\n","items":{"$ref":"#/components/schemas/EmailInboxInsightsSeedAddress"}},"seed_count":{"type":"integer","minimum":0,"readOnly":true,"description":"How many seed addresses the test issued.","example":212},"expires_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the test expires if no seed mail has arrived. An expired test never produces results, and the allowance it spent is not returned, so send before this time.\n","example":"2026-08-27T09:12:00Z"}}},"EmailInboxInsightsSeedListTypeOption":{"type":"object","additionalProperties":false,"description":"One seed pool a test can be run against, and whether this account can use it.","required":["value","available"],"properties":{"value":{"$ref":"#/components/schemas/EmailInboxInsightsSeedListType","readOnly":true,"description":"The value to send when registering a test against this pool."},"available":{"type":"boolean","readOnly":true,"description":"Whether this pool is provisioned for the account. An unavailable pool is one the account has not been set up for rather than one its plan forbids, and there is no self-serve way to enable one, so leave it out of the choices you offer rather than showing it unpickable.\n","example":true}}},"EmailInboxInsightsSeedRegionOption":{"type":"object","additionalProperties":false,"description":"One region seeds can be placed in.","required":["value"],"properties":{"value":{"type":"string","minLength":1,"readOnly":true,"description":"The value to send when registering a test against this region. Free text rather than an enumeration: the set belongs to the measurement and is wider than the continents it looks like, so send one of these back verbatim rather than composing your own.\n","example":"North America - US"}}},"EmailInboxInsightsSeedEngagementProfileOption":{"type":"object","additionalProperties":false,"description":"One engagement behaviour a test can simulate, and whether this account can use it.","required":["value","available"],"properties":{"value":{"$ref":"#/components/schemas/EmailInboxInsightsSeedEngagementProfile","readOnly":true,"description":"The value to send when registering a test against this behaviour."},"available":{"type":"boolean","readOnly":true,"description":"Whether this behaviour is provisioned for the account. As with the seed pools, an unavailable behaviour is one the account has not been set up for rather than one its plan forbids, so leave it out of the choices you offer rather than showing it unpickable.\n","example":true}}},"EmailInboxInsightsSeedTestConfiguration":{"type":"object","additionalProperties":false,"description":"The choices available when registering a seed test for a domain: which seed\npools the account can use, which regions seeds can be placed in, and which\nengagement behaviours the seeds can simulate.\n\nThis is reference data rather than a measurement, so it carries no period and\nno measurement detail. It changes only when an account's provisioning does.\n","required":["resource","domain","list_types","regions","engagement_profiles"],"properties":{"resource":{"type":"string","minLength":1,"readOnly":true,"description":"Which resource this response is, echoed for self-description.","example":"seed-test-configuration"},"domain":{"type":"string","minLength":1,"readOnly":true,"description":"The sending domain these choices apply to.","example":"mail.acme.com"},"list_types":{"type":"array","readOnly":true,"description":"The seed pools, each flagged with whether the account can use it.","items":{"$ref":"#/components/schemas/EmailInboxInsightsSeedListTypeOption"}},"regions":{"type":"array","readOnly":true,"description":"The regions seeds can be placed in. Objects rather than bare strings, to match the two lists beside it: the measurement reports no availability for a region today, and an object can carry one later without a second array.\n","items":{"$ref":"#/components/schemas/EmailInboxInsightsSeedRegionOption"}},"engagement_profiles":{"type":"array","readOnly":true,"description":"The engagement behaviours the seeds can simulate, each flagged with whether the account can use it.\n","items":{"$ref":"#/components/schemas/EmailInboxInsightsSeedEngagementProfileOption"}}}},"EmailInboxInsightsDomainSort":{"type":"string","minLength":1,"description":"Field used to sort owned domains.","enum":["domain"],"default":"domain","example":"domain"},"EmailInboxInsightsDomain":{"type":"object","additionalProperties":false,"description":"One of the workspace's verified sending domains, and whether Inbox Insights is switched on for it.\n","required":["domain","monitored"],"properties":{"domain":{"type":"string","minLength":1,"readOnly":true,"description":"The sending domain, lowercased, as it appears in your sending domains.","example":"mail.acme.com"},"monitored":{"type":"boolean","readOnly":true,"description":"Whether Inbox Insights reports on this domain. Switching it off stops the reporting and keeps the measurement history, so switching it back on restores the full history rather than starting again.\n","example":true}}},"EmailInboxInsightsDomains":{"description":"A page of sending domains this workspace can report on, and which of them Inbox Insights is switched on for.\n","allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","readOnly":true,"description":"One entry per verified domain in this page, whether or not it is switched on. A domain that has not been verified does not appear, because verification is what proves the domain is yours to report on.\n","items":{"$ref":"#/components/schemas/EmailInboxInsightsDomain"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}],"unevaluatedProperties":false},"EmailInboxInsightsDomainUpdate":{"type":"object","additionalProperties":false,"description":"The Inbox Insights setting to change for a sending domain.","required":["monitored"],"properties":{"monitored":{"type":"boolean","description":"Whether the workspace wants this domain monitored. Enabling enrolls it with eDataSource; disabling removes only the workspace preference and preserves vendor enrollment and measurement history. Verified ownership governs report access.\n","example":true}}},"EmailInboxInsightsDomainMonitoringOutcome":{"type":"string","minLength":1,"description":"What switching on the main sending domain did.\n\n- `enabled`: Inbox Insights is now switched on for the domain named alongside this.\n- `already_on`: at least one domain was already switched on, so nothing changed.\n- `choice_required`: the main sending domain could not be identified, most often\n  because the workspace has several verified domains and no sending to rank them\n  by. Ask the customer to choose.\n- `no_verified_domains`: the workspace has no verified sending domain, so there is\n  nothing to report on until one is verified.\n","enum":["enabled","already_on","choice_required","no_verified_domains"],"example":"enabled"},"EmailInboxInsightsDomainMonitoringResult":{"type":"object","additionalProperties":false,"description":"What switching on the workspace's main sending domain did. There are four outcomes, because each one leaves the customer somewhere different: one domain is now reporting, one already was, we could not tell which domain is the main one, or there is no verified domain to report on at all.\n","required":["outcome","domain"],"properties":{"outcome":{"readOnly":true,"$ref":"#/components/schemas/EmailInboxInsightsDomainMonitoringOutcome"},"domain":{"type":["string","null"],"minLength":1,"readOnly":true,"description":"The sending domain this call switched on, lowercased. The server sends a domain with the `enabled` outcome and null with the other three, `already_on` included: that outcome says only that the workspace had already made its choice, not which domain it chose. Read the domain list for that. Check `outcome` first rather than treating a domain as present.\n","example":"mail.acme.com"}}},"EmailStatsSeriesPeriod":{"type":"object","additionalProperties":false,"description":"The window and bucket grain the response covers, echoed from the request, plus the freshness boundary the data is current to.\n","required":["from","to","grain"],"properties":{"from":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive start of the window. A calendar day (YYYY-MM-DD, in the requested `timezone`) on the day grain. On the hour grain, an RFC 3339 UTC instant marking the start of the first hour bucket, which falls on a local hour boundary when `timezone` is set.","example":"2026-05-01"},"to":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive end of the window. A calendar day (YYYY-MM-DD, in the requested `timezone`) on the day grain. On the hour grain, an RFC 3339 UTC instant marking the start of the last hour bucket, which falls on a local hour boundary when `timezone` is set.","example":"2026-05-31"},"grain":{"$ref":"#/components/schemas/StatsGrain","readOnly":true},"data_as_of":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"The best-effort refresh time of the statistics in this response; when they come from several rollups, it is the oldest of their latest refreshes. Events recorded before roughly this time are usually reflected, while more recent events may not be yet. Statistics are served from rolling aggregations that usually refresh within a minute, so a response can trail the latest events by a minute or more. Use this field to label data freshness rather than assuming the numbers are up to the second. Null when the freshness boundary is not being reported.\n","example":"2026-05-25T14:03:10Z"}}},"EmailStatsResponse":{"type":"object","additionalProperties":false,"description":"Time-series stats payload. `period` echoes the range and bucket grain actually computed against. `data` is one row per bucket in chronological order.\n","required":["period","data"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsSeriesPeriod"},"data":{"type":"array","readOnly":true,"description":"One row per bucket (day or hour, per the grain) in the period, in chronological order. Buckets with no activity are included with zero counts.","items":{"$ref":"#/components/schemas/EmailStatsPoint"}}}},"EmailStatsQueryMetric":{"type":"string","description":"Metric selected for period totals, time buckets, or group ranking. Counts estimate distinct identities; rates are ratios. Latency metrics measure milliseconds from Bird acceptance to processing or delivery.","enum":["sends_accepted","accepted","processed","delivered","bounced","hard_bounced","soft_bounced","admin_bounced","block_bounced","undetermined_bounced","complained","deferred","rejected","oob_bounces","opens","opens_non_prefetched","clicks","unsubscribes","unique_opens","unique_opens_non_prefetched","unique_clicks","confirmed_unique_opens","confirmed_unique_opens_non_prefetched","effective_delivered","all_bounces","delivery_rate","bounce_rate","complaint_rate","deferral_rate","open_rate","click_rate","unsubscribe_rate","oob_rate","processing_p50_ms","processing_p95_ms","processing_p99_ms","total_p50_ms","total_p95_ms","total_p99_ms"]},"EmailStatsQueryDimension":{"type":"string","description":"Group by one recorded event dimension. Omit for a single ungrouped summary with optional series.\nGrouping by `tag` requires `filters.tag.name`.\nMissing values form a null group when the metric supports that dimension. A null value\nmeans the event lacks that attribution; it does not explain how the message was created\nor establish membership in another dimension such as a campaign.\n\nEvery selected metric must support the grouping dimension and every filter dimension.\nUnsupported combinations return validation error `E04074`, even when the workspace has no events.\n\n- `brand_id`, `sending_domain`, `category`, `template_id`, `tag`: all metrics. A null `brand_id` represents historical or unattributed traffic recorded without a Brand and is distinct from the workspace's default Brand.\n- `recipient_domain`, `ip_pool_id`, `broadcast_id`: all metrics except `sends_accepted`.\n- `mailbox_provider`, `mailbox_provider_region`: all metrics except `sends_accepted`, `accepted`, and `rejected`.\n- `sending_ip`: `delivered`, `bounced`, `hard_bounced`, `soft_bounced`, `admin_bounced`, `block_bounced`,\n  `undetermined_bounced`, `deferred`, `oob_bounces`, `effective_delivered`, `all_bounces`, `delivery_rate`,\n  `bounce_rate`, `deferral_rate`, `oob_rate`, `total_p50_ms`, `total_p95_ms`, and `total_p99_ms`.\n- `country`, `region`, `city`, `agent_family`, `os_family`, `device_family`: `opens`, `opens_non_prefetched`,\n  `clicks`, `unique_opens`, `unique_opens_non_prefetched`, `unique_clicks`, `confirmed_unique_opens`,\n  and `confirmed_unique_opens_non_prefetched`.\n- `smtp_error_code`: `bounced`, `hard_bounced`, `soft_bounced`, `admin_bounced`, `block_bounced`, and `undetermined_bounced`.\n- `feedback_type`: `complained`.\n","enum":["brand_id","sending_domain","category","template_id","tag","recipient_domain","mailbox_provider","mailbox_provider_region","sending_ip","ip_pool_id","broadcast_id","country","region","city","agent_family","os_family","device_family","smtp_error_code","feedback_type"]},"EmailStatsQueryGrain":{"type":"string","description":"Time buckets in the requested timezone. Weeks start on Monday; months start on the first day. Half days start at midnight and noon. Edge buckets count events inside the normalized period.","enum":["quarter_hour","hour","half_day","day","week","month"]},"EmailStatsQueryBrandFilter":{"type":"object","additionalProperties":false,"description":"Match recorded Brand IDs using include or exclude. Include values combine with OR; exclusions remove matches. Missing values (`brand_id` null) survive exclude-only predicates. Brand listing is dashboard-only; copy a Brand ID from Brands > More actions > Copy brand ID in the dashboard, or ask the caller for the ID when only a Brand name is known. Supply a nonempty array; at most 20 distinct values across both arrays are accepted after normalization, with no overlap.","properties":{"include":{"type":"array","items":{"$ref":"#/components/schemas/BrandID"}},"exclude":{"type":"array","items":{"$ref":"#/components/schemas/BrandID"}}},"minProperties":1},"EmailStatsQueryStringFilter":{"type":"object","additionalProperties":false,"description":"Match recorded values using include or exclude. Include values combine with OR; exclusions remove matches. Missing values survive exclude-only predicates. Supply a nonempty array; at most 20 distinct values across both arrays are accepted after normalization, with no overlap.","properties":{"include":{"type":"array","items":{"type":"string"}},"exclude":{"type":"array","items":{"type":"string"}}},"minProperties":1,"not":{"properties":{"include":{"maxItems":0},"exclude":{"maxItems":0}}}},"EmailStatsQueryCategoryFilter":{"type":"object","additionalProperties":false,"description":"Match recorded values using include or exclude. Include values combine with OR; exclusions remove matches. Missing values survive exclude-only predicates. Supply a nonempty array; at most 20 distinct values across both arrays are accepted after normalization, with no overlap.","properties":{"include":{"type":"array","items":{"$ref":"#/components/schemas/EmailMessageCategory"}},"exclude":{"type":"array","items":{"$ref":"#/components/schemas/EmailMessageCategory"}}},"minProperties":1},"EmailStatsQueryTemplateFilter":{"type":"object","additionalProperties":false,"description":"Match recorded values using include or exclude. Include values combine with OR; exclusions remove matches. Missing values survive exclude-only predicates. Supply a nonempty array; at most 20 distinct values across both arrays are accepted after normalization, with no overlap.","properties":{"include":{"type":"array","items":{"$ref":"#/components/schemas/EmailTemplateID"}},"exclude":{"type":"array","items":{"$ref":"#/components/schemas/EmailTemplateID"}}},"minProperties":1},"EmailStatsQueryTagFilter":{"type":"object","additionalProperties":false,"description":"Select one case-sensitive tag name. A name without values requires that tag to exist. Exclude-only predicates retain events without that tag. Include and exclude together accept at most 20 distinct normalized values with no overlap.","required":["name"],"properties":{"name":{"type":"string","minLength":1,"example":"campaign"},"include":{"type":"array","items":{"type":"string"}},"exclude":{"type":"array","items":{"type":"string"}}}},"EmailStatsQueryIPPoolFilter":{"type":"object","additionalProperties":false,"description":"Match recorded values using include or exclude. Include values combine with OR; exclusions remove matches. Missing values survive exclude-only predicates. Supply a nonempty array; at most 20 distinct values across both arrays are accepted after normalization, with no overlap.","properties":{"include":{"type":"array","items":{"$ref":"#/components/schemas/IPPoolID"}},"exclude":{"type":"array","items":{"$ref":"#/components/schemas/IPPoolID"}}},"minProperties":1},"EmailStatsQueryBroadcastFilter":{"type":"object","additionalProperties":false,"description":"Match recorded values using include or exclude. Include values combine with OR; exclusions remove matches. Missing values survive exclude-only predicates. Supply a nonempty array; at most 20 distinct values across both arrays are accepted after normalization, with no overlap.","properties":{"include":{"type":"array","items":{"$ref":"#/components/schemas/EmailBroadcastID"}},"exclude":{"type":"array","items":{"$ref":"#/components/schemas/EmailBroadcastID"}}},"minProperties":1},"EmailStatsQueryFilters":{"type":"object","additionalProperties":false,"description":"Predicates on the context recorded for each event. Dimensions combine with AND. Unsupported metric and dimension combinations return 422, including for an empty workspace.","properties":{"brand_id":{"$ref":"#/components/schemas/EmailStatsQueryBrandFilter"},"sending_domain":{"$ref":"#/components/schemas/EmailStatsQueryStringFilter"},"category":{"$ref":"#/components/schemas/EmailStatsQueryCategoryFilter"},"template_id":{"$ref":"#/components/schemas/EmailStatsQueryTemplateFilter"},"tag":{"$ref":"#/components/schemas/EmailStatsQueryTagFilter"},"recipient_domain":{"$ref":"#/components/schemas/EmailStatsQueryStringFilter"},"mailbox_provider":{"$ref":"#/components/schemas/EmailStatsQueryStringFilter"},"mailbox_provider_region":{"$ref":"#/components/schemas/EmailStatsQueryStringFilter"},"sending_ip":{"$ref":"#/components/schemas/EmailStatsQueryStringFilter"},"ip_pool_id":{"$ref":"#/components/schemas/EmailStatsQueryIPPoolFilter"},"broadcast_id":{"$ref":"#/components/schemas/EmailStatsQueryBroadcastFilter"},"country":{"$ref":"#/components/schemas/EmailStatsQueryStringFilter"},"region":{"$ref":"#/components/schemas/EmailStatsQueryStringFilter"},"city":{"$ref":"#/components/schemas/EmailStatsQueryStringFilter"},"agent_family":{"$ref":"#/components/schemas/EmailStatsQueryStringFilter"},"os_family":{"$ref":"#/components/schemas/EmailStatsQueryStringFilter"},"device_family":{"$ref":"#/components/schemas/EmailStatsQueryStringFilter"},"smtp_error_code":{"$ref":"#/components/schemas/EmailStatsQueryStringFilter"},"feedback_type":{"$ref":"#/components/schemas/EmailStatsQueryStringFilter"}}},"EmailStatsQueryRequest":{"type":"object","additionalProperties":false,"description":"Select email metrics for one workspace and one time window. Group-only fields require group_by; defaults apply after grouping is selected. Queries are limited to 20,000 series points, 1,000,000 selected metric cells including period rows, and a 4 MiB JSON response. Unsupported combinations or unavailable history return 422.","required":["from","to","metrics"],"properties":{"from":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","description":"Inclusive start, as a calendar date or RFC 3339 instant. Use the same form for from and to. Instants round down to a local quarter-hour; use Z when timezone is supplied.","example":"2026-09-23"},"to":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","description":"Inclusive end. Dates include the whole local day; instants round down to a local quarter-hour and include that quarter-hour. Dates allow up to 365 local days; instants allow up to 720 hours, subject to available history. Preserve this original bound when following cursors.","example":"2026-09-24"},"timezone":{"type":"string","minLength":1,"description":"IANA timezone for dates and bucket boundaries. Defaults to UTC.","example":"UTC"},"metrics":{"type":"array","minItems":1,"maxItems":39,"uniqueItems":true,"items":{"$ref":"#/components/schemas/EmailStatsQueryMetric"},"description":"Distinct metrics to return. Unselected metrics are absent. delivered and unique engagement counts estimate distinct message recipients. opens, opens_non_prefetched, clicks, unsubscribes, and oob_bounces estimate deduplicated events. effective_delivered and all_bounces are derived counts. Counts need not add up across buckets or groups. unique_opens and unique_clicks count message recipients, not distinct people across messages. Use returned period metrics; do not reconstruct totals from buckets or average rates or percentiles.\n\ndelivered counts message recipients with a delivery event without subtracting later bounces. effective_delivered is max(delivered - oob_bounces, 0). open_rate uses unique_opens_non_prefetched divided by effective_delivered; click_rate uses unique_clicks divided by effective_delivered. bounce_rate uses min(bounced + oob_bounces, delivered + bounced) divided by (delivered + bounced). complaint_rate and unsubscribe_rate use complained and unsubscribes, respectively, divided by effective_delivered. Undefined rates are null. Engagement rates can exceed 1 across event-time windows.\n\nAn unknown prefetch flag is treated as false. confirmed_unique_opens is the union of message recipients with opens or clicks; confirmed_unique_opens_non_prefetched excludes prefetched opens from that union. Differences between estimated distinct counts cannot establish exact audience overlaps or explain missing opens. Neither confirmation nor prefetch exclusion establishes a count or range of real people who engaged.\n\nLatency percentiles describe eligible measured logical events, excluding missing latency values and including zero. A percentile is null when no eligible samples exist. delivered is not the latency sample count. Report percentile values without inferring the unmeasured population or the distribution between them. They do not establish maxima or exact threshold counts; multiplying delivered by percentile fractions or subtracting processing and delivery percentiles cannot determine slow-message counts or a stage's latency.\n"},"group_by":{"$ref":"#/components/schemas/EmailStatsQueryDimension"},"grain":{"$ref":"#/components/schemas/EmailStatsQueryGrain"},"filters":{"$ref":"#/components/schemas/EmailStatsQueryFilters","description":"Filter recorded event context with include/exclude predicates. Include values combine with OR; dimensions combine with AND. Exclude-only predicates retain missing values. Tag filters require one case-sensitive name; a name without values requires presence. Each predicate accepts at most 20 distinct values across include and exclude. Every selected metric must support every filter dimension, using the same compatibility rules as group_by. Resolve template and IP-pool names to IDs before filtering. Broadcast and Brand filters require IDs; copy a Brand ID from Brands > More actions > Copy brand ID in the dashboard, or ask the caller for the ID when only a Brand name is known. Current names do not establish historical attribution."},"sort":{"$ref":"#/components/schemas/EmailStatsQueryMetric","description":"Grouped requests only. Rank groups by this selected metric; defaults to the first metrics entry. Undefined values sort last in either direction. Ties use the dimension value ascending, with null last."},"order":{"$ref":"#/components/schemas/SortOrder","description":"Grouped requests only. Defaults to desc."},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Grouped requests only. Maximum groups per page; defaults to 25. Each group retains its complete series."},"starting_after":{"type":"string","maxLength":2048,"description":"Grouped requests only. Opaque next_cursor from the previous response. Mutually exclusive with ending_before."},"ending_before":{"type":"string","maxLength":2048,"description":"Grouped requests only. Opaque prev_cursor for backward navigation, or refresh_cursor to read groups before the anchor in the current sort order. Mutually exclusive with starting_after."}}},"EmailStatsQueryDimensions":{"type":"object","additionalProperties":false,"description":"Contains the requested group_by property, including a null value when context is missing. Ungrouped results use an empty object.","properties":{"brand_id":{"oneOf":[{"$ref":"#/components/schemas/BrandID"},{"type":"null"}],"description":"Recorded Brand id value. Null represents historical or unattributed traffic recorded without a Brand and is distinct from the default Brand."},"sending_domain":{"type":["string","null"],"description":"Recorded sending domain value. Null represents missing context and differs from an empty string."},"category":{"type":["string","null"],"description":"Recorded category value. Null represents missing context and differs from an empty string."},"template_id":{"oneOf":[{"$ref":"#/components/schemas/EmailTemplateID"},{"type":"null"}],"description":"Recorded template id value. Null represents missing context and differs from an empty string."},"tag":{"type":["string","null"],"description":"Recorded tag value. Null represents missing context and differs from an empty string."},"recipient_domain":{"type":["string","null"],"description":"Recorded recipient domain value. Null represents missing context and differs from an empty string."},"mailbox_provider":{"type":["string","null"],"description":"Recorded mailbox provider value. Null represents missing context and differs from an empty string."},"mailbox_provider_region":{"type":["string","null"],"description":"Recorded mailbox provider region value. Null represents missing context and differs from an empty string."},"sending_ip":{"type":["string","null"],"description":"Recorded sending ip value. Null represents missing context and differs from an empty string."},"ip_pool_id":{"oneOf":[{"$ref":"#/components/schemas/IPPoolID"},{"type":"null"}],"description":"Recorded ip pool id value. Null represents missing context and differs from an empty string."},"broadcast_id":{"oneOf":[{"$ref":"#/components/schemas/EmailBroadcastID"},{"type":"null"}],"description":"Recorded broadcast id value. Null represents missing context and differs from an empty string."},"country":{"type":["string","null"],"description":"Recorded country value. Null represents missing context and differs from an empty string."},"region":{"type":["string","null"],"description":"Recorded region value. Null represents missing context and differs from an empty string."},"city":{"type":["string","null"],"description":"Recorded city value. Null represents missing context and differs from an empty string."},"agent_family":{"type":["string","null"],"description":"Recorded agent family value. Null represents missing context and differs from an empty string."},"os_family":{"type":["string","null"],"description":"Recorded os family value. Null represents missing context and differs from an empty string."},"device_family":{"type":["string","null"],"description":"Recorded device family value. Null represents missing context and differs from an empty string."},"smtp_error_code":{"type":["string","null"],"description":"Recorded smtp error code value. Null represents missing context and differs from an empty string."},"feedback_type":{"type":["string","null"],"description":"Recorded feedback type value. Null represents missing context and differs from an empty string."}},"maxProperties":1,"readOnly":true},"EmailStatsQueryMetrics":{"type":"object","additionalProperties":false,"description":"Selected metric values. Counts are nonnegative approximate distinct counts. Period uniques and rates are computed independently of buckets; summing bucket or group values does not reconstruct period totals. Zero means a supported empty population; undefined rates and empty latency samples are null.","properties":{"sends_accepted":{"type":"integer","format":"int64","minimum":0,"description":"Distinct sends accepted by Bird, counted by email identity."},"accepted":{"type":"integer","format":"int64","minimum":0,"description":"Distinct message recipients accepted by Bird."},"processed":{"type":"integer","format":"int64","minimum":0,"description":"Distinct message recipients processed for delivery."},"delivered":{"type":"integer","format":"int64","minimum":0,"description":"Distinct message recipients with a delivery event."},"bounced":{"type":"integer","format":"int64","minimum":0,"description":"Distinct message recipients with bounced events."},"hard_bounced":{"type":"integer","format":"int64","minimum":0,"description":"Distinct message recipients with hard bounced events."},"soft_bounced":{"type":"integer","format":"int64","minimum":0,"description":"Distinct message recipients with soft bounced events."},"admin_bounced":{"type":"integer","format":"int64","minimum":0,"description":"Distinct message recipients with admin bounced events."},"block_bounced":{"type":"integer","format":"int64","minimum":0,"description":"Distinct message recipients with block bounced events."},"undetermined_bounced":{"type":"integer","format":"int64","minimum":0,"description":"Distinct message recipients with undetermined bounced events."},"complained":{"type":"integer","format":"int64","minimum":0,"description":"Distinct message recipients with complained events."},"deferred":{"type":"integer","format":"int64","minimum":0,"description":"Distinct message recipients with a deferral event."},"rejected":{"type":"integer","format":"int64","minimum":0,"description":"Distinct message recipients rejected before provider delivery."},"oob_bounces":{"type":"integer","format":"int64","minimum":0,"description":"Distinct out-of-band bounce events."},"opens":{"type":"integer","format":"int64","minimum":0,"description":"Distinct open events, including prefetched opens."},"opens_non_prefetched":{"type":"integer","format":"int64","minimum":0,"description":"Distinct open events excluding prefetched opens. An absent prefetch flag counts as false."},"clicks":{"type":"integer","format":"int64","minimum":0,"description":"Distinct click events."},"unsubscribes":{"type":"integer","format":"int64","minimum":0,"description":"Distinct unsubscribe events."},"unique_opens":{"type":"integer","format":"int64","minimum":0,"description":"Distinct message recipients with an open event."},"unique_opens_non_prefetched":{"type":"integer","format":"int64","minimum":0,"description":"Distinct message recipients with a non-prefetched open event."},"unique_clicks":{"type":"integer","format":"int64","minimum":0,"description":"Distinct message recipients with a click event."},"confirmed_unique_opens":{"type":"integer","format":"int64","minimum":0,"description":"Distinct message recipients with an open or click event, deduplicated across both."},"confirmed_unique_opens_non_prefetched":{"type":"integer","format":"int64","minimum":0,"description":"Distinct message recipients with a non-prefetched open or click event, deduplicated across both."},"effective_delivered":{"type":"integer","format":"int64","minimum":0,"description":"Delivered recipients less out-of-band bounce events, calculated as `max(delivered - oob_bounces, 0)`."},"all_bounces":{"type":"integer","format":"int64","minimum":0,"description":"In-band bounced recipients plus out-of-band bounce events, calculated as `bounced + oob_bounces`."},"delivery_rate":{"type":["number","null"],"format":"double","minimum":0,"maximum":1,"description":"Ratio of `effective_delivered / (delivered + bounced)`, from 0 to 1. Null when `delivered + bounced` is zero."},"bounce_rate":{"type":["number","null"],"format":"double","minimum":0,"maximum":1,"description":"Ratio of `all_bounces / (delivered + bounced)`, capped at 1. Null when `delivered + bounced` is zero."},"complaint_rate":{"type":["number","null"],"format":"double","minimum":0,"description":"Ratio of `complained / effective_delivered`. Uncapped and can exceed 1 when complaints and deliveries fall in different windows. Null when `effective_delivered` is zero."},"deferral_rate":{"type":["number","null"],"format":"double","minimum":0,"maximum":1,"description":"Ratio of `deferred / (delivered + bounced)`, capped at 1. Null when `delivered + bounced` is zero."},"open_rate":{"type":["number","null"],"format":"double","minimum":0,"description":"Ratio of `unique_opens_non_prefetched / effective_delivered`. Uncapped and can exceed 1 when opens and deliveries fall in different windows. Null when `effective_delivered` is zero."},"click_rate":{"type":["number","null"],"format":"double","minimum":0,"description":"Ratio of `unique_clicks / effective_delivered`. Uncapped and can exceed 1 when clicks and deliveries fall in different windows. Null when `effective_delivered` is zero."},"unsubscribe_rate":{"type":["number","null"],"format":"double","minimum":0,"description":"Ratio of `unsubscribes / effective_delivered`, using distinct unsubscribe events as the numerator. Uncapped and can exceed 1. Null when `effective_delivered` is zero."},"oob_rate":{"type":["number","null"],"format":"double","minimum":0,"description":"Ratio of `oob_bounces / (delivered + bounced)`, using distinct out-of-band bounce events as the numerator. Uncapped and can exceed 1. Null when `delivered + bounced` is zero."},"processing_p50_ms":{"type":["integer","null"],"format":"int64","minimum":0,"description":"Processing latency at the 50th percentile, in integer milliseconds from Bird acceptance. One sample per logical event; null when no eligible sample exists."},"processing_p95_ms":{"type":["integer","null"],"format":"int64","minimum":0,"description":"Processing latency at the 95th percentile, in integer milliseconds from Bird acceptance. One sample per logical event; null when no eligible sample exists."},"processing_p99_ms":{"type":["integer","null"],"format":"int64","minimum":0,"description":"Processing latency at the 99th percentile, in integer milliseconds from Bird acceptance. One sample per logical event; null when no eligible sample exists."},"total_p50_ms":{"type":["integer","null"],"format":"int64","minimum":0,"description":"Delivery latency at the 50th percentile, in integer milliseconds from Bird acceptance. One sample per logical event; null when no eligible sample exists."},"total_p95_ms":{"type":["integer","null"],"format":"int64","minimum":0,"description":"Delivery latency at the 95th percentile, in integer milliseconds from Bird acceptance. One sample per logical event; null when no eligible sample exists."},"total_p99_ms":{"type":["integer","null"],"format":"int64","minimum":0,"description":"Delivery latency at the 99th percentile, in integer milliseconds from Bird acceptance. One sample per logical event; null when no eligible sample exists."}},"readOnly":true},"EmailStatsQueryPoint":{"type":"object","additionalProperties":false,"description":"One time bucket with the selected metrics. Bucket timestamps label nominal boundaries; edge buckets count events inside the normalized period.","required":["bucket","metrics"],"properties":{"bucket":{"type":"string","minLength":1,"format":"date-time","description":"Nominal bucket start as a UTC RFC 3339 instant."},"metrics":{"$ref":"#/components/schemas/EmailStatsQueryMetrics","x-go-type-skip-optional-pointer":true}},"readOnly":true},"EmailStatsQueryGroup":{"type":"object","additionalProperties":false,"description":"One group ranked over the whole requested period. Its optional series contains complete chronological buckets, including zero counts and null undefined values for empty buckets.","required":["dimensions","metrics"],"properties":{"dimensions":{"$ref":"#/components/schemas/EmailStatsQueryDimensions","x-go-type-skip-optional-pointer":true},"metrics":{"$ref":"#/components/schemas/EmailStatsQueryMetrics","x-go-type-skip-optional-pointer":true},"series":{"type":"array","items":{"$ref":"#/components/schemas/EmailStatsQueryPoint"},"description":"Present when grain is requested; absent otherwise."}},"readOnly":true},"EmailStatsQueryPeriod":{"type":"object","additionalProperties":false,"description":"Normalized half-open period. The response end is exclusive; replay the original inclusive request bounds when following cursors.","required":["from","to","timezone","grain"],"properties":{"from":{"type":"string","minLength":1,"format":"date-time","description":"Inclusive normalized start as a UTC instant."},"to":{"type":"string","minLength":1,"format":"date-time","description":"Exclusive normalized end as a UTC instant."},"timezone":{"type":"string","minLength":1,"description":"Timezone used to normalize bounds and buckets."},"grain":{"oneOf":[{"$ref":"#/components/schemas/EmailStatsQueryGrain"},{"type":"null"}],"description":"Requested grain, or null when no series was requested."}},"readOnly":true},"EmailStatsQueryResponse":{"type":"object","additionalProperties":false,"description":"Selected email metrics with normalized bounds. Ungrouped requests return one group and null cursors, including empty windows. Grouped requests without observed groups return an empty data array. Live page reads can reflect new events or changed ranking.","required":["data","period","data_as_of","next_cursor","prev_cursor","refresh_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailStatsQueryGroup"}},"period":{"$ref":"#/components/schemas/EmailStatsQueryPeriod","x-go-type-skip-optional-pointer":true},"data_as_of":{"type":["string","null"],"format":"date-time","description":"Always null for this endpoint. It does not report a refresh boundary, claim completeness, or record request time."},"next_cursor":{"type":["string","null"],"description":"Pass as starting_after for the next grouped page. Null when no next page exists or the request is ungrouped."},"prev_cursor":{"type":["string","null"],"description":"Pass as ending_before for the previous grouped page. Null when no previous page exists or the request is ungrouped."},"refresh_cursor":{"type":["string","null"],"description":"Anchor for the first group. Pass as ending_before to read groups sorting before it. Null for empty or ungrouped results. Ranking can change between reads; refresh by repeating the original query."}},"readOnly":true},"EmailSendingIpStatsPoint":{"type":"object","additionalProperties":false,"description":"Delivery and latency stats for messages sent from a single IP address over the requested period. Per-IP attribution begins only after a message is processed: we learn which IP a message used only from its delivery, bounce, deferral, and late-bounce events. Acceptance and processing events do not contribute to per-IP attribution. As a result, per-IP rows omit the `accepted` and `processed` counts and the `processing` latency family. Those fields never appear on a per-IP row. They are not returned as null.\n","required":["sending_ip","delivery","latency"],"properties":{"sending_ip":{"type":"string","minLength":1,"readOnly":true,"description":"The IP address used to send messages aggregated in this row.","example":"192.0.2.55"},"ip_pool_id":{"readOnly":true,"description":"The dedicated IP pool this address sent through, or null when the messages went through the shared pool. Recorded when each message was sent, so it reflects the pool used at send time even if the IP has since moved between pools or been released.\n","oneOf":[{"$ref":"#/components/schemas/IPPoolID"},{"type":"null"}]},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailSendingIpDeliveryStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailDeliveryLatencyStats"}]},"trend":{"type":"array","readOnly":true,"description":"Per-bucket delivery-rate series for this IP over the window. Present only when `include_trend=true`. Engagement is not attributed to a sending IP, so each point's open and click rates read 0 in buckets with deliveries and null in buckets without.","items":{"$ref":"#/components/schemas/EmailStatsSeriesPoint"}}}},"EmailStatsBySendingIpResponse":{"type":"object","additionalProperties":false,"description":"Per-sending-IP breakdown for the requested period, ranked by the `sort` metric (default `delivered`) descending and paginated with the requested `limit` (default 50, max 200).","required":["period","data","total","next_cursor","prev_cursor","refresh_cursor"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Sending-IP breakdown rows, ranked by the `sort` metric (default `delivered`) descending. Empty when no per-IP-attributable activity (delivery, bounce, deferral, or late bounce) occurred in the period.","items":{"$ref":"#/components/schemas/EmailSendingIpStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct sending IP addresses with activity in the period, regardless of `limit`. Pass `next_cursor` as `starting_after` to request the next page.\n","example":6},"next_cursor":{"type":["string","null"],"description":"Cursor for the next page. Pass back as `starting_after` to advance forward. `null` when no next page exists.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"},"prev_cursor":{"type":["string","null"],"description":"Cursor for the previous page. Pass back as `ending_before` to step backward. `null` when no previous page exists.","example":null},"refresh_cursor":{"type":["string","null"],"description":"Refresh anchor, the first row of this response. Pass back as `ending_before` to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-`null` whenever `data` is non-empty; `null` only on an empty page. Distinct from `prev_cursor`.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"}}},"EmailSendingDomainStatsPoint":{"type":"object","additionalProperties":false,"description":"Aggregate delivery, engagement, and latency stats for messages sent from a single sending domain over the requested period.","required":["sending_domain","delivery","engagement","latency"],"properties":{"sending_domain":{"type":"string","minLength":1,"readOnly":true,"description":"The sending domain (the portion of the `From` address after the `@`), normalized to lowercase.","example":"mail.acme.com"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailLatencyStats"}]},"trend":{"type":"array","readOnly":true,"description":"Per-bucket rate series for this sending domain over the window. Present only when `include_trend=true`.","items":{"$ref":"#/components/schemas/EmailStatsSeriesPoint"}}}},"EmailStatsBySendingDomainResponse":{"type":"object","additionalProperties":false,"description":"Per-sending-domain breakdown for the requested period, ranked by the `sort` metric (default `processed`) descending and paginated with the requested `limit` (default 50, max 200).","required":["period","data","total","next_cursor","prev_cursor","refresh_cursor"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Sending-domain breakdown rows, ranked by the `sort` metric (default `processed`) descending. Empty when no eligible activity occurred in the period.","items":{"$ref":"#/components/schemas/EmailSendingDomainStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct sending domains with activity in the period, regardless of `limit`. Pass `next_cursor` as `starting_after` to request the next page.\n","example":12},"next_cursor":{"type":["string","null"],"description":"Cursor for the next page. Pass back as `starting_after` to advance forward. `null` when no next page exists.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"},"prev_cursor":{"type":["string","null"],"description":"Cursor for the previous page. Pass back as `ending_before` to step backward. `null` when no previous page exists.","example":null},"refresh_cursor":{"type":["string","null"],"description":"Refresh anchor, the first row of this response. Pass back as `ending_before` to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-`null` whenever `data` is non-empty; `null` only on an empty page. Distinct from `prev_cursor`.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"}}},"EmailCategoryStatsPoint":{"type":"object","additionalProperties":false,"description":"Aggregate delivery and engagement stats for a single category over the requested period.","required":["category","delivery","engagement","latency"],"properties":{"category":{"type":"string","minLength":1,"readOnly":true,"description":"The category this row aggregates, as set at send time. `transactional` is one-to-one mail triggered by a user action. `marketing` is bulk sending. New categories may be added over time.","example":"transactional"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailLatencyStats"}]},"trend":{"type":"array","readOnly":true,"description":"Per-bucket rate series for this category over the window. Present only when `include_trend=true`.","items":{"$ref":"#/components/schemas/EmailStatsSeriesPoint"}}}},"EmailStatsByCategoryResponse":{"type":"object","additionalProperties":false,"description":"Per-category breakdown for the requested period, ranked by the `sort` metric (default `processed`) descending and paginated with the requested `limit` (default 50, max 200).","required":["period","data","total","next_cursor","prev_cursor","refresh_cursor"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Category breakdown rows, ranked by the `sort` metric (default `processed`) descending. Empty when no sends occurred in the period.","items":{"$ref":"#/components/schemas/EmailCategoryStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct categories with activity in the period, regardless of `limit`. Pass `next_cursor` as `starting_after` to request the next page.\n","example":2},"next_cursor":{"type":["string","null"],"description":"Cursor for the next page. Pass back as `starting_after` to advance forward. `null` when no next page exists.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"},"prev_cursor":{"type":["string","null"],"description":"Cursor for the previous page. Pass back as `ending_before` to step backward. `null` when no previous page exists.","example":null},"refresh_cursor":{"type":["string","null"],"description":"Refresh anchor, the first row of this response. Pass back as `ending_before` to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-`null` whenever `data` is non-empty; `null` only on an empty page. Distinct from `prev_cursor`.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"}}},"EmailMailboxProviderRegionStatsPoint":{"type":"object","additionalProperties":false,"description":"Delivery, engagement, and deliverability stats for messages grouped by a single mailbox provider and provider region pair over the requested period, for example `gmail` in `NA` or `microsoft` in `EU`. The provider region is the regional pod the receiving mail system reports for the recipient's provider; pairing it with the provider disambiguates a region label that several providers share. Like the mailbox-provider breakdown, rows cover the delivery stage onward: the `accepted` and `processed` counts and the `processing` latency family are omitted (a provider region cannot be attributed before delivery).\n","required":["mailbox_provider","mailbox_provider_region","delivery","engagement","latency"],"properties":{"mailbox_provider":{"type":"string","minLength":1,"readOnly":true,"description":"The recipient mailbox provider this row aggregates, as a lowercase classifier such as `gmail`, `yahoo`, `microsoft`, or `apple`.","example":"gmail"},"mailbox_provider_region":{"type":"string","minLength":1,"readOnly":true,"description":"The provider region this row aggregates, as reported by the receiving mail system (for example `NA`, `EU`, `APAC`). The set is open and provider-specific.","example":"NA"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailMailboxProviderDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailDeliveryLatencyStats"}]},"trend":{"type":"array","readOnly":true,"description":"Per-bucket rate series for this provider region over the window. Present only when `include_trend=true`.","items":{"$ref":"#/components/schemas/EmailStatsSeriesPoint"}}}},"EmailStatsByMailboxProviderRegionResponse":{"type":"object","additionalProperties":false,"description":"Per-(mailbox provider, provider region) breakdown for the requested period, ranked by the `sort` metric (default `delivered`) descending and paginated with the requested `limit` (default 50, max 200).","required":["period","data","total","next_cursor","prev_cursor","refresh_cursor"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Provider-region breakdown rows, ranked by the `sort` metric (default `delivered`) descending. Empty when no deliveries occurred in the period.","items":{"$ref":"#/components/schemas/EmailMailboxProviderRegionStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct mailbox provider and region pairs with activity in the period, regardless of `limit`. Pass `next_cursor` as `starting_after` to request the next page.\n","example":31},"next_cursor":{"type":["string","null"],"description":"Cursor for the next page. Pass back as `starting_after` to advance forward. `null` when no next page exists.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"},"prev_cursor":{"type":["string","null"],"description":"Cursor for the previous page. Pass back as `ending_before` to step backward. `null` when no previous page exists.","example":null},"refresh_cursor":{"type":["string","null"],"description":"Refresh anchor, the first row of this response. Pass back as `ending_before` to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-`null` whenever `data` is non-empty; `null` only on an empty page. Distinct from `prev_cursor`.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"}}},"EmailTemplateStatsPoint":{"type":"object","additionalProperties":false,"description":"Delivery, engagement, and latency numbers for every message sent with one template over the requested period.","required":["template_id","delivery","engagement","latency"],"properties":{"template_id":{"allOf":[{"$ref":"#/components/schemas/EmailTemplateID"}],"readOnly":true,"description":"The template this row is about, using the same `id` the email template endpoints return. Only messages sent with a template appear in this breakdown at all. If the template was deleted after it was used to send, this row still appears, keyed by that same `id`.\n"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailLatencyStats"}]},"trend":{"type":"array","readOnly":true,"description":"A short series of this template's delivery and engagement rates, one point per time bucket over the window. Only present when you set `include_trend=true` on the request.\n","items":{"$ref":"#/components/schemas/EmailStatsSeriesPoint"}}}},"EmailStatsByTemplateResponse":{"type":"object","additionalProperties":false,"description":"Per-template breakdown for the requested period, ranked by the `sort` metric (default `processed`) descending and paginated with the requested `limit` (default 50, max 200).","required":["period","data","total","next_cursor","prev_cursor","refresh_cursor"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Template breakdown rows, ranked by the `sort` metric (default `processed`) descending. Empty when no messages were sent with a template in the period.","items":{"$ref":"#/components/schemas/EmailTemplateStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct templates with activity in the period, regardless of `limit`. Pass `next_cursor` as `starting_after` to request the next page.\n","example":42},"next_cursor":{"type":["string","null"],"description":"Cursor for the next page. Pass back as `starting_after` to advance forward. `null` when no next page exists.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"},"prev_cursor":{"type":["string","null"],"description":"Cursor for the previous page. Pass back as `ending_before` to step backward. `null` when no previous page exists.","example":null},"refresh_cursor":{"type":["string","null"],"description":"Refresh anchor, the first row of this response. Pass back as `ending_before` to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-`null` whenever `data` is non-empty; `null` only on an empty page. Distinct from `prev_cursor`.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"}}},"EmailEngagementSortMetric":{"type":"string","default":"unique_opens","description":"Metric to rank rows by, applied descending. Shared by the engagement-only breakdowns (locations, email clients), which report open and click counts but no rates because delivery events provide no per-dimension denominator.\n","enum":["opens","opens_non_prefetched","unique_opens","unique_opens_non_prefetched","clicks","unique_clicks"]},"EmailEngagementCounts":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Open and click counts for a breakdown row whose dimension is resolved from engagement events only. `opens`, `opens_non_prefetched`, and `clicks` count each event. The same recipient opening or clicking more than once counts each time. The `unique_*` fields count distinct recipients instead, so a recipient who opened five times only counts once there. Rates and unsubscribe counts are not included here. A per-dimension delivered count is unavailable as a rate's denominator, and an unsubscribe event has none of the information this breakdown is grouped by, so it cannot be placed on a row.\n","required":["opens","opens_non_prefetched","unique_opens","unique_opens_non_prefetched","clicks","unique_clicks"],"properties":{"opens":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct open events, counting repeat opens from the same recipient and opens auto-fetched by inbox privacy features (such as Apple Mail Privacy Protection and the Gmail image proxy).\n","example":5420},"opens_non_prefetched":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct open events excluding those auto-fetched by inbox privacy features. Same event-counting semantics as `opens`, with prefetched opens removed.\n","example":3210},"unique_opens":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients who opened at least once, including opens auto-fetched by inbox privacy features.","example":3640},"unique_opens_non_prefetched":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients who opened at least once, excluding opens auto-fetched by inbox privacy features.","example":2480},"clicks":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct click events, counting repeat clicks from the same recipient.","example":924},"unique_clicks":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct recipients who clicked at least once.","example":621}}},"EmailLocationStatsPoint":{"type":"object","additionalProperties":false,"description":"Open and click counts for messages engaged with from a single location over the requested period. Location is resolved from open and click events only, so this breakdown reports engagement activity: opens, clicks, and the recipients behind them. It has no delivery counts and no open or click rates, because the receiving mail server reports delivery without a recipient location, preventing a per-location delivered denominator and rates. Each row always includes all three of `country`, `region`, and `city`; the levels below the requested `group_by` are null.\n","required":["country","region","city","engagement"],"properties":{"country":{"type":"string","minLength":1,"readOnly":true,"description":"The country this row aggregates, as a two-letter country code (ISO 3166-1 alpha-2) resolved from the open or click event. Always present.","example":"US"},"region":{"type":["string","null"],"readOnly":true,"description":"The region (state or province) within the country. Populated when `group_by` is `region` or `city`; null at coarser groupings.","example":"California"},"city":{"type":["string","null"],"readOnly":true,"description":"The city within the region. Populated when `group_by` is `city`; null at coarser groupings.","example":"San Francisco"},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailEngagementCounts"}]}}},"EmailStatsByLocationResponse":{"type":"object","additionalProperties":false,"description":"Per-location engagement breakdown for the requested period, grouped at the requested `group_by` granularity, ranked by the `sort` metric (default `unique_opens`) descending and paginated with the requested `limit` (default 50, max 200).","required":["period","data","total","next_cursor","prev_cursor","refresh_cursor"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Location breakdown rows, ranked by the `sort` metric (default `unique_opens`) descending. Empty when no opens or clicks with a resolved location occurred in the period.","items":{"$ref":"#/components/schemas/EmailLocationStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct locations at the requested `group_by` level with activity in the period, regardless of `limit`. Pass `next_cursor` as `starting_after` to request the next page.\n","example":86},"next_cursor":{"type":["string","null"],"description":"Cursor for the next page. Pass back as `starting_after` to advance forward. `null` when no next page exists.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"},"prev_cursor":{"type":["string","null"],"description":"Cursor for the previous page. Pass back as `ending_before` to step backward. `null` when no previous page exists.","example":null},"refresh_cursor":{"type":["string","null"],"description":"Refresh anchor, the first row of this response. Pass back as `ending_before` to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-`null` whenever `data` is non-empty; `null` only on an empty page. Distinct from `prev_cursor`.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"}}},"EmailClientStatsPoint":{"type":"object","additionalProperties":false,"description":"Engagement counts for messages opened or clicked from a single email client, operating system, or device type over the requested period. The reading environment is resolved from open and click events only, so this breakdown reports engagement activity: opens, clicks, and the recipients behind them. It has no delivery counts and no open or click rates, because the receiving mail server reports delivery without a client or device, preventing a per-client delivered denominator and rates. Exactly one of `email_client`, `os`, and `device_type` is populated, selected by the request's `group_by`. The other two are null. Inbox-privacy prefetching also affects the detected client. As with open counts, `opens_non_prefetched` excludes opens auto-fetched by an inbox privacy feature. It includes opens caused by a person opening the message.\n","required":["email_client","os","device_type","engagement"],"properties":{"email_client":{"type":["string","null"],"readOnly":true,"description":"The mail client this row aggregates (for example `Gmail`, `Apple Mail`, `Outlook`). Populated only when `group_by=email_client`. Null otherwise.","example":"Apple Mail"},"os":{"type":["string","null"],"readOnly":true,"description":"The operating system this row aggregates (for example `iOS`, `Android`, `Windows`, `macOS`). Populated only when `group_by=os`. Null otherwise.","example":"iOS"},"device_type":{"type":["string","null"],"readOnly":true,"description":"The device type this row aggregates (for example `mobile`, `desktop`, `tablet`). Populated only when `group_by=device_type`. Null otherwise.","example":"mobile"},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailEngagementCounts"}]}}},"EmailStatsByClientResponse":{"type":"object","additionalProperties":false,"description":"Per-client engagement breakdown for the requested period, grouped by the requested `group_by` facet, ranked by the `sort` metric (default `unique_opens`) descending and paginated with the requested `limit` (default 50, max 200).","required":["period","data","total","next_cursor","prev_cursor","refresh_cursor"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Client breakdown rows, ranked by the `sort` metric (default `unique_opens`) descending. Empty when no opens or clicks with a detected client occurred in the period.","items":{"$ref":"#/components/schemas/EmailClientStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct values of the requested `group_by` facet with activity in the period, regardless of `limit`. Pass `next_cursor` as `starting_after` to request the next page.\n","example":9},"next_cursor":{"type":["string","null"],"description":"Cursor for the next page. Pass back as `starting_after` to advance forward. `null` when no next page exists.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"},"prev_cursor":{"type":["string","null"],"description":"Cursor for the previous page. Pass back as `ending_before` to step backward. `null` when no previous page exists.","example":null},"refresh_cursor":{"type":["string","null"],"description":"Refresh anchor, the first row of this response. Pass back as `ending_before` to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-`null` whenever `data` is non-empty; `null` only on an empty page. Distinct from `prev_cursor`.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"}}},"EmailBroadcastStatsPoint":{"type":"object","additionalProperties":false,"description":"Delivery, engagement and latency figures for one broadcast's messages over the period you asked for.","required":["broadcast_id","delivery","engagement","latency"],"properties":{"broadcast_id":{"type":"string","minLength":1,"pattern":"^eb_[0-9a-hjkmnp-tv-z]{26}$","readOnly":true,"description":"The broadcast this row covers, the same ID the broadcast endpoints return. Only mail sent as part of a broadcast has a broadcast ID, so one-off and transactional sends do not appear in this breakdown at all.","example":"eb_01krdgeqcxet5s7t44vh8rt9mg"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailLatencyStats"}]}}},"EmailStatsByBroadcastResponse":{"type":"object","additionalProperties":false,"description":"Per-broadcast breakdown for the requested period, ranked by the `sort` metric (default `processed`) descending and paginated with the requested `limit` (default 50, max 200).","required":["period","data","total","next_cursor","prev_cursor","refresh_cursor"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsPeriod","description":"The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to."},"data":{"type":"array","readOnly":true,"description":"Broadcast breakdown rows, ranked by the `sort` metric (default `processed`) descending. Empty when no broadcast messages were active in the period.","items":{"$ref":"#/components/schemas/EmailBroadcastStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct broadcasts with activity in the period, regardless of `limit`. Pass `next_cursor` as `starting_after` to request the next page.\n","example":57},"next_cursor":{"type":["string","null"],"description":"Cursor for the next page. Pass back as `starting_after` to advance forward. `null` when no next page exists.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"},"prev_cursor":{"type":["string","null"],"description":"Cursor for the previous page. Pass back as `ending_before` to step backward. `null` when no previous page exists.","example":null},"refresh_cursor":{"type":["string","null"],"description":"Refresh anchor, the first row of this response. Pass back as `ending_before` to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-`null` whenever `data` is non-empty; `null` only on an empty page. Distinct from `prev_cursor`.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"}}},"EmailStatsBrandPeriod":{"type":"object","additionalProperties":false,"description":"The window this Brand breakdown was actually computed against. Bounds are either inclusive calendar days (YYYY-MM-DD in the requested `timezone`, UTC when omitted) or RFC 3339 UTC instants marking the starts of the first and last included 15-minute quarters (aligned to local quarter-hour boundaries when `timezone` is set).\n","required":["from","to"],"properties":{"from":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive start of the window the response covers. A calendar day (`YYYY-MM-DD`, in the requested `timezone`) for day windows, or an RFC 3339 UTC instant marking the start of the first included 15-minute quarter (aligned to a local quarter-hour boundary when `timezone` is set).","example":"2026-10-15T09:00:00Z"},"to":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?$","readOnly":true,"description":"Inclusive end of the window the response covers. A calendar day (`YYYY-MM-DD`, in the requested `timezone`) for day windows, or an RFC 3339 UTC instant marking the start of the last included 15-minute quarter (covering the 15 minutes from this timestamp; aligned to a local quarter-hour boundary when `timezone` is set).","example":"2026-10-15T09:30:00Z"},"data_as_of":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"Always `null` for Brand breakdowns because they read retained reporting events directly rather than asynchronous rollups.","example":null}}},"EmailBrandStatsPoint":{"type":"object","additionalProperties":false,"description":"Delivery, engagement, and latency figures for one Brand's email traffic over the requested period, or for historical unbranded traffic when brand_id is null.","required":["brand_id","delivery","engagement","latency"],"properties":{"brand_id":{"oneOf":[{"$ref":"#/components/schemas/BrandID"},{"type":"null"}],"readOnly":true,"description":"The Brand recorded at send time (`bnd_…`, copyable from Brands > More actions > Copy brand ID in the dashboard). Archived Brands continue to appear keyed by their ID. `null` represents historical or unattributed messages sent without a Brand and is distinct from the workspace's default Brand.\n"},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailEngagementStats"}]},"latency":{"readOnly":true,"description":"Latency quantiles for this Brand. Retained reporting events populate `processing` and `total` quantiles; `delivery` quantiles are `null`.\n","allOf":[{"$ref":"#/components/schemas/EmailLatencyStats"}]}}},"EmailStatsByBrandResponse":{"unevaluatedProperties":false,"description":"Per-Brand breakdown for the requested period, ranked by the `sort` metric (default `processed`) descending and paginated with the requested `limit` (default 50, max 200).","allOf":[{"type":"object","required":["period","data","total"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsBrandPeriod","readOnly":true,"description":"The resolved window the response covers (inclusive calendar dates in `YYYY-MM-DD`, or RFC 3339 starts of the first and last included 15-minute quarters), plus `data_as_of` (`null` because this breakdown reads retained reporting events directly)."},"data":{"type":"array","readOnly":true,"description":"Brand breakdown rows, ranked by the `sort` metric (default `processed`) descending. Includes a row with `brand_id` set to `null` when historical unbranded traffic occurred in the period.","items":{"$ref":"#/components/schemas/EmailBrandStatsPoint"}},"total":{"type":"integer","minimum":0,"readOnly":true,"description":"Total number of distinct Brand groups with activity in the period (including the `null` unbranded group when present), regardless of `limit`. Pass `next_cursor` as `starting_after` to request the next page.\n","example":4}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"EmailHealthSignalThresholds":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The boundaries this signal's status was judged against. Use them to classify your own slices, such as per-domain or per-tag rates, against the same bands. The `direction` field identifies the risky side of the boundaries: `above` means the status degrades as the value rises past a boundary, as with bounce and complaint rates, and `below` means it degrades as the value falls, as with delivery rate. The boundaries are exclusive, so a value exactly on one keeps the better status. Omitted for a metric with no risk boundaries, such as open rate.\n","required":["direction","watching","throttled"],"properties":{"direction":{"type":"string","minLength":1,"readOnly":true,"description":"Which side of the boundaries is at risk. `above` for higher-is-worse rates (bounce, complaint), `below` for lower-is-worse rates (delivery).","enum":["above","below"],"x-enum-varnames":["EmailHealthSignalThresholdsDirectionAbove","EmailHealthSignalThresholdsDirectionBelow"],"example":"above"},"watching":{"type":"number","minimum":0,"maximum":1,"readOnly":true,"description":"Crossing this boundary in the risk direction moves the signal to `watching`, as a fraction.","example":0.004},"throttled":{"type":"number","minimum":0,"maximum":1,"readOnly":true,"description":"Crossing this boundary in the risk direction moves the signal to `throttled`, as a fraction.","example":0.006}}},"EmailHealthSignal":{"type":"object","additionalProperties":false,"readOnly":true,"description":"The current value and verdict for a single sending-health metric over the window.","required":["metric","value","limit","status"],"properties":{"metric":{"type":"string","minLength":1,"readOnly":true,"description":"Which rate this signal reports.","enum":["delivery_rate","open_rate","bounce_rate","complaint_rate"],"example":"bounce_rate"},"value":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"The current rate over the window, as a fraction. Null when its denominator is zero.","example":0.004},"limit":{"type":["number","null"],"minimum":0,"maximum":1,"readOnly":true,"description":"The reference deliverability limit for this rate, as a fraction (for example `0.005` for a 0.5% bounce-rate limit). Null for metrics that have no limit, such as delivery rate and open rate. The verdict is classified using `thresholds`, which can differ from this reference limit.","example":0.005},"status":{"type":"string","minLength":1,"readOnly":true,"description":"This metric's individual verdict, ordered best to worst: `strong`, `healthy`, `watching`, `throttled`. `strong` applies only to `open_rate`, for an open rate well above typical. For the other rates, `healthy`, `watching`, and `throttled` indicate how close the rate is to a level that risks deliverability. The verdict follows the `thresholds` boundaries rather than the displayed reference `limit`. A signal whose `value` is null, because its denominator was zero in the window, is reported as `healthy`.\n","enum":["strong","healthy","watching","throttled"],"example":"healthy"},"thresholds":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailHealthSignalThresholds"}]}}},"EmailHealth":{"type":"object","additionalProperties":false,"description":"The workspace's current sending-health verdict over the requested window, plus reference deliverability limits and classification boundaries. Use it to render a health badge, the bounce-rate and complaint-rate limit labels, and the risk lines on deliverability charts without hard-coding any thresholds of your own.\n","required":["period","status","signals"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsPeriod","description":"The date range the verdict was computed over, echoed back from the request."},"status":{"type":"string","minLength":1,"readOnly":true,"description":"Overall sending-health verdict for the window, taken as the worst status among the bounce-rate, complaint-rate, and delivery-rate signals. The open-rate signal, which can be `strong`, is not part of this roll-up. The overall verdict is one of `healthy`, `watching`, or `throttled`. It is `healthy` when the other three signals are each healthy or better. It is `watching` when at least one is watching, and `throttled` when at least one is throttled. This verdict describes deliverability risk. It never pauses your sending on its own.\n","enum":["healthy","watching","throttled"],"example":"healthy"},"signals":{"type":"array","minItems":4,"readOnly":true,"description":"The per-rate signals include `delivery_rate`, `open_rate`, `bounce_rate`, and `complaint_rate`. Read a signal by matching on its `metric`. Each entry carries its current value, a reference deliverability limit (null where no limit applies), and its own verdict. Delivery rate, bounce rate, and complaint rate also carry the thresholds their verdict was classified against; open rate does not, because a high open rate is never a risk.\n","items":{"$ref":"#/components/schemas/EmailHealthSignal"}}},"example":{"period":{"data_as_of":null,"from":"2026-05-25","to":"2026-06-01"},"status":"watching","signals":[{"metric":"delivery_rate","value":0.995,"limit":null,"status":"healthy","thresholds":{"direction":"below","throttled":0.984,"watching":0.99}},{"metric":"open_rate","value":0.20100503,"limit":null,"status":"healthy"},{"metric":"bounce_rate","value":0.005,"limit":0.005,"status":"watching","thresholds":{"direction":"above","throttled":0.006,"watching":0.004}},{"metric":"complaint_rate","value":0.00010050251,"limit":0.003,"status":"healthy","thresholds":{"direction":"above","throttled":0.001,"watching":0.0006}}]}},"DomainSettings":{"type":"object","additionalProperties":false,"description":"Per-domain behavior toggles. Changes apply immediately to new sends.\n","properties":{"click_tracking":{"type":"boolean","default":false,"description":"Rewrite links in HTML email through your tracking domain to record clicks. You can enable this before your tracking domain has verified; it begins working once verification completes. A tracking domain must be configured; enabling it without one returns `409`.\n"},"open_tracking":{"type":"boolean","default":false,"description":"Insert a tracking pixel in HTML email to record opens. You can enable this before your tracking domain has verified: it begins working once verification completes. A tracking domain must be configured; enabling it without one returns `409`.\n"}}},"DomainDKIM":{"type":"object","additionalProperties":false,"description":"Active DKIM signing configuration for the domain.","required":["mode","selector","key_size"],"properties":{"mode":{"type":"string","readOnly":true,"minLength":1,"enum":["txt","delegated"],"description":"How the DKIM public key is published in your DNS. `txt`: you publish the key as a TXT record. `delegated`: you publish a single CNAME and we host and rotate the key.\n"},"selector":{"type":"string","readOnly":true,"minLength":1,"description":"DKIM selector used to sign mail from this domain.","example":"bird1"},"key_size":{"type":"integer","readOnly":true,"description":"RSA key size in bits.","example":2048}}},"DomainCapabilityPending":{"type":"object","additionalProperties":false,"description":"A staged configuration change awaiting DNS verification. The currently active configuration keeps serving until the staged one verifies, at which point it is promoted automatically. Submitting another change for the same capability replaces the staged value.\n","required":["domain","status"],"properties":{"domain":{"type":"string","readOnly":true,"minLength":1,"description":"Hostname the capability uses after the staged change verifies.","example":"rp.mail.acme.com"},"status":{"type":"string","readOnly":true,"minLength":1,"description":"Verification status of the staged change.\n\n- `pending`: the DNS records have not been detected yet.\n- `failed`: the records resolved with wrong values; correct them\n  or submit a different change.\n- `temporary_failure`: the DNS lookup failed transiently and is\n  queued for retry.\n","enum":["pending","failed","temporary_failure"],"example":"pending"}}},"DomainCapability":{"type":"object","additionalProperties":false,"required":["status"],"properties":{"status":{"type":"string","minLength":1,"readOnly":true,"description":"Capability verification status.\n\n- `pending`: verification has not run, or is currently running.\n- `verified`: all DNS records for this capability resolved with the\n  expected values.\n- `warning`: a record for this capability verified before and a recent\n  check no longer matches, but it is still within the grace period.\n  Sending is not yet affected; fix it before the grace period ends.\n- `failed`: DNS records resolved but at least one value is wrong.\n  Update your DNS to recover.\n- `temporary_failure`: DNS lookup failed transiently. Verification retries\n  automatically; do not change DNS records unless they are incorrect.\n- `not_configured`: the capability is not set up on this domain\n  (for example, no tracking domain configured).\n","enum":["pending","verified","warning","failed","temporary_failure","not_configured"],"example":"verified"},"domain":{"type":["string","null"],"readOnly":true,"description":"Hostname this capability is configured with: the return-path domain, the tracking domain, or the domain where the DMARC policy was found. `null` when not applicable or not configured.\n"},"pending":{"$ref":"#/components/schemas/DomainCapabilityPending"},"reason":{"type":["string","null"],"readOnly":true,"description":"Machine-readable reason code for a failed capability status. Only set when\n`status` is `failed`. Use this to display a specific message to users rather\nthan a generic failure message.\n\n- `tracking_domain_in_use`: the link tracking subdomain is already claimed\n  by another organization.\n"}}},"DomainCapabilities":{"type":"object","additionalProperties":false,"required":["sending","return_path","dmarc","tracking"],"properties":{"sending":{"$ref":"#/components/schemas/DomainCapability","description":"Overall authorization to send from this domain. Verified when the DKIM record, the return-path CNAME, and a DMARC policy are all in place. Required for live sends.\n"},"return_path":{"$ref":"#/components/schemas/DomainCapability","description":"Return-path (bounce) CNAME verification. The return-path domain receives bounce and complaint notifications and is what mailbox providers check for SPF: no separate SPF record is needed.\n"},"dmarc":{"$ref":"#/components/schemas/DomainCapability","description":"DMARC policy check. Satisfied by any valid DMARC record covering the sending domain: on the domain itself or on its registered (organizational) domain; `domain` reports where the policy was found. A minimal policy of `p=none` is sufficient.\n"},"tracking":{"$ref":"#/components/schemas/DomainCapability","description":"Branded open/click tracking domain. `not_configured` until a tracking domain is set. Tracked links are served over HTTPS once the CNAME verifies.\n"},"inbound":{"$ref":"#/components/schemas/DomainCapability","description":"Inbound mail receiving. `not_configured` until receiving is enabled on this domain (see `DomainUpdate.inbound`), then `pending` while the published MX records are checked, and `verified` once they resolve to us. The MX records to publish are always listed under `dns_records` (`purpose: inbound_mx`) as a regional reference, even while this is `not_configured`: enabling is what actually starts delivery.\n"}}},"DomainReceivingState":{"type":"string","minLength":1,"maxLength":14,"enum":["enabled","disabling","disable_failed","disabled"],"description":"Receiving control state, separate from DNS verification. `enabled` means receiving is configured; check `capabilities.inbound.status` for readiness. `disabling` means a request to turn off receiving is in progress. `disable_failed` means the latest attempt failed and can be retried. `disabled` means receiving is off and no longer blocks deletion.\n"},"DomainReceiving":{"type":"object","additionalProperties":false,"readOnly":true,"required":["state","managed_elsewhere"],"description":"Receiving state and whether it is managed from another workspace.","properties":{"state":{"$ref":"#/components/schemas/DomainReceivingState"},"managed_elsewhere":{"type":"boolean","description":"Receiving is assigned to another workspace in this organization. Its controls are unavailable in the current workspace. An authorized user must open the receiving workspace to turn it off.\n"}}},"DNSRecord":{"type":"object","additionalProperties":false,"required":["type","name","host","value","purpose","state","optional","status"],"properties":{"type":{"type":"string","minLength":1,"description":"The DNS record type to publish, determined by `purpose`.\n\n- `TXT`: used for the `dkim` and `dmarc` purposes.\n- `CNAME`: used for the `return_path` and `tracking` purposes.\n- `MX`: used for the `inbound_mx` purpose.\n","enum":["TXT","CNAME","MX"]},"name":{"type":"string","minLength":1,"description":"The record name: the part you enter in your DNS provider's `Name` or `Host` field, relative to the DNS zone the record belongs in (your registered domain). For a sending domain `mail.acme.com` the DKIM record name is `bird1._domainkey.mail`, entered in the `acme.com` zone. `@` for records at the zone apex.\n"},"host":{"type":"string","minLength":1,"description":"The fully qualified hostname for this record (for example, `bird1._domainkey.mail.acme.com`).\n"},"value":{"type":"string","minLength":1,"description":"The value to publish, as entered in your DNS provider's `Value` or `Content` field. For `TXT`, enter the full record content. For `CNAME`, enter the target hostname. For `MX`, enter the priority followed by the mail server hostname.\n"},"purpose":{"type":"string","minLength":1,"description":"What this record is for.\n\n- `dkim`: signs outbound mail and proves domain ownership.\n- `return_path`: identifies the return-path (bounce) CNAME for sending.\n- `tracking`: identifies the optional branded open/click tracking CNAME.\n- `inbound_mx`: identifies the MX record routing mail to us for receiving.\n  Always present wherever inbound is available, as a regional reference,\n  regardless of whether receiving is enabled; publishing it does not\n  enable receiving on its own: see `DomainUpdate.inbound`. It is\n  `optional` until receiving is enabled, and publishing it before then\n  is destructive: on a domain at the zone apex it replaces the MX\n  records that carry the domain's existing mail.\n- `dmarc`: identifies the DMARC policy record required for sending.\n","enum":["dkim","return_path","tracking","inbound_mx","dmarc"]},"state":{"type":"string","minLength":1,"readOnly":true,"description":"Lifecycle state of this record.\n\n- `active`: the record backs the domain's current configuration.\n- `pending`: the record belongs to a staged configuration change;\n  publish it to complete the change.\n- `deprecated`: the record belonged to a previous configuration.\n  Keep it in DNS until `safe_to_remove` is `true`; in-flight mail and\n  previously sent tracked links may still resolve through it.\n","enum":["active","pending","deprecated"]},"optional":{"type":"boolean","readOnly":true,"description":"Whether this record can be skipped. An optional record enables extra functionality (branded tracking, or receiving) rather than sending, so publish one only when you want what it enables. The `inbound_mx` records are optional until you enable receiving on the domain, and publishing one before then changes where mail to the domain is delivered.\n"},"status":{"type":"string","minLength":1,"readOnly":true,"description":"Verification status of this record's most recent DNS check.\n\n- `pending`: the record has not verified yet; publish it (or correct it)\n  and it verifies on the next check.\n- `verified`: the most recent check matched the expected value.\n- `warning`: the record verified before and a recent check no longer\n  matched, but it is still within the grace period. Sending is not yet\n  affected; fix the record before the grace period ends to avoid it\n  being blocked.\n- `failed`: the record verified before but later checks kept failing\n  past the grace period; the configuration has regressed and needs\n  attention.\n","enum":["pending","verified","warning","failed"]},"error":{"type":["string","null"],"readOnly":true,"description":"Human-readable detail for a check that did not pass on this record: what was found in DNS and why it did not match. Also set while `pending` when the record is published but does not match the expected value, which is the case you can act on. `null` when the record is `verified`, when nothing is published at this name yet, or before the first check.\n"},"safe_to_remove":{"type":["boolean","null"],"readOnly":true,"description":"Only set on `deprecated` records: `true` once the record is no longer referenced by in-flight mail or live tracked links and can be deleted from your DNS. `null` on `active` and `pending` records.\n"}}},"Domain":{"type":"object","additionalProperties":false,"required":["id","workspace_id","domain","vendor","status","settings","dkim","capabilities","receiving","dns_records","created_at","updated_at"],"properties":{"default_ip_pool_id":{"oneOf":[{"$ref":"#/components/schemas/IPPoolID"},{"type":"null"}],"description":"Default IP pool for this domain in this workspace. Used only when a send omits `ip_pool_id`; an explicit send option takes precedence. The pool must belong to the same organization. Set to `null` to use normal organization routing.\n"},"id":{"readOnly":true,"$ref":"#/components/schemas/DomainID"},"workspace_id":{"readOnly":true,"$ref":"#/components/schemas/WorkspaceID"},"domain":{"type":"string","minLength":1,"readOnly":true,"description":"The sending domain name. Set at creation and immutable.","example":"mail.acme.com"},"vendor":{"type":"string","minLength":1,"readOnly":true,"description":"The DNS provider hosting this domain's nameservers, so you know which provider's dashboard to manage the required DNS records in. Returns `other` when the provider has not been detected or is not recognized.\n","enum":["other","cloudflare","route53","godaddy","namecheap","google","azure","digitalocean","squarespace"]},"status":{"type":"string","minLength":1,"readOnly":true,"description":"Domain ownership verification, proven by the DKIM record. Readiness to\nsend or track is reported separately per capability under\n`capabilities.*.status`.\n\n- `pending`: the DKIM record has not been published yet.\n- `verified`: the DKIM record is in place; ownership is confirmed.\n- `failed`: a DKIM record exists but does not match the expected\n  value (for example a stale record from an earlier setup), or a\n  previously verified record was removed. Correct the record to\n  recover.\n- `temporary_failure`: DNS resolution failed transiently, such as from a\n  timeout or unreachable nameserver. Verification retries automatically;\n  do not change the DNS records unless they are incorrect.\n- `rejected`: the domain was refused for policy reasons and cannot be\n  used for sending. Contact support if you believe this is an error.\n","enum":["pending","verified","failed","temporary_failure","rejected"]},"settings":{"$ref":"#/components/schemas/DomainSettings"},"next":{"type":"array","readOnly":true,"description":"What to do next about this domain, given the state it is in. Each entry names one action and says\nwhy it is worth taking, so you can act on this response without working out the order\nyourself. Present on reads that compute it: an empty list means there is nothing to do,\nand the field is absent entirely on responses that do not report next actions.\n\nThis answers whether you own the domain, which is what `status` reports. What each\ncapability still needs before it can send or receive is reported separately under\n`capabilities`, so an empty list here does not on its own mean the domain is ready.\n","items":{"$ref":"#/components/schemas/NextAction"}},"dkim":{"readOnly":true,"$ref":"#/components/schemas/DomainDKIM"},"capabilities":{"$ref":"#/components/schemas/DomainCapabilities"},"receiving":{"$ref":"#/components/schemas/DomainReceiving","readOnly":true},"dns_records":{"type":"array","readOnly":true,"description":"The domain's DNS records and their individual verification state, returned in full on both the list and single-domain responses. This is the complete set to publish across DKIM, return-path, DMARC, tracking, and inbound; records for a staged change carry `state: pending`. Inbound MX records are always included as a regional reference, even while receiving is off and `capabilities.inbound.status` is `not_configured`. Their presence alone does not mean receiving is enabled; see `DomainUpdate.inbound`.\n","items":{"$ref":"#/components/schemas/DNSRecord"}},"last_checked_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When we last checked this domain's DNS records, whether or not the outcome changed. Updated on every verification: your manual refresh and the periodic automatic re-checks alike. `null` if the domain has never been checked.\n"},"verified_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the domain's ownership was confirmed: the moment `status` became `verified` via the DKIM record. Unchanged by later re-checks while it stays verified. `null` if the domain has never been verified.\n"},"created_at":{"type":"string","minLength":1,"format":"date-time","readOnly":true,"description":"When the domain was added."},"updated_at":{"type":"string","minLength":1,"format":"date-time","readOnly":true,"description":"When the domain's configuration was last changed (such as a settings or return-path change). Verification re-checks do not change this; see `last_checked_at` and `verified_at` for verification timing.\n"}}},"DomainList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of sending domains, newest first by default.","items":{"$ref":"#/components/schemas/Domain"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"DomainReturnPathConfig":{"type":"object","additionalProperties":false,"required":["name"],"description":"Return-path (bounce) domain configuration. The return-path domain receives bounce and complaint notifications for mail sent from this domain and is what mailbox providers check for SPF. Provide only the name part; we add the sending domain automatically.\n","properties":{"name":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?$","description":"Name part to use for the return-path domain. For example, `send` on `mail.acme.com` becomes `send.mail.acme.com`. Defaults to `send` when omitted at creation.\n","example":"send"}}},"DomainTrackingConfig":{"type":"object","additionalProperties":false,"required":["name"],"description":"Tracking domain configuration for branded open and click tracking URLs. Provide only the name part; we add the sending domain automatically. A domain created with no tracking configuration defaults to `links`. Tracked links are served over HTTPS after the tracking record verifies.\n","properties":{"name":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?$","description":"Name part to use for branded open and click tracking URLs. For example, `links` on `mail.acme.com` becomes `links.mail.acme.com`.\n","example":"links"}}},"DomainDKIMConfig":{"type":"object","additionalProperties":false,"description":"DKIM signing configuration.","properties":{"mode":{"type":"string","enum":["txt","delegated"],"default":"txt","description":"How the DKIM public key is published in your DNS.\n\n- `txt` (default): you publish the DKIM public key as a TXT record. Key\n  rotation requires updating the record.\n- `delegated`: you publish a CNAME that points to a DKIM key we host and\n  rotate. This mode is unavailable for new configurations; supplying it\n  returns `422`.\n"}}},"DomainCreate":{"type":"object","additionalProperties":false,"required":["domain"],"properties":{"domain":{"type":"string","format":"hostname","minLength":1,"description":"The domain you send from: the domain of your `from` addresses. Use a dedicated subdomain (for example, `mail.acme.com`) rather than your registered domain so sending reputation stays separate from other services on the domain.\n","example":"mail.acme.com"},"return_path":{"$ref":"#/components/schemas/DomainReturnPathConfig"},"tracking":{"$ref":"#/components/schemas/DomainTrackingConfig"},"dkim":{"$ref":"#/components/schemas/DomainDKIMConfig"},"settings":{"$ref":"#/components/schemas/DomainSettings"}},"example":{"domain":"mail.acme.com"}},"DomainInboundConfig":{"type":"object","additionalProperties":false,"required":["enabled"],"description":"Inbound (receiving) configuration. Enable inbound to receive email addressed to this domain. We return MX records to publish. After they verify, mail to any local-part at this domain is delivered as an inbound message and triggers the `email.received` webhook. Use a dedicated subdomain, such as `inbound.acme.com`, because using your apex domain would capture your corporate mail.\n","properties":{"enabled":{"type":"boolean","description":"Set `true` to enable receiving on this domain, `false` to disable it. Read `receiving.state` to follow the request: `disabling` while receiving is turning off, `disable_failed` if the latest attempt failed, and `disabled` when it is off. Retry a failed request with `false`. Before deleting the domain or workspace, poll the domain until `capabilities.inbound.status` is `not_configured`. Its MX records remain in `dns_records` as optional. Receiving with an assigned workspace is managed there. Disabling from a sibling workspace returns `403`; re-enabling does not move the assigned receiver. A sibling also receives `403` if it re-enables while a request to turn off receiving is pending or has failed. `receiving.managed_elsewhere` identifies this restriction before a request. Older setups without a recorded receiver can be disabled from an authorized workspace sharing the domain; re-enabling records that workspace as the receiver.\n","example":true}}},"DomainUpdate":{"type":"object","additionalProperties":false,"description":"Partial update. `settings` changes apply immediately. Changes to `return_path`, `tracking`, or `dkim` on a verified capability are staged. The current configuration keeps serving until the new DNS records verify. The change is then promoted automatically and the old records are marked `deprecated`. The staged value is visible under `capabilities.*.pending` and can be replaced by submitting another change.\n","properties":{"default_ip_pool_id":{"oneOf":[{"$ref":"#/components/schemas/IPPoolID"},{"type":"null"}],"description":"Default IP pool for this domain in this workspace. Used only when a send omits `ip_pool_id`; an explicit send option takes precedence. The pool must belong to the same organization. Set to `null` to use normal organization routing.\n"},"settings":{"$ref":"#/components/schemas/DomainSettings"},"return_path":{"$ref":"#/components/schemas/DomainReturnPathConfig","description":"Change the return-path name part. Cannot be removed: the return-path is required for sending.\n"},"tracking":{"oneOf":[{"$ref":"#/components/schemas/DomainTrackingConfig"},{"type":"null"}],"description":"Set or change the tracking name part, or remove tracking by passing `null`. Removal requires `click_tracking` and `open_tracking` to be disabled first, and returns `409` otherwise. After removal, links in previously sent email keep resolving while the tracking records are reported as `deprecated`.\n"},"dkim":{"$ref":"#/components/schemas/DomainDKIMConfig","description":"Change how the DKIM key is published. The current key keeps signing until the new configuration verifies, so mail is never sent unsigned during the transition.\n"},"inbound":{"$ref":"#/components/schemas/DomainInboundConfig","description":"Enable or disable receiving on this domain. Enabling claims the domain for inbound and moves `capabilities.inbound.status` from `not_configured` to `pending`, then `verified` once the MX records resolve to us. The MX records to publish are always present under `dns_records` (`purpose: inbound_mx`) as a regional reference. Their presence does not mean receiving is enabled; enable the domain whenever `capabilities.inbound.status` is `not_configured`. Enabling requires the domain's DKIM to be verified first. A fresh enable on a domain whose DKIM is not verified returns `422` with `E05019` and claims nothing. A domain already receiving inbound for another organization returns `422` with `E05018`.\n"}},"example":{"settings":{"click_tracking":true,"open_tracking":true},"tracking":{"name":"links"}}},"DomainEventID":{"type":"string","minLength":1,"pattern":"^dev_[0-9a-hjkmnp-tv-z]{26}$","example":"dev_01krdgeqcxet5s7t44vh8rt9mg"},"DomainEvent":{"type":"object","additionalProperties":false,"required":["id","type","summary","metadata","created_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/DomainEventID","description":"Event ID."},"type":{"type":"string","minLength":1,"description":"Type of domain event. `domain.status_changed` tracks ownership verification through the domain-level `status`. `domain.sending_status_changed` tracks readiness to send through `capabilities.sending`. The remaining `*_status_changed` types each track one DNS record's verification. Open enum: new event types may be added over time, so treat any unrecognized value as a future event rather than an error. The values below are the types known at this version.","x-extensible-enum":["domain.registered","domain.settings_updated","domain.return_path_changed","domain.tracking_changed","domain.tracking_removed","domain.status_changed","domain.sending_status_changed","domain.dkim_status_changed","domain.dmarc_status_changed","domain.return_path_status_changed","domain.tracking_status_changed"],"example":"domain.status_changed"},"summary":{"type":"string","minLength":1,"description":"Human-readable summary of what changed.","example":"Domain verified — ownership confirmed."},"metadata":{"type":"object","description":"Structured details for the event. Status-change events carry `from` and `to`; record-level changes also carry `domain`, the affected hostname.","additionalProperties":true},"created_at":{"type":"string","format":"date-time","minLength":1,"description":"When the event was recorded."}}},"DomainEventList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of domain events, newest first by default.","items":{"$ref":"#/components/schemas/DomainEvent"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"ShareDomainDnsRequest":{"type":"object","additionalProperties":false,"required":["emails"],"properties":{"emails":{"type":"array","minItems":1,"maxItems":3,"description":"Email recipients for the domain's current DNS records. The first address is the direct recipient and the rest are copied on the same email; duplicates are ignored. Any invalid address fails the whole request with `422`.","items":{"type":"string","format":"email","example":"alice@example.com"}}},"example":{"emails":["alice@example.com","bob@example.com"]}},"SuppressionReasonFilter":{"type":"string","enum":["hard_bounce","complaint","unsubscribe","manual"]},"SuppressionScopeTypeFilter":{"type":"string","enum":["workspace","category","audience","topic","contact","domain"]},"SuppressionID":{"type":"string","minLength":1,"pattern":"^sup_[0-9a-hjkmnp-tv-z]{26}$","example":"sup_01krdgeqcxet5s7t44vh8rt9mg"},"SuppressionScopeType":{"type":"string","minLength":1,"enum":["workspace","category","audience","topic","contact","domain"],"description":"How widely the email suppression applies. Responses use `workspace`. The values `category`, `audience`, `topic`, `contact`, and `domain` are reserved and have no records. The record's `applies_to` field determines which message categories are blocked.\n"},"SuppressionScope":{"type":"object","additionalProperties":false,"required":["type","id"],"properties":{"type":{"$ref":"#/components/schemas/SuppressionScopeType"},"id":{"type":"string","minLength":1,"description":"Public ID or alias of the scoped resource. For workspace scope, this is the workspace ID.\n","example":"ws_01krdgeqcxet5s7t44vh8rt9mg"}}},"Suppression":{"type":"object","additionalProperties":false,"required":["id","email","scope","reason","origin","applies_to","created_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/SuppressionID"},"email":{"type":"string","format":"email","minLength":5,"description":"The suppressed address, stored lowercase.","example":"user@example.com"},"scope":{"$ref":"#/components/schemas/SuppressionScope"},"reason":{"type":"string","minLength":1,"x-extensible-enum":["hard_bounce","complaint","manual","unsubscribe"],"description":"Why the address is suppressed:\n\n- `hard_bounce`: A delivery permanently failed.\n- `complaint`: The recipient reported a message as spam.\n- `manual`: Added through the API or dashboard.\n- `unsubscribe`: The recipient opted out. Deprecated, and no new record carries it: an opt-out is a messaging preference rather than a suppression. Legacy records remain visible until they are moved to messaging preferences.\n\nAn address can hold one record per reason. This list grows over time. Treat unknown values as informational rather than rejecting the record.\n"},"origin":{"type":"string","minLength":1,"x-extensible-enum":["bounce_event","complaint_event","api_key","user","unsubscribe_event","unsubscribe_link"],"description":"How the suppression came to exist:\n\n- `bounce_event`: Created automatically from a hard bounce.\n- `complaint_event`: Created from a spam complaint.\n- `api_key`: Added through the API with an API key.\n- `user`: Added by a user in the dashboard.\n- `unsubscribe_event`: The mailbox provider reported an opt-out. Deprecated with `reason: unsubscribe`.\n- `unsubscribe_link`: The recipient used a Bird unsubscribe link. Deprecated with `reason: unsubscribe`.\n\nThis list grows over time. Treat unknown values as informational rather than rejecting the record.\n"},"applies_to":{"type":"string","minLength":1,"x-extensible-enum":["all","non_transactional","category"],"description":"Which sends the suppression blocks.\n\n- `all`: blocks every message category, including transactional.\n- `non_transactional`: blocks marketing but allows transactional messages.\n  A recipient who complained can therefore still receive\n  mail such as password resets.\n- `category`: scopes the block to a preference category and blocks every\n  category until one is set.\n\nThis list grows over time, and any value other than `non_transactional`\nblocks every category, so treat an unknown value as blocking the send.\n"},"source_email_id":{"description":"ID of the email that triggered suppression. Null for manual additions.","oneOf":[{"$ref":"#/components/schemas/EmailID"},{"type":"null"}]},"source_recipient_id":{"description":"ID of the recipient event that triggered suppression. Null for manual additions.","oneOf":[{"$ref":"#/components/schemas/RecipientID"},{"type":"null"}]},"created_at":{"type":"string","minLength":1,"format":"date-time","readOnly":true,"description":"When the address was suppressed."}}},"SuppressionList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of suppression records.","items":{"$ref":"#/components/schemas/Suppression"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"SuppressionCreate":{"type":"object","additionalProperties":false,"required":["email"],"properties":{"email":{"type":"string","format":"email","minLength":5,"description":"The address to stop sending to. Normalized before storage and matching: lowercased and trimmed of surrounding whitespace.\n","example":"user@example.com"}}},"EmailCompetitivePeriod":{"type":"object","additionalProperties":false,"description":"The period the response describes. Most reports resolve a rolling window when\nrequested; send-time and notable reports can carry the panel's own window.\nThese bounds describe coverage, not a guarantee of measurement freshness.\n","required":["days","from","to"],"properties":{"days":{"type":"integer","readOnly":true,"description":"Length of the period in days.","example":30},"from":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"Start of the period, inclusive.","example":"2026-07-13T09:00:00Z"},"to":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"End of the period, exclusive. Daily figures therefore run through the previous whole UTC day and never include the one in progress.\n","example":"2026-08-12T09:00:00Z"}}},"EmailCompetitiveWatchlistSummary":{"type":"object","additionalProperties":false,"description":"Where your sending sits against the brands you watch, over the same period as the\nrows.\n\nEvery figure here is derived from those rows rather than measured separately, so\nthe two always agree. As on a row, each is present and `null` when the rows cannot\nsupport it: the peer medians need at least one watched brand the panel reported\non, and the share figures need sending of your own to compare.\n","required":["share_of_volume_percent","share_of_volume_change_points","competitor_sends","competitor_sends_change_percent","peer_cadence_median_per_week","peer_inbox_placement_median_rate"],"properties":{"share_of_volume_percent":{"type":["number","null"],"readOnly":true,"description":"Your share of everything the watched set sent over the period, your own sending included in the total. Your half of the ratio is an exact count of your own sending while the rest is the panel's estimate, so the two sides are measured differently.\n","example":10.5},"share_of_volume_change_points":{"type":["number","null"],"readOnly":true,"description":"How that share moved against the period immediately before, in percentage points. A share that went from 11.7 to 10.5 reports -1.2.\n","example":-1.2},"competitor_sends":{"type":["integer","null"],"format":"int64","readOnly":true,"description":"Estimated volume the watched brands sent between them, excluding your own sending. A panel estimate, so read it as an order of magnitude rather than a count.\n","example":4240000},"competitor_sends_change_percent":{"type":["number","null"],"readOnly":true,"description":"Change in that volume against the period immediately before.","example":12},"peer_cadence_median_per_week":{"type":["number","null"],"readOnly":true,"description":"Median campaigns per week across the brands you watch, per sending domain. Your own row is excluded, since it is the figure being held against this one.\n","example":4.4},"peer_inbox_placement_median_rate":{"type":["number","null"],"readOnly":true,"description":"Median inbox placement across the brands you watch. Your own row is excluded, as with the cadence median.\n","example":0.892}}},"CompetitiveWatchlistBrandID":{"type":"string","minLength":1,"pattern":"^cwb_[0-9a-hjkmnp-tv-z]{26}$","example":"cwb_01krdgeqcxet5s7t44vh8rt9mg"},"EmailCompetitivePanelStatus":{"type":"string","minLength":1,"description":"Whether panel figures are available for a row, and when they are not, why.\n\n`ok` means the panel reported figures for the requested period. `not_in_panel`\nmeans the panel does not track the sending domain at all, which is common for\nsmaller and newer senders. `no_data` means the panel tracks the domain but\nobserved no mail from it in the period. `unavailable` means the figures could\nnot be retrieved this time and the same request may well succeed on a retry.\n","enum":["ok","not_in_panel","no_data","unavailable"],"example":"ok"},"EmailCompetitiveCampaignSummary":{"type":"object","description":"The most recent campaign observed for a brand in the period.","required":["id","subject","sent_at","image_url"],"properties":{"id":{"type":"string","minLength":1,"readOnly":true,"description":"The identifier for this campaign. Use it to fetch this one campaign on its own.\n\nIt is a string, and it needs to stay one. The values are long enough that\nJavaScript, and any other language that stores every number as a floating point\nvalue, will round them, and a rounded identifier matches no campaign at all.\nCompare it and pass it back as text.\n","example":"3914827265"},"subject":{"type":"string","minLength":1,"readOnly":true,"description":"The subject line the panel saw on this campaign.","example":"The Summer Sale: 40% off everything"},"sent_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the panel first saw this campaign arrive.","example":"2026-08-09T14:02:00Z"},"image_url":{"type":["string","null"],"format":"uri","readOnly":true,"description":"Where the panel's capture of the rendered email can be fetched, null when it captured none. Panels image only some of what they observe, so an absent creative is an ordinary outcome rather than a failed one. The image is served from the panel's own host rather than from ours, so a page embedding it has to allow that host.\n","example":"https://images.example.com/creatives/c154c8c4-6356-40e6-92d2-7c6727ec36ca.jpg"}}},"EmailCompetitiveFieldSource":{"type":"string","minLength":1,"description":"Where a figure came from. `measured` means it is counted from your own\nsending. `panel` means it is an estimate from an email panel, which observes a\nsample of real inboxes and scales what it sees up to a whole audience. `none`\nmeans there is no figure for this field on this row, so there is nothing to\nattribute a source to.\n\nOnly your own row carries `measured` figures, and only where the metric is counted\nrather than estimated. Everything about a competitor is a panel estimate.\n","enum":["measured","panel","none"],"example":"panel"},"EmailCompetitiveWatchlistRowProvenance":{"type":"object","additionalProperties":false,"description":"Where each figure on the row came from, so a comparison can be labelled\nhonestly. Every field on a competitor's row is a panel estimate. On your own\nrow the source varies by field: what is counted directly is reported as measured,\nfalls back to the panel for what is not, and reports `none` for a field this row\nnever carries at all.\n\nRead rate is a panel estimate even on your own row. Comparing a measured rate\nagainst a panel estimate of the same rate is not a like for like\ncomparison, because the two count an open differently, so both sides of the\ncomparison come from the panel.\n","required":["sends","cadence_per_week","inbox_placement_rate","read_rate","audience_overlap_rate","last_campaign"],"properties":{"sends":{"$ref":"#/components/schemas/EmailCompetitiveFieldSource","description":"Source of `sends` and of `sends_change_percent`, which is derived from it."},"cadence_per_week":{"$ref":"#/components/schemas/EmailCompetitiveFieldSource","description":"Source of `cadence_per_week`."},"inbox_placement_rate":{"$ref":"#/components/schemas/EmailCompetitiveFieldSource","description":"Source of `inbox_placement_rate`."},"read_rate":{"$ref":"#/components/schemas/EmailCompetitiveFieldSource","description":"Source of `read_rate`."},"audience_overlap_rate":{"$ref":"#/components/schemas/EmailCompetitiveFieldSource","description":"Source of `audience_overlap_rate`."},"last_campaign":{"$ref":"#/components/schemas/EmailCompetitiveFieldSource","description":"Source of `last_campaign`."}}},"EmailCompetitiveWatchlistRow":{"type":"object","additionalProperties":false,"description":"One brand on the watchlist, with its figures for the requested period. Your own\nworkspace appears as a row too, so the table can be read as a single ranking.\n\nMetrics are present on every row. Interpret `null` using each field's\ndescription: it can mean unavailable, no observed campaign, or no overlap\nreturned by the panel. A `0` is a measurement rather than a gap.\n\nYour measured sends and cadence cover the workspace. Your panel rates and\noverlap describe only its highest-volume sending domain.\n\n`esp` and `list_size` are the exception. They are populated only when you read a\nsingle brand, and are always `null` on the watchlist whatever `panel_status`\nreports.\n","required":["is_workspace","name","industry","sending_domains","esp","list_size","panel_status","sends","sends_change_percent","cadence_per_week","inbox_placement_rate","read_rate","audience_overlap_rate","last_campaign","provenance"],"properties":{"watchlist_brand_id":{"$ref":"#/components/schemas/CompetitiveWatchlistBrandID","readOnly":true,"description":"The watchlist entry, for removing the brand. Absent on your own row, which is not a watchlist entry."},"is_workspace":{"type":"boolean","readOnly":true,"description":"True on the row describing your own workspace's sending.","example":false},"name":{"type":"string","minLength":1,"readOnly":true,"description":"The brand's name as it was when the brand was added to the watchlist.","example":"Everlane"},"industry":{"type":["string","null"],"readOnly":true,"description":"The brand's industry as it was when the brand was added, or null when the brand is not classified.","example":"DTC Apparel"},"sending_domains":{"type":"array","minItems":1,"readOnly":true,"description":"The domains the brand's figures describe. Always one domain today: a brand is tracked by the single one the panel sees the most of its mail from, so a brand that splits its mail across several domains reports less than its full volume. On your own row this domain scopes panel measurements, while measured sends and cadence cover the workspace.\n","items":{"type":"string","minLength":1},"example":["everlane.com"]},"esp":{"type":["string","null"],"readOnly":true,"description":"A sending platform observed on the domain, or null when the panel has none on record. A brand sending through more than one platform reports one of them rather than the list. This is frequently unavailable and updates monthly at best, so treat its absence as normal rather than as pending. Populated only when you read a single brand; on the watchlist it is always null.\n","example":"Klaviyo"},"list_size":{"type":["integer","null"],"format":"int64","readOnly":true,"description":"Estimated number of addresses the brand mails, or null when the panel has no estimate. Populated only when you read a single brand; on the watchlist it is always null.\n","example":1240000},"panel_status":{"$ref":"#/components/schemas/EmailCompetitivePanelStatus","readOnly":true,"description":"Whether panel figures were available for this row, and when they were not, why."},"sends":{"type":["integer","null"],"format":"int64","readOnly":true,"description":"Messages sent in the period.","example":1240000},"sends_change_percent":{"type":["number","null"],"readOnly":true,"description":"Change in send volume against the period immediately before this one, as a percentage. Null when the earlier period has nothing to compare against.\n","example":18},"cadence_per_week":{"type":["number","null"],"readOnly":true,"description":"Average campaigns sent per week over the period.","example":5.2},"inbox_placement_rate":{"type":["number","null"],"readOnly":true,"description":"Share of the brand's observed mail that reached an inbox rather than a spam folder.\n","example":0.889},"read_rate":{"type":["number","null"],"readOnly":true,"description":"Share of delivered mail that was read.","example":0.192},"audience_overlap_rate":{"type":["number","null"],"readOnly":true,"description":"Share of the panel-observed audience of your workspace's highest-volume sending domain that also receives this brand's mail. Null on your own row or when the panel returns no overlap for a competitor. An absent panel result does not establish that the audiences are disjoint.\n","example":0.24},"last_campaign":{"oneOf":[{"$ref":"#/components/schemas/EmailCompetitiveCampaignSummary"},{"type":"null"}],"unevaluatedProperties":false,"readOnly":true,"description":"The most recent campaign observed in the period, or null when none was. Always null on your own row.\n"},"provenance":{"$ref":"#/components/schemas/EmailCompetitiveWatchlistRowProvenance","readOnly":true,"description":"Where each figure on this row came from."}}},"EmailCompetitiveWatchlist":{"type":"object","additionalProperties":false,"description":"The workspace's competitor watchlist with its figures for the requested period.\n\nThe list is capped by the organization's competitor limit and is returned whole,\nso it is not paginated. Your own row is included and is always first.\n","required":["period","summary","data"],"properties":{"period":{"$ref":"#/components/schemas/EmailCompetitivePeriod","description":"The period every figure covers."},"summary":{"$ref":"#/components/schemas/EmailCompetitiveWatchlistSummary","description":"Where your sending sits against the brands you watch."},"data":{"type":"array","readOnly":true,"description":"Your own row first, then each watched brand in the order it was added. Your row is present once your workspace has sent email, since before that there is no sending of yours to compare against. Empty for a workspace that has neither sent nor added a brand.\n","items":{"$ref":"#/components/schemas/EmailCompetitiveWatchlistRow"}}}},"EmailCompetitiveCampaignSignal":{"type":"string","minLength":1,"description":"Why this campaign was surfaced. The set is open and grows as new signals are added.\n\nEvery signal describes the campaign against its own brand's history, never against the\nother brands you watch, so several brands can carry the same signal in one period and\nnone of them is the top of anything.\n\n`biggest_send` is a send far above that brand's own median: unusual for the brand, not\nmerely large. `read_rate_standout` is a campaign read unusually well for its brand.\n`landing_in_spam` is one heavily filed as spam at a single mailbox provider, named in\n`mailbox_provider`, which is worth seeing even when the brand's overall placement looks healthy.\n","x-extensible-enum":["biggest_send","read_rate_standout","landing_in_spam"],"example":"read_rate_standout"},"EmailCompetitiveNotableClaim":{"type":"object","additionalProperties":false,"description":"What the panel itself asserts about a campaign, in its own words. Present only on the campaigns the panel chose to make a claim about, which is a minority of them: a campaign can be surfaced as notable without the panel putting a headline on it, and that is an ordinary outcome rather than missing data.\n","required":["text"],"properties":{"text":{"type":"string","minLength":1,"readOnly":true,"description":"The panel's own phrasing, which may name the window the claim was measured over (\"Biggest send in 7 days\") or not (\"Best-read campaign\"). Show it as written rather than rebuilding it from the signal, and do not parse a window out of it.\n","example":"Biggest send in 7 days"}}},"EmailCompetitiveNotableEvidence":{"type":"object","additionalProperties":false,"description":"The figures behind a campaign's signal, for ordering or filtering the list yourself. Which field carries a value depends on the signal, and each is null both on the signals it does not describe and on a campaign of its own signal the panel published no figure for.\n","required":["ratio_to_median","read_rate_observations","mailbox_provider_spam_rate","mailbox_provider_observations"],"properties":{"ratio_to_median":{"type":["number","null"],"readOnly":true,"description":"How many times the brand's own median volume this send was. A value of 29 means the send was twenty-nine times the brand's typical volume for the period. Null on every signal other than `biggest_send`, and on a `biggest_send` campaign the panel published no ratio for.\n","example":29.61},"read_rate_observations":{"type":["integer","null"],"format":"int64","readOnly":true,"description":"How many panel observations `campaign.read_rate` was measured over. A rate over thirty observations and one over a hundred and forty are not equally worth showing, and this is what separates them. Null on every signal other than `read_rate_standout`, and on a `read_rate_standout` campaign the panel published no denominator for.\n","example":66},"mailbox_provider_spam_rate":{"type":["number","null"],"readOnly":true,"description":"Share of this campaign filed as spam at the one provider named in `mailbox_provider`, as a value between 0 and 1. A different measurement from the campaign's overall `spam_rate`, and the one this signal is about. Null on every signal other than `landing_in_spam`, and on a `landing_in_spam` campaign whose provider counts the panel did not publish, so a spam entry can arrive without the rate behind it.\n","example":0.79},"mailbox_provider_observations":{"type":["integer","null"],"format":"int64","readOnly":true,"description":"How many observations at that provider `mailbox_provider_spam_rate` was measured over. Null on the same terms.\n","example":199}}},"EmailCompetitivePanelMailboxProvider":{"type":"string","minLength":1,"readOnly":true,"description":"A mailbox provider, as the email panel identifies it. A lowercase identifier rather than a\ndisplay name, so pick your own label for it, and treat the set as open: the panel reports\nwhichever providers it observed, and `gmail`, `hotmail`, `yahoo`, `aol` and `comcast` are the\nones it returns most. Apple never appears, because the panel does not measure it, so a surface\noffering an Apple row has no measurement behind it.\n\nThe panel's buckets are not the same as the ones the [mailbox-provider stats\nbreakdown](/docs/api/reference/get-email-stats-by-mailbox-provider) reports: Microsoft's\nproperties appear here as `hotmail` rather than `microsoft`, and Apple is absent, so the two\nare not a joinable dimension.\n","example":"gmail"},"EmailCompetitiveCampaign":{"description":"One campaign an email panel observed a brand sending.","unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/EmailCompetitiveCampaignSummary"},{"type":"object","required":["reach","read_rate","has_creative","discount_percent","inbox_rate","spam_rate"],"properties":{"reach":{"type":["integer","null"],"format":"int64","readOnly":true,"description":"Estimated recipients this campaign reached, null when the panel observed the campaign but published no estimate for it.\n","example":410000},"read_rate":{"type":["number","null"],"readOnly":true,"description":"Estimated share of recipients who read this campaign, null when the panel published no rate for it. Panel read rates count dwell time, so they do not move with the automatic opens that inflate a sender's own open rate.\n","example":0.228},"has_creative":{"type":"boolean","readOnly":true,"description":"Whether the panel captured the rendered email for this campaign.","example":true},"discount_percent":{"type":["number","null"],"readOnly":true,"description":"The first recognized percentage-discount offer in the subject, null when none is recognized. Does not detect dollar discounts, free shipping or offers revealed only inside the email.\n","example":40},"inbox_rate":{"type":["number","null"],"readOnly":true,"description":"Share of this campaign that reached an inbox, null when the panel observed it without recording where it landed. It describes this send rather than the brand's domain, so a single bad campaign is visible against a brand whose overall placement still looks healthy.\n","example":0.879},"spam_rate":{"type":["number","null"],"readOnly":true,"description":"Share of this campaign that was filed as spam, null on the same terms.","example":0.121}}}]},"EmailCompetitiveNotableCampaign":{"type":"object","additionalProperties":false,"description":"A campaign the panel surfaced, and the reason it did.","required":["watchlist_brand_id","brand_name","signal","claim","evidence","mailbox_provider","campaign"],"properties":{"watchlist_brand_id":{"$ref":"#/components/schemas/CompetitiveWatchlistBrandID","readOnly":true,"description":"The watchlist entry that sent it."},"brand_name":{"type":"string","minLength":1,"readOnly":true,"description":"The brand's name.","example":"Allbirds"},"signal":{"$ref":"#/components/schemas/EmailCompetitiveCampaignSignal","readOnly":true},"claim":{"oneOf":[{"$ref":"#/components/schemas/EmailCompetitiveNotableClaim"},{"type":"null"}],"readOnly":true,"description":"The panel's own headline for this campaign, or null where it surfaced the campaign without making one. Null is the common case and is not a fault.\n"},"evidence":{"$ref":"#/components/schemas/EmailCompetitiveNotableEvidence","readOnly":true,"description":"The figures behind the signal, for ordering or filtering the list."},"mailbox_provider":{"oneOf":[{"$ref":"#/components/schemas/EmailCompetitivePanelMailboxProvider"},{"type":"null"}],"readOnly":true,"description":"The provider a `landing_in_spam` campaign was heavily filed as spam at: spam placement is measured per provider, and this campaign's problem is at one of them. Null on every other signal.\n"},"campaign":{"$ref":"#/components/schemas/EmailCompetitiveCampaign","description":"The campaign itself. Two of its fields behave differently here than on the brand's\ncampaign feed, because the panel sends less about a campaign it surfaced this way.\n\n`has_creative` reports whether a capture came back with this entry rather than whether\nthe panel ever captured the email, and captures are frequently absent here by design, so\nexpect `false` on campaigns the panel did image. `reach` is null on every entry, because\nthe panel does not estimate an audience for the campaigns it surfaces.\n"}}},"EmailCompetitiveNotableFeed":{"type":"object","additionalProperties":false,"description":"Campaigns worth a second look across the brands a workspace watches.","required":["period","panel_status","data","truncated"],"properties":{"period":{"$ref":"#/components/schemas/EmailCompetitivePeriod","description":"The period the campaigns were observed in, as the panel resolved it.\n\nTwo things differ from the other competitive reads. It ends at the last instant of\nthe previous whole day rather than at the moment of the request, so a campaign sent\nthis morning is never among these. And the panel holds its selection for a period\nonce it has made it, so two requests a minute apart return the same campaigns rather\nthan differing slightly.\n"},"panel_status":{"$ref":"#/components/schemas/EmailCompetitivePanelStatus","description":"Whether the panel could be read for this feed, and when it could not, why."},"data":{"type":"array","readOnly":true,"maxItems":100,"description":"Up to 100 campaigns selected across watched brands. Selection takes turns across\nbrands in watchlist order until the response is full, prioritizing spam placement,\nbiggest sends, then read-rate standouts within each brand. Within one signal, rows\ncompare the matching spam rate, volume ratio, or read rate descending; missing values\nsort last and ties retain tracked-domain and source order. Selected rows are returned\nin watchlist order, then biggest-send, read-rate, and spam signal order, followed by\ntracked-domain and source order.\n\nOne campaign may appear once per signal because each row carries different evidence.\nEmpty when nothing qualified; check `panel_status` to distinguish that from an\nunavailable panel.\n","items":{"$ref":"#/components/schemas/EmailCompetitiveNotableCampaign"}},"truncated":{"type":"boolean","readOnly":true,"description":"Whether Bird omitted eligible panel findings to keep this response to 100 rows. False does not promise that the panel observed every qualifying campaign in the period.\n","example":false}}},"EmailCompetitiveBrandID":{"type":"string","minLength":1,"maxLength":19,"pattern":"^[0-9]+$","description":"Identifier of the brand in the panel's catalog, used to add it to the watchlist. It is a string for the same reason a campaign id is: the values are wide enough that a client storing every number as a floating point value would round them, and a rounded identifier matches no brand at all.\n","example":"81531"},"EmailCompetitiveWatchlistBrandCreate":{"type":"object","additionalProperties":false,"description":"The brand to add to the watchlist. Obtained from a brand search, which only returns brands that can be watched.\n","required":["brand_id"],"properties":{"brand_id":{"$ref":"#/components/schemas/EmailCompetitiveBrandID"}}},"EmailCompetitiveWatchlistBrand":{"description":"A brand on the workspace's watchlist. This is the watchlist entry itself, with no figures on it; read the watchlist to get those.\n","unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/Timestamps"},{"type":"object","required":["id","brand_id","name","industry","sending_domains"],"properties":{"id":{"$ref":"#/components/schemas/CompetitiveWatchlistBrandID","readOnly":true,"description":"The watchlist entry."},"brand_id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailCompetitiveBrandID"}]},"name":{"type":"string","minLength":1,"readOnly":true,"description":"The brand's name when it was added. It is kept as it was so the row still reads correctly if the brand is later renamed or stops being tracked.\n","example":"Everlane"},"industry":{"type":["string","null"],"readOnly":true,"description":"The brand's industry when it was added, or null when the brand is not classified.","example":"DTC Apparel"},"sending_domains":{"type":"array","minItems":1,"readOnly":true,"description":"The domains this brand's figures describe. Always one domain today, chosen as the one the panel sees the most of its mail from.\n","items":{"type":"string","minLength":1},"example":["everlane.com"]}}}]},"EmailCompetitiveProviderPlacement":{"type":"object","additionalProperties":false,"description":"How one mailbox provider treated a brand's mail, beside your own.","required":["mailbox_provider","inbox_rate","spam_rate","workspace_inbox_rate"],"properties":{"mailbox_provider":{"$ref":"#/components/schemas/EmailCompetitivePanelMailboxProvider","readOnly":true,"description":"The provider whose treatment of the brand's mail this row describes."},"inbox_rate":{"type":"number","readOnly":true,"description":"Share of the brand's mail this provider put in the inbox. Recomputed from what the panel observed across every domain the brand sends from, so a small subdomain cannot move it as much as the brand's main one.\n","example":0.862},"spam_rate":{"type":"number","readOnly":true,"description":"Share of the brand's mail this provider put in spam.","example":0.091},"workspace_inbox_rate":{"type":["number","null"],"readOnly":true,"description":"Your own inbox rate at this provider, null when you have not sent or the panel has no breakdown for your sending domain. It is the panel's view of your sending rather than from our own measurement of it, because a measured rate and a rate the panel estimated are not comparable, and this figure exists to be compared with the brand's.\n","example":0.921}}},"EmailCompetitiveBrandProfile":{"type":"object","additionalProperties":false,"description":"One watched brand's figures for the period, with its placement broken out by mailbox provider.","required":["period","brand","providers"],"properties":{"period":{"$ref":"#/components/schemas/EmailCompetitivePeriod","description":"The period every figure covers."},"brand":{"$ref":"#/components/schemas/EmailCompetitiveWatchlistRow","description":"The figures the watchlist reports for this brand, derived the same way. Estimated\nvolume can differ very slightly between the two views, because each request asks the\npanel about a different set of domains and the panel scales its estimate per request.\n\n`esp` and `list_size` are populated here; the watchlist reports both as null.\n"},"providers":{"type":"array","readOnly":true,"description":"Placement per mailbox provider, in the order the panel returned them. Empty when the panel published no breakdown for the brand's domains.\n","items":{"$ref":"#/components/schemas/EmailCompetitiveProviderPlacement"}}}},"EmailCompetitiveCampaignSort":{"type":"string","minLength":1,"description":"Field used to sort campaigns.","enum":["sent_at"],"default":"sent_at","example":"sent_at"},"EmailCompetitiveCampaignFeed":{"description":"A page of campaigns returned for a watched brand over the period.","allOf":[{"type":"object","required":["period","panel_status","captured","promo_rate","truncated","data"],"properties":{"period":{"$ref":"#/components/schemas/EmailCompetitivePeriod","description":"The rolling period used for this request."},"panel_status":{"$ref":"#/components/schemas/EmailCompetitivePanelStatus","description":"For this campaign feed, no_data means the requested page is empty; it does not mean the whole period has no campaigns."},"captured":{"type":"integer","readOnly":true,"description":"Number of eligible campaigns in the first 100 newest panel rows for each tracked domain. This sampled value is independent of the returned page.\n","example":38},"promo_rate":{"type":["number","null"],"readOnly":true,"description":"Fraction of captured campaigns whose subject contains a recognized percentage-discount offer. Dollar discounts and free-shipping offers do not count. Null when captured is zero. This sampled value is independent of the returned page.\n","example":0.64},"truncated":{"type":"boolean","readOnly":true,"description":"Whether the sampled statistics or returned page omit part of the requested collection. Use next_cursor to determine whether another page is available.\n","example":false},"data":{"type":"array","readOnly":true,"description":"Campaigns in this page, in the requested order.","items":{"$ref":"#/components/schemas/EmailCompetitiveCampaign"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}],"unevaluatedProperties":false},"EmailCompetitiveWeekday":{"type":"string","minLength":1,"description":"A day of the week. Named rather than numbered because the two common numberings disagree about which day the week starts on.\n","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],"example":"tuesday"},"EmailCompetitiveSendTimeCell":{"type":"object","additionalProperties":false,"description":"One weekday and hour of a brand's sending week.","required":["weekday","hour","share_percent","intensity","sample_days"],"properties":{"weekday":{"$ref":"#/components/schemas/EmailCompetitiveWeekday","readOnly":true,"description":"The day of the week this hour falls on."},"hour":{"type":"integer","readOnly":true,"minimum":0,"maximum":23,"description":"The hour this cell covers, in the timezone the response reports. `13` covers 13:00 to 14:00.\n","example":13},"share_percent":{"type":"number","readOnly":true,"description":"Share of everything the brand sent over the period that fell in this hour. It is `0` for an hour the brand demonstrably did not send in, which on a disciplined sender is the most useful thing this grid says.\n","example":3.4},"intensity":{"type":"number","readOnly":true,"minimum":0,"maximum":1,"description":"How strongly the brand sends in this hour, against its own busiest hour at `1`.\nIt is this cell's sending per `sample_days` divided by the busiest cell's, so it\nis derivable from the two numbers beside it and reconciles with them rather than\ncompeting: it is published because that correction is easy to get wrong, not\nbecause it knows anything they do not.\n\nShade a cell by this rather than by `share_percent`: the period holds one more\nof some weekdays than others, so a share compares an hour that came round\nthirteen times against one that came round twelve.\n","example":0.55},"sample_days":{"type":"integer","readOnly":true,"description":"How many days of the period fell on this weekday, whether or not the brand sent on them. It is what separates an hour the brand is quiet in from one there was little chance to observe.\n","example":13}}},"EmailCompetitiveSendTimePeak":{"type":"object","additionalProperties":false,"description":"The hour of the day a brand sends most of its mail in.","required":["start_hour","end_hour","share_percent"],"properties":{"start_hour":{"type":"integer","readOnly":true,"minimum":0,"maximum":23,"description":"The first hour of the window, in the timezone the response reports.","example":13},"end_hour":{"type":"integer","readOnly":true,"minimum":0,"maximum":23,"description":"The hour the window ends at, exclusive: a window of `13` to `14` covers 13:00 to\n14:00. The window is always one hour wide on this endpoint, so this is always the\nhour after `start_hour`. The pair is kept rather than collapsed because the panel\ncomputes the window at whatever width it was asked for, and only this endpoint\npins that to an hour.\n\nIt can therefore be lower than `start_hour` in exactly one case: a peak at 23:00,\nwhose window runs past midnight and ends at `0`.\n","example":14},"share_percent":{"type":"number","readOnly":true,"description":"Share of everything the brand sent over the period that fell in this window.\n\nThis is the panel's own figure, while a cell's `share_percent` is recomputed from\nthe cells in the response. Adding up this hour's seven cells should therefore land\non this number but is not guaranteed to; where they disagree, this one is the\npanel's answer about its own peak and the cells are the arithmetic behind the grid.\n","example":13.1}}},"EmailCompetitiveSendTimeGrid":{"type":"object","additionalProperties":false,"description":"When a watched brand sends, by weekday and hour of the day.","required":["period","timezone","panel_status","cells","peak_send_window"],"properties":{"period":{"$ref":"#/components/schemas/EmailCompetitivePeriod","description":"The period the grid covers. It is always the last 90 days, whatever range the\nrest of the brand's figures are shown over: an hour of the week comes round\nabout thirteen times in 90 days and once in a week, and a pattern drawn from\none observation per cell is noise.\n\nTwo things differ from the other competitive reads. It ends at the start of a\nday rather than at the moment of the request, and the panel answers repeat\nrequests from a cache it holds for a day, so two requests a minute apart return\nidentical figures and this grid can be up to a day behind the figures shown\nbeside it.\n"},"timezone":{"$ref":"#/components/schemas/Timezone","readOnly":true,"description":"The timezone the hours are reported in. Label the grid from this rather than from what was requested: a response the panel could not answer reports UTC whatever was asked for.\n"},"panel_status":{"$ref":"#/components/schemas/EmailCompetitivePanelStatus","description":"Why the grid is empty, when it is."},"cells":{"type":"array","readOnly":true,"description":"Every weekday and hour of the week, Monday first and hour ascending: 168 in all, whether or not the brand sent in them, so the grid needs no filling in. Empty when there was nothing to read, which `panel_status` explains.\n","items":{"$ref":"#/components/schemas/EmailCompetitiveSendTimeCell"}},"peak_send_window":{"oneOf":[{"$ref":"#/components/schemas/EmailCompetitiveSendTimePeak"},{"type":"null"}],"readOnly":true,"description":"The hour of the day the brand sends most of its mail in, totalled across the whole week, or null when nothing was observed. It carries no weekday: for most brands the hour of the day is where the pattern is and the day of the week barely moves, so naming a busiest weekday would give a figure more meaning than it has. It is also not always the darkest cell, on the same reasoning: one busy Wednesday can outweigh the hour the brand mails in every single day.\n"}}},"EmailCompetitiveBrandMatch":{"type":"object","additionalProperties":false,"description":"A brand matching a search, ready to be added to the watchlist.","required":["brand_id","name","sending_domains"],"properties":{"brand_id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailCompetitiveBrandID"}]},"name":{"type":"string","minLength":1,"readOnly":true,"description":"The brand's name.","example":"Everlane"},"sending_domains":{"type":"array","minItems":1,"readOnly":true,"description":"The domains this brand's figures would describe. Always one domain today, chosen as the one the panel sees the most of its mail from.\n","items":{"type":"string","minLength":1},"example":["everlane.com"]}}},"EmailCompetitiveBrandSearchResults":{"type":"object","additionalProperties":false,"description":"Brands matching the search. Ranked by how well they match, best first, and capped at 8 results because this backs a type-ahead. The panel's own answer is often shorter than the cap, in which case the cap was never the reason the list is short.\n","required":["data"],"properties":{"data":{"type":"array","readOnly":true,"description":"Watchable matches returned for this query. A capped search or an unresolved sending domain can omit a brand; an empty result does not establish that the panel has never observed it.\n","items":{"$ref":"#/components/schemas/EmailCompetitiveBrandMatch"}}}},"EmailCompetitiveVolumePoint":{"type":"object","additionalProperties":false,"description":"One day of one line on the volume chart.","required":["date","sends"],"properties":{"date":{"type":"string","format":"date","minLength":1,"readOnly":true,"description":"The UTC day this point covers.","example":"2026-08-09"},"sends":{"type":"integer","format":"int64","readOnly":true,"description":"Volume for the day. An estimate for a competitor and an exact count for your own line; `source` on the series records which. A day nothing was observed is `0` rather than a missing point, so every line shares one axis.\n","example":41800}}},"EmailCompetitiveBrandSeries":{"type":"object","additionalProperties":false,"description":"One line on the volume chart: a watched brand's sending over time, or your own.\n","required":["is_workspace","name","sending_domains","panel_status","source","points"],"properties":{"watchlist_brand_id":{"$ref":"#/components/schemas/CompetitiveWatchlistBrandID","readOnly":true,"description":"The watchlist entry this line describes. Absent on your own line, which is not a watchlist entry."},"is_workspace":{"type":"boolean","readOnly":true,"description":"True on the line describing your own workspace's sending.","example":false},"name":{"type":"string","minLength":1,"readOnly":true,"description":"Label for the line: the brand's name, or your sending domain on your own line.","example":"Everlane"},"sending_domains":{"type":"array","minItems":1,"readOnly":true,"description":"The sending domains the line's figures describe. Always one domain today.","items":{"type":"string","minLength":1},"example":["everlane.com"]},"panel_status":{"$ref":"#/components/schemas/EmailCompetitivePanelStatus","description":"Why a line has no volume in it. Always `ok` on your own line, which is counted rather than read from the panel.\n"},"source":{"$ref":"#/components/schemas/EmailCompetitiveFieldSource","description":"Where the line came from. Your own is an exact count of what was accepted for delivery; a competitor's is the panel's estimate of everything they sent. The two share an axis while resting on different measurements, so a chart that compares them should say so.\n"},"points":{"type":"array","readOnly":true,"description":"One point per day of the period, oldest first, ending with the last whole UTC day rather than the one in progress. A domain the panel tracks but observed nothing for plots as zeros, which is a measured silence rather than a missing measurement. Points are empty only when there was nothing to plot at all, reported by `panel_status` as `not_in_panel` or `unavailable`.\n","items":{"$ref":"#/components/schemas/EmailCompetitiveVolumePoint"}}}},"EmailCompetitiveVolumeSeries":{"type":"object","additionalProperties":false,"description":"Volume over time for the requested watched brands, plus your own sending, on one shared daily axis.\n","required":["period","data"],"properties":{"period":{"$ref":"#/components/schemas/EmailCompetitivePeriod","description":"The period every line covers."},"data":{"type":"array","readOnly":true,"description":"Your own line first, then the requested brands in the order they were asked for. Your line is present once your workspace has sent email. Every line carries the same days in the same order, so they can be plotted against one axis without aligning them first.\n","items":{"$ref":"#/components/schemas/EmailCompetitiveBrandSeries"}}}},"EmailBlockSortField":{"type":"string","description":"Field used to order reusable email blocks.","enum":["created_at","name"],"default":"created_at"},"EmailBlockID":{"type":"string","minLength":1,"pattern":"^ebl_[0-9a-hjkmnp-tv-z]{26}$","example":"ebl_01krdgeqcxet5s7t44vh8rt9mg"},"EmailBlock":{"readOnly":true,"description":"A reusable email section with independently editable languages.","allOf":[{"type":"object","required":["id","name","source_language","revision","created_by"],"properties":{"id":{"$ref":"#/components/schemas/EmailBlockID"},"name":{"type":"string","description":"Name for people choosing the block, such as when linking it into a template.","minLength":1,"maxLength":100,"example":"Legal disclosure"},"description":{"type":"string","maxLength":2000,"description":"Optional notes for people maintaining the block. Omitted when empty."},"source_language":{"$ref":"#/components/schemas/LanguageTag"},"revision":{"type":"integer","format":"int64","minimum":1,"description":"Metadata revision to send when editing or duplicating this block.","example":1},"created_by":{"$ref":"#/components/schemas/Actor","description":"Who created the block. A duplicate is created by whoever duplicated it."},"archived_at":{"type":"string","format":"date-time","description":"Present when the block is archived. Retained published content remains readable."}}},{"$ref":"#/components/schemas/Timestamps"}],"unevaluatedProperties":false},"EmailBlockList":{"description":"A page of blocks.","allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailBlock"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}],"unevaluatedProperties":false},"EmailBlockFragment":{"type":"object","additionalProperties":false,"description":"One self-contained email section. Version 2 is a section written as HTML and sends `fragment_html` alone; the API, SDKs, CLI and MCP write version 2. Version 1 is reserved for sections built in the Bird dashboard's visual editor, and only the dashboard saves it. A block language keeps the version it was created with.","required":["serializer_version","fragment_html"],"not":{"required":["serializer_version","editor_state"],"properties":{"serializer_version":{"enum":[2]},"editor_state":{}}},"properties":{"serializer_version":{"type":"integer","minimum":1,"maximum":2,"description":"How this section is written. 2 is HTML written directly, and is the value to send from the API, SDKs, CLI and MCP. 1 is reserved for the Bird dashboard's visual editor; other callers get a `422` for it.","example":2},"fragment_html":{"type":"string","minLength":0,"maxLength":524288,"x-sensitive":true,"description":"Section HTML. Unfinished markup can be saved as a draft; validation checks readiness separately. A version 2 section is one presentation table with one `tbody`, `tr` and `td`, and all layout stays inside that cell. The cell sets `lang` to the block language and its own typography: `font-family`, a `font-size` in pixels, `font-style`, `font-weight`, `line-height`, `letter-spacing`, `text-align` (not `start` or `end`), `text-transform`, `color`, `margin` and `padding`. Root-relative units such as `rem` are refused; use px, em or percentages. Liquid stays balanced inside the cell, cannot use `assign`, `capture`, `increment` or `decrement`, and puts no control tag inside an attribute or style value. `{{ bird.unsubscribe_url }}` appears only as bare text or as the entire `href` of an `<a>`, and never inside an `if !mso` conditional comment, which Outlook skips. No document wrapper, `<style>`, script, form, `class` or `id` attribute. A table nested in the cell needs its own `<tbody>`. Inside a complete Outlook conditional comment, prefixed Office and VML elements such as `v:fill` may self-close, and a balanced `if !mso` conditional comment that shows its content outside Outlook is accepted when it holds no other conditional comment.","example":"<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tbody><tr><td lang=\"en\" style=\"font-family: Arial, sans-serif; font-size: 14px; font-style: normal; font-weight: normal; line-height: 20px; letter-spacing: normal; text-align: left; text-transform: none; color: #333333; margin: 0; padding: 16px;\"><p style=\"margin: 0;\">Your disclosure text.</p></td></tr></tbody></table>"}}},"EmailBlockCreate":{"type":"object","additionalProperties":false,"description":"Create an unpublished block and its source-language draft.","required":["name","source_language"],"properties":{"name":{"type":"string","description":"Name for people choosing the block, such as when linking it into a template.","minLength":1,"maxLength":100,"example":"Legal disclosure"},"description":{"type":"string","maxLength":2000,"description":"Optional notes for people maintaining the block."},"source_language":{"$ref":"#/components/schemas/LanguageTag"},"fragment":{"$ref":"#/components/schemas/EmailBlockFragment","description":"Initial source-language content, as an HTML section. Its `serializer_version` sets the language's authoring mode. Leaving it out returns a `422` `validation_error`, except in the Bird dashboard, which starts an empty visual draft."}},"example":{"name":"Legal disclosure","source_language":"en","fragment":{"serializer_version":2,"fragment_html":"<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tbody><tr><td lang=\"en\" style=\"font-family: Arial, sans-serif; font-size: 14px; font-style: normal; font-weight: normal; line-height: 20px; letter-spacing: normal; text-align: left; text-transform: none; color: #333333; margin: 0; padding: 16px;\"><p style=\"margin: 0;\">Your disclosure text.</p></td></tr></tbody></table>"}}},"EmailBlockFragmentValidationRequest":{"type":"object","additionalProperties":false,"description":"Check a section's markup, variables and contact properties without saving it.","required":["language","fragment"],"properties":{"language":{"$ref":"#/components/schemas/LanguageTag"},"fragment":{"$ref":"#/components/schemas/EmailBlockFragment"}},"example":{"language":"en","fragment":{"serializer_version":2,"fragment_html":"<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tbody><tr><td lang=\"en\" style=\"font-family: Arial, sans-serif; font-size: 14px; font-style: normal; font-weight: normal; line-height: 20px; letter-spacing: normal; text-align: left; text-transform: none; color: #333333; margin: 0; padding: 16px;\"><p style=\"margin: 0;\">Your disclosure text.</p></td></tr></tbody></table>"}}},"EmailBlockFragmentValidation":{"type":"object","additionalProperties":false,"description":"Successful section validation. Validation neither saves nor publishes content.","required":["text"],"properties":{"text":{"type":"string","x-sensitive":true,"minLength":0,"description":"Plain text derived from this section's HTML."}}},"EmailBlockUpdate":{"type":"object","additionalProperties":false,"description":"Change block metadata without changing its content or publication state.","required":["revision"],"properties":{"revision":{"type":"integer","format":"int64","minimum":1,"description":"Metadata revision last read. A concurrent change returns 409.","example":1},"name":{"type":"string","description":"New name for the block.","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":2000,"description":"Replacement maintenance notes. Send an empty string to clear them."},"source_language":{"$ref":"#/components/schemas/LanguageTag","description":"An existing block language. It can change only before the first publication."},"archived":{"type":"boolean","description":"Archive or unarchive the block. Archiving retains its content and history."}}},"EmailBlockDuplicate":{"type":"object","additionalProperties":false,"description":"Copy all current draft languages into a new unpublished block.","required":["revision","name"],"properties":{"revision":{"type":"integer","format":"int64","minimum":1,"description":"Source metadata revision last read. A change while copying returns 409.","example":1},"name":{"type":"string","description":"Name for the new block.","minLength":1,"maxLength":100,"example":"Legal disclosure copy"}}},"EmailBlockPublishLanguage":{"type":"object","additionalProperties":false,"description":"One language to publish and the draft revision it must still be at.","required":["language","revision"],"properties":{"language":{"$ref":"#/components/schemas/LanguageTag"},"revision":{"type":"integer","format":"int64","minimum":1,"description":"Draft revision last read. A newer saved draft returns 409.","example":8}}},"EmailBlockPublish":{"type":"object","additionalProperties":false,"description":"Publish the current drafts of the named languages. They go live together or not at all.","required":["languages"],"properties":{"languages":{"type":"array","minItems":1,"maxItems":25,"description":"Languages to publish, each with the draft revision last read.","items":{"$ref":"#/components/schemas/EmailBlockPublishLanguage"}},"confirm":{"type":"boolean","default":false,"description":"Publish even though live templates that use this block will start requiring inputs this publication adds. Without it, such a publication returns 409 naming the inputs and templates."}},"example":{"languages":[{"language":"en","revision":2}]}},"EmailBlockSubmissionID":{"type":"string","minLength":1,"pattern":"^ebs_[0-9a-hjkmnp-tv-z]{26}$","example":"ebs_01krdgeqcxet5s7t44vh8rt9mg"},"EmailBlockSubmissionStatus":{"type":"string","minLength":1,"x-extensible-enum":["published"],"description":"Where a block change is in its lifecycle. `published` means its revisions are live. New values may be added; treat an unknown value as not yet live.","example":"published"},"EmailBlockRevisionID":{"type":"string","minLength":1,"pattern":"^ebr_[0-9a-hjkmnp-tv-z]{26}$","example":"ebr_01krdgeqcxet5s7t44vh8rt9mg"},"EmailBlockSubmissionLanguage":{"type":"object","readOnly":true,"additionalProperties":false,"description":"One language included in a block change.","required":["language","draft_revision","candidate_revision_id"],"properties":{"language":{"$ref":"#/components/schemas/LanguageTag"},"draft_revision":{"type":"integer","format":"int64","minimum":1,"description":"Draft revision this snapshot was taken from.","example":8},"candidate_revision_id":{"$ref":"#/components/schemas/EmailBlockRevisionID","description":"Immutable snapshot of the draft at that revision."}}},"EmailBlockPublishedRevision":{"type":"object","readOnly":true,"additionalProperties":false,"description":"A revision that became the published content of one block language.","required":["language","id","version_number"],"properties":{"language":{"$ref":"#/components/schemas/LanguageTag"},"id":{"$ref":"#/components/schemas/EmailBlockRevisionID"},"version_number":{"type":"integer","format":"int64","minimum":1,"description":"Publication number within this block language.","example":3}}},"EmailBlockSubmission":{"type":"object","readOnly":true,"additionalProperties":false,"description":"One block change put forward for publication. A change that needs no review is recorded already published.","required":["id","block_id","status","languages","published_revisions","published_at","created_at"],"properties":{"id":{"$ref":"#/components/schemas/EmailBlockSubmissionID"},"block_id":{"$ref":"#/components/schemas/EmailBlockID"},"status":{"$ref":"#/components/schemas/EmailBlockSubmissionStatus"},"languages":{"type":"array","description":"Each included language, the draft revision it was taken from, and the snapshot frozen for it.","items":{"$ref":"#/components/schemas/EmailBlockSubmissionLanguage"}},"published_revisions":{"type":"array","description":"The revisions that became live when this change was published.","items":{"$ref":"#/components/schemas/EmailBlockPublishedRevision"}},"published_at":{"type":"string","format":"date-time","minLength":1,"example":"2026-05-25T16:42:01Z"},"created_at":{"type":"string","format":"date-time","minLength":1,"example":"2026-05-25T16:42:01Z"}}},"EmailAuthoringMode":{"type":"string","minLength":1,"readOnly":true,"x-extensible-enum":["visual","html"],"description":"How this language is edited. `html` content is written as HTML and can be changed through the API, CLI and MCP. `visual` content is built in the Bird dashboard's visual editor; outside the dashboard, a visual section can still be copied by duplicating its block or restoring a published revision. The mode follows from the stored content and cannot be set directly. New values may be added; treat an unknown value as content you cannot edit through the API, CLI or MCP.","example":"html"},"EmailBlockLanguageFields":{"type":"object","required":["language","revision","authoring_mode"],"properties":{"language":{"$ref":"#/components/schemas/LanguageTag"},"revision":{"type":"integer","format":"int64","minimum":1,"description":"Draft revision to send back when saving or publishing this language, as last returned. It is not a publication number; a published revision is a separate record numbered by `version_number`.","example":1},"authoring_mode":{"$ref":"#/components/schemas/EmailAuthoringMode"},"source_revision_id":{"$ref":"#/components/schemas/EmailBlockRevisionID","description":"Published source-language revision used for this translation. Omitted when untracked."},"published_revision_id":{"$ref":"#/components/schemas/EmailBlockRevisionID","description":"Current published revision for this exact language. Omitted before publication."}}},"EmailBlockLanguageSummary":{"readOnly":true,"description":"One language's draft revision and publication references, without its content.","allOf":[{"$ref":"#/components/schemas/EmailBlockLanguageFields"},{"$ref":"#/components/schemas/Timestamps"}],"unevaluatedProperties":false},"EmailBlockLanguageList":{"type":"object","additionalProperties":false,"description":"All block languages, ordered by language tag. A block holds at most 25 languages.","required":["data"],"properties":{"data":{"type":"array","maxItems":25,"items":{"$ref":"#/components/schemas/EmailBlockLanguageSummary"}}}},"EmailBlockLanguage":{"readOnly":true,"description":"Editable content for one exact language. No language fallback is applied.","allOf":[{"$ref":"#/components/schemas/EmailBlockLanguageFields"},{"type":"object","required":["fragment"],"properties":{"fragment":{"$ref":"#/components/schemas/EmailBlockFragment"}}},{"$ref":"#/components/schemas/Timestamps"}],"unevaluatedProperties":false,"example":{"language":"en","revision":2,"authoring_mode":"html","published_revision_id":"ebr_01krdgeqcxet5s7t44vh8rt9mg","fragment":{"serializer_version":2,"fragment_html":"<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tbody><tr><td lang=\"en\" style=\"font-family: Arial, sans-serif; font-size: 14px; font-style: normal; font-weight: normal; line-height: 20px; letter-spacing: normal; text-align: left; text-transform: none; color: #333333; margin: 0; padding: 16px;\"><p style=\"margin: 0;\">Your disclosure text.</p></td></tr></tbody></table>"},"created_at":"2026-05-20T09:14:52Z","updated_at":"2026-05-25T16:42:01Z"}},"EmailBlockLanguageUpsert":{"type":"object","additionalProperties":false,"description":"Save a full draft section or copy a retained published revision into its draft. Supply exactly one of fragment or from_revision_id. Copying a revision preserves its source reference and never republishes it. source_revision_id is accepted only with authored fragment content; omitting it clears translation provenance. A new language takes the authoring mode of its first fragment, and an existing language keeps its mode: content in the other mode returns 422.","required":["revision"],"anyOf":[{"required":["fragment"]},{"required":["from_revision_id"]}],"not":{"anyOf":[{"required":["fragment","from_revision_id"],"properties":{"fragment":{},"from_revision_id":{}}},{"required":["source_revision_id","from_revision_id"],"properties":{"source_revision_id":{},"from_revision_id":{}}}]},"properties":{"revision":{"type":"integer","format":"int64","minimum":0,"description":"Draft revision last read, or zero to create a missing language. A concurrent change returns 409.","example":1},"fragment":{"$ref":"#/components/schemas/EmailBlockFragment"},"source_revision_id":{"$ref":"#/components/schemas/EmailBlockRevisionID","description":"Published source-language revision this translation was made from. Accepted with `fragment` only; leaving it out clears the reference."},"from_revision_id":{"$ref":"#/components/schemas/EmailBlockRevisionID","description":"Published revision of this language to copy back into the draft, sent instead of `fragment`. Copying never publishes."}},"example":{"revision":1,"fragment":{"serializer_version":2,"fragment_html":"<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tbody><tr><td lang=\"en\" style=\"font-family: Arial, sans-serif; font-size: 14px; font-style: normal; font-weight: normal; line-height: 20px; letter-spacing: normal; text-align: left; text-transform: none; color: #333333; margin: 0; padding: 16px;\"><p style=\"margin: 0;\">Your disclosure text.</p></td></tr></tbody></table>"}}},"EmailBlockRevisionSortField":{"type":"string","description":"Field used to order a block language's published revisions.","enum":["version_number"],"default":"version_number"},"EmailBlockRevisionFields":{"type":"object","readOnly":true,"required":["id","version_number","serializer_version","authoring_mode","published_by","published_at","created_at"],"properties":{"id":{"$ref":"#/components/schemas/EmailBlockRevisionID"},"version_number":{"type":"integer","format":"int64","minimum":1,"description":"Publication number within this block language. A draft's `revision` is the value to send back when saving, not a publication number.","example":1},"serializer_version":{"type":"integer","minimum":1,"description":"Format used to save and render this section: 2 for a section written as HTML, 1 for one built in the Bird dashboard's visual editor.","example":2},"authoring_mode":{"$ref":"#/components/schemas/EmailAuthoringMode"},"source_revision_id":{"$ref":"#/components/schemas/EmailBlockRevisionID","description":"Source-language revision used for this translation. Omitted when untracked."},"published_by":{"$ref":"#/components/schemas/Actor","description":"Who published this revision."},"published_at":{"type":"string","format":"date-time","minLength":1,"example":"2026-05-25T16:42:01Z"},"created_at":{"type":"string","format":"date-time","minLength":1,"example":"2026-05-25T16:42:01Z"}}},"EmailBlockRevisionSummary":{"readOnly":true,"description":"A retained publication without its content.","allOf":[{"$ref":"#/components/schemas/EmailBlockRevisionFields"}],"unevaluatedProperties":false},"EmailBlockRevisionList":{"description":"A page of published block revisions.","allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailBlockRevisionSummary"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}],"unevaluatedProperties":false},"EmailBlockRevision":{"readOnly":true,"description":"Retained published content for one exact block language.","allOf":[{"$ref":"#/components/schemas/EmailBlockRevisionFields"},{"type":"object","readOnly":true,"required":["fragment"],"properties":{"fragment":{"$ref":"#/components/schemas/EmailBlockFragment"}}}],"unevaluatedProperties":false,"example":{"id":"ebr_01krdgeqcxet5s7t44vh8rt9mg","version_number":1,"serializer_version":2,"authoring_mode":"html","published_by":{"id":"key_01krdgeqcxet5s7t44vh8rt9mg","type":"api_key","display_name":"Release pipeline"},"fragment":{"serializer_version":2,"fragment_html":"<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tbody><tr><td lang=\"en\" style=\"font-family: Arial, sans-serif; font-size: 14px; font-style: normal; font-weight: normal; line-height: 20px; letter-spacing: normal; text-align: left; text-transform: none; color: #333333; margin: 0; padding: 16px;\"><p style=\"margin: 0;\">Your disclosure text.</p></td></tr></tbody></table>"},"published_at":"2026-05-25T16:42:01Z","created_at":"2026-05-25T16:42:01Z"}},"EmailTemplateCategory":{"type":"string","minLength":1,"enum":["transactional","marketing"],"description":"Whether the template is for `transactional` email or `marketing` email."},"EmailTemplateSource":{"type":"string","minLength":1,"x-extensible-enum":["html"],"description":"The authoring format the template is written in, fixed at creation. `html` is finished markup you provide, optionally personalized with Liquid."},"EmailTemplateThemeFilter":{"type":"string","enum":["arcane","barebone","matte","protocol","studio"],"description":"Filter by the visual theme a built-in template is designed in. Only built-in `system` templates have a theme, so naming one returns built-ins alone."},"EmailTemplateTheme":{"type":"string","minLength":1,"x-extensible-enum":["arcane","barebone","matte","protocol","studio"],"description":"The visual theme a built-in template is designed in. Each of the catalog's five themes ships its own set of eight emails, and the sets overlap only partly, so the theme is what you choose between once you know which email you want. Only our built-in `system` templates have one."},"EmailTemplateLanguageState":{"type":"object","additionalProperties":false,"description":"Where one of the template's languages stands: whether sends are using it, and whether its draft contains an unpublished edit.\n","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/TemplateLanguageStatus"},"draft":{"type":"boolean","readOnly":true,"description":"Whether the draft holds an edit to this language that has not been published. If this is true and the status is `live`, sends are still using the older content, and your edit goes out the next time you submit.\n"}}},"EmailTemplateSummary":{"type":"object","additionalProperties":false,"required":["id","workspace_id","slug","name","scope","status","category","source","theme","draft_version_id","live_version_id","published_version_id","live_version_number","languages","default_language","live_default_language","available_languages","description","last_submitted_at","created_at","updated_at"],"properties":{"id":{"readOnly":true,"description":"Template ID.","$ref":"#/components/schemas/EmailTemplateID"},"workspace_id":{"readOnly":true,"description":"The workspace that owns the template. Null for a built-in `system` template, which no workspace owns.","oneOf":[{"$ref":"#/components/schemas/WorkspaceID"},{"type":"null"}]},"slug":{"allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"readOnly":true,"description":"The name you send the template by. You can use either the slug or the id when you send. It never changes after the template is created. A built-in `system` template's slug always starts with `bird_`.","example":"welcome-email"},"name":{"type":"string","minLength":1,"maxLength":255,"description":"The template's display name, shown wherever the template is listed. You can change it any time. It defaults to the slug if you do not set one.","example":"Welcome email"},"description":{"type":["string","null"],"description":"What the template is for, in your own words. Null if you have not set one."},"scope":{"example":"workspace","$ref":"#/components/schemas/TemplateScope"},"status":{"$ref":"#/components/schemas/TemplateStatus"},"category":{"$ref":"#/components/schemas/EmailTemplateCategory"},"source":{"$ref":"#/components/schemas/EmailTemplateSource"},"theme":{"readOnly":true,"description":"The visual theme a built-in template is designed in, or null for a template your workspace authored (which has no theme).","example":null,"oneOf":[{"$ref":"#/components/schemas/EmailTemplateTheme"},{"type":"null"}]},"draft_version_id":{"readOnly":true,"description":"The current editable draft version. Null for a built-in `system` template, which has no draft.","oneOf":[{"$ref":"#/components/schemas/EmailTemplateVersionID"},{"type":"null"}]},"live_version_id":{"readOnly":true,"description":"The version a send resolves to, or null if the template has never been published.","oneOf":[{"$ref":"#/components/schemas/EmailTemplateVersionID"},{"type":"null"}]},"published_version_id":{"readOnly":true,"deprecated":true,"description":"Deprecated: use `live_version_id` instead, which carries the same value.\n","oneOf":[{"$ref":"#/components/schemas/EmailTemplateVersionID"},{"type":"null"}]},"live_version_number":{"type":["integer","null"],"minimum":1,"readOnly":true,"description":"The live version's sequential number (1, 2, 3…), the same one version history reports, or null if the template has never been published. A built-in `system` template is permanently published as version 1. A rollback moves it backwards, because it names the version that is live rather than how many exist.\n"},"available_languages":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/LanguageTag"},"description":"The languages this template currently supports for sending, as BCP-47 tags. Empty until the template is published, because sends serve published content. This set may shrink for reasons other than editing, so read it rather than assuming it matches what was published.\n","example":["en"]},"default_language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The language the draft defaults to. Read this language's content when you have no particular preference for which one you want. It becomes the live version's default when the draft is submitted; until then `live_default_language` can differ.\n"},"live_default_language":{"oneOf":[{"$ref":"#/components/schemas/LanguageTag"},{"type":"null"}],"readOnly":true,"example":"en","description":"The live version's default language. While the template's `language_source_required` is false, a send that names no language gets it, and a broadcast that selects no language gets the default of the published version it sends. A single send that names a language also gets it when the template's `on_missing_language` is `fallback` and the live version stocks no form of that language, even one only the draft has added: a request for `pt-BR` is served by the live version's `pt-BR`, then by its `pt` or another `pt` variant, and only then by this default. Null if the template has never been published. A built-in `system` template is always published and reports the same language as `default_language`.\n"},"languages":{"type":"object","readOnly":true,"propertyNames":{"$ref":"#/components/schemas/LanguageTag"},"additionalProperties":{"$ref":"#/components/schemas/EmailTemplateLanguageState"},"description":"Every language this template has, keyed by language tag, each with its state. Enough to show which templates need attention in a list without a request per row.\n","example":{"en":{"status":"live"},"de":{"status":"draft"}}},"last_submitted_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this template was last submitted. Null if it never has been. Only submitting moves this timestamp, so a rollback keeps reporting the last real submit.\n"},"created_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was created. Null for a built-in `system` template."},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was last modified. Null for a built-in `system` template."}}},"EmailTemplateList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of email templates.","items":{"$ref":"#/components/schemas/EmailTemplateSummary"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"EmailTemplateSourceWrite":{"type":"string","minLength":1,"enum":["html"],"x-enum-varnames":["EmailTemplateSourceWriteHtml"],"description":"The authoring format to create the template in. `html` is finished markup you provide, optionally personalized with Liquid; a format the API cannot author yet is refused."},"EmailTemplateSharedBlockBinding":{"type":"object","additionalProperties":false,"description":"The shared block one occurrence in a template language links. The link follows the block's latest published content in that language.","required":["block_id"],"properties":{"block_id":{"$ref":"#/components/schemas/EmailBlockID"}}},"EmailTemplateSharedBlocks":{"type":"object","additionalProperties":false,"description":"Reusable block links in one template language, keyed by occurrence UUID. Each key matches one HTML comment marker `bird:shared-block:UUID` in the language's HTML. The template language selects the block language, and a link follows the block's latest publication in that language.","required":["version","bindings"],"properties":{"version":{"type":"integer","minimum":1,"maximum":1,"description":"Format of these shared section references.","example":1},"bindings":{"type":"object","maxProperties":100,"propertyNames":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","not":{"const":"00000000-0000-0000-0000-000000000000"}},"additionalProperties":{"$ref":"#/components/schemas/EmailTemplateSharedBlockBinding"},"description":"Block references keyed by occurrence UUID, with up to 100 occurrences per language.","example":{"3f2b9c1e-8a4d-4e6f-9b2a-7c5d1e0f4a3b":{"block_id":"ebl_01krdgeqcxet5s7t44vh8rt9mg"}}}}},"EmailTemplateLanguageContent":{"type":"object","additionalProperties":false,"description":"One language's content for an email template. Each language carries its own subject, preview text and bodies, so a translation can differ in wording and length from every other language without affecting them.\n","properties":{"has_shared_blocks":{"type":"boolean","readOnly":true,"description":"Whether this language links reusable blocks. On ordinary reads, the HTML shows each linked block's current published content and changes when a linked block is published; copying it to a new template creates independent content. Read the language with `authoring=true` for its HTML with block markers and its `shared_blocks`.\n"},"shared_blocks":{"readOnly":true,"description":"The language's block links. Returned only by `authoring=true` reads.","allOf":[{"$ref":"#/components/schemas/EmailTemplateSharedBlocks"}]},"subject":{"type":"string","maxLength":998,"description":"The email subject line for this language.","example":"Welcome to Acme, {{ bird.contact.first_name }}!"},"preview_text":{"type":"string","maxLength":255,"description":"The line an inbox shows after the subject in the message list, for this language. Leave it out and the inbox shows the opening words of the body instead. A mail client only reads it from the message body, so publishing folds it into the top of the HTML, hidden from view once the message is open; write it here rather than hiding your own copy in the body.\n","example":"{{ bird.contact.first_name }}, your order is on its way"},"html":{"type":"string","maxLength":524288,"description":"The HTML body for this language.","example":"<h1>Hi {{ bird.contact.first_name }}</h1>"},"text":{"type":"string","maxLength":524288,"description":"The plain-text body for this language. Omit it and a plain-text alternative is derived from the HTML when you submit.\n"}}},"EmailTemplateCreate":{"type":"object","additionalProperties":false,"description":"Parameters for creating an email template and its initial draft.","required":["slug","category","source"],"properties":{"slug":{"allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"description":"The template's workspace-unique handle, and a stable alternative to the template ID when sending by template. It can contain lowercase letters, numbers, hyphens, and underscores. It is fixed at creation, so pick it deliberately. Two prefixes are rejected: `bird_`, reserved for our built-in templates, and `emt_`, the template ID format, which a slug could never be distinguished from.\n","example":"welcome-email"},"name":{"type":"string","minLength":1,"maxLength":255,"description":"The template's display name, shown wherever the template is listed. You can change it any time. It defaults to the slug if you do not set one.\n","example":"Welcome email"},"description":{"type":"string","description":"What the template is for, in your own words.","example":"Sent to new customers after signup."},"category":{"$ref":"#/components/schemas/EmailTemplateCategory"},"source":{"allOf":[{"$ref":"#/components/schemas/EmailTemplateSourceWrite"}],"description":"The authoring format the template is written in, fixed at creation.\n`html` is finished markup you provide, optionally personalized with\nLiquid. Liquid supports variables, filters, and control flow such\nas `{% if %}` conditionals and `{% for %}` loops. A few constructs are\nrejected when you submit, and the error names exactly what to change:\n\n- Partial includes (`{% include %}`, `{% render %}`).\n- The `increment`, `decrement`, and `ifchanged` tags.\n- The `money`, `format_date`, `format_time`, `json`, `inspect`, and `type` filters.\n- Comparing against `empty`/`blank` (use `.size == 0` instead).\n- Blocks nested far deeper than real email markup needs.\n\nBroadcast template parameters accept scalar values; arrays and objects are unsupported.\nBroadcasts support `{% for %}` over a local collection created with `split`.\nBroadcasts without caller-supplied parameters also support literal ranges and\n`{% tablerow %}`. When a broadcast uses caller parameters, ranges and\n`{% tablerow %}` are unsupported.\n"},"languages":{"type":"object","maxProperties":25,"propertyNames":{"$ref":"#/components/schemas/LanguageTag"},"additionalProperties":{"$ref":"#/components/schemas/EmailTemplateLanguageContent"},"description":"The initial draft's content, keyed by language tag in BCP-47 form such as\n`en` or `pt-BR`. A template holds up to 25 languages, and a send picks one\nof them.\n\nOmit this to create an empty draft and add content later.\n\nThe example's `{{ first_name }}` is a parameter, filled from\n`template.parameters` at send time. A `{{ bird.contact.<attribute> }}`\nplaceholder reads a contact attribute. Broadcasts resolve each audience\ncontact during preparation; previews use the selected contact or sample\nvalues. Missing attributes use their configured fallbacks, while explicit\nempty strings remain empty.\n\nPublic API sends, including batch and scheduled sends, look up each To\naddress in this workspace when the selected language reads contact\nattributes. A missing contact returns `422` (`E04099`), even if Liquid\nsupplies a default. Each To receives its own personalized email, with Cc\nand Bcc copied on each. Resolved values are saved at acceptance for\ndelivery and later content reads.\n","example":{"en":{"subject":"Welcome, {{ first_name }}","preview_text":"Your account is ready","html":"<!DOCTYPE html>\n<html>\n<body>\n<p>Hi {{ first_name }}, thanks for signing up.</p>\n</body>\n</html>\n"}}},"default_language":{"$ref":"#/components/schemas/LanguageTag","example":"en","description":"The language a send uses when it does not name one, and the last resort when a requested language is not available. It has to be one of the languages you supply. If you leave it out, we default to `en`, unless you supply exactly one language, in which case we use that one instead. So if you supply two or more languages and `en` is not among them, you have to set this yourself.\n"},"on_missing_language":{"allOf":[{"$ref":"#/components/schemas/TemplateOnMissingLanguage"}],"default":"fallback","description":"What a send does when it asks for a language this template does not carry. Defaults to `fallback` on email.\n"},"language_source_required":{"type":"boolean","default":false,"description":"Whether a send has to name a language. Set it to true to reject a send that names none instead of serving the default language. Pair it with `on_missing_language: fail` when every send must pick a language deliberately: on its own, `fail` is bypassed by naming no language at all. A broadcast must select a template language when this is set. Defaults to false.\n"}}},"EmailTemplate":{"type":"object","additionalProperties":false,"required":["id","workspace_id","slug","name","scope","status","category","source","theme","draft_version_id","live_version_id","published_version_id","revision","languages","default_language","live_default_language","available_languages","on_missing_language","language_source_required","description","last_submitted_at","created_at","updated_at"],"properties":{"editor_url":{"type":"string","format":"uri","readOnly":true,"description":"Optional link to open the saved draft in the browser editor, in its default language. Absent for built-in templates.\n"},"id":{"readOnly":true,"description":"Template ID.","$ref":"#/components/schemas/EmailTemplateID"},"workspace_id":{"readOnly":true,"description":"The workspace that owns the template. Null for a built-in `system` template, which no workspace owns.","oneOf":[{"$ref":"#/components/schemas/WorkspaceID"},{"type":"null"}]},"slug":{"allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"readOnly":true,"description":"The name you send the template by. You can use either the slug or the id when you send. It never changes after the template is created. A built-in `system` template's slug always starts with `bird_`.","example":"welcome-email"},"name":{"type":"string","minLength":1,"maxLength":255,"description":"The template's display name, shown wherever the template is listed. You can change it any time. It defaults to the slug if you do not set one.","example":"Welcome email"},"description":{"type":["string","null"],"description":"What the template is for, in your own words. Null if you have not set one."},"scope":{"example":"workspace","$ref":"#/components/schemas/TemplateScope"},"status":{"$ref":"#/components/schemas/TemplateStatus"},"category":{"$ref":"#/components/schemas/EmailTemplateCategory"},"source":{"$ref":"#/components/schemas/EmailTemplateSource"},"theme":{"readOnly":true,"description":"The visual theme a built-in template is designed in, or null for a template your workspace authored (which has no theme).","example":null,"oneOf":[{"$ref":"#/components/schemas/EmailTemplateTheme"},{"type":"null"}]},"draft_version_id":{"readOnly":true,"description":"The current editable draft version. Null for a built-in `system` template, which has no draft.","oneOf":[{"$ref":"#/components/schemas/EmailTemplateVersionID"},{"type":"null"}]},"live_version_id":{"readOnly":true,"description":"The version a send resolves to, or null if the template has never been published.\n","oneOf":[{"$ref":"#/components/schemas/EmailTemplateVersionID"},{"type":"null"}]},"published_version_id":{"readOnly":true,"deprecated":true,"description":"Deprecated: use `live_version_id` instead, which carries the same value.\n","oneOf":[{"$ref":"#/components/schemas/EmailTemplateVersionID"},{"type":"null"}]},"revision":{"type":["integer","null"],"readOnly":true,"minimum":0,"description":"The draft's revision counter. Send it back on the next update to detect concurrent edits. Null for a built-in `system` template, which is unversioned."},"languages":{"type":"object","readOnly":true,"propertyNames":{"$ref":"#/components/schemas/LanguageTag"},"additionalProperties":{"$ref":"#/components/schemas/EmailTemplateLanguageState"},"description":"Every language this template has, keyed by language tag in BCP-47 form\nsuch as `en` or `pt-BR`, each with its state. One read tells you which\nlanguages are live and which have unpublished edits, without fetching any\ncontent.\n\nContent is not here: read a version's languages for that, one language at\na time.\n","example":{"en":{"status":"live"},"pt-BR":{"status":"live","draft":true},"de":{"status":"draft"}}},"default_language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The language the draft defaults to. This is the language `languages` is\nkeyed against while you edit, and it becomes the live version's default\nwhen you submit this draft.\n\nUntil then the live version keeps its own default, reported in\n`live_default_language`, so the two can differ. `available_languages`\ndescribes the live version for the same reason.\n"},"live_default_language":{"oneOf":[{"$ref":"#/components/schemas/LanguageTag"},{"type":"null"}],"readOnly":true,"example":"en","description":"The live version's default language. While `language_source_required` is false, a send that names no language gets it, and a broadcast that selects no language gets the default of the published version it sends. A single send that names a language also gets it when `on_missing_language` is `fallback` and the live version stocks no form of that language, even one only the draft has added: a request for `pt-BR` is served by the live version's `pt-BR`, then by its `pt` or another `pt` variant, and only then by this default. Null if the template has never been published. A built-in `system` template is always published and reports the same language as `default_language`.\n"},"available_languages":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/LanguageTag"},"description":"The languages this template currently supports for sending, as BCP-47 tags. Empty until the template is published, because sends serve published content. The set may shrink for reasons other than editing, so read it rather than assuming it matches what was published. A built-in `system` template has no publish step and always reports its one language.\n","example":["en"]},"on_missing_language":{"allOf":[{"$ref":"#/components/schemas/TemplateOnMissingLanguage"}],"readOnly":true,"description":"What a send does when it asks for a language this template does not carry. Defaults to `fallback` on email.\n"},"language_source_required":{"type":"boolean","readOnly":true,"description":"Whether a send has to name a language. When true, a send that names none is rejected instead of being served the default language. A broadcast must select a template language when this is set.\n"},"last_submitted_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this template was last submitted. Null if it never has been. Submitting is the only thing that moves this timestamp: rolling back changes which version is live without counting as a submit, so this keeps reporting the last real submit. Read it alongside `languages`, which says where each language stands.\n"},"created_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was created. Null for a built-in `system` template."},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the template was last modified. Null for a built-in `system` template."}}},"EmailTemplatePreviewContent":{"type":"object","additionalProperties":false,"description":"Unsaved email template content. Preview renders these fields instead of a stored draft; input analysis identifies their references without rendering.\n","properties":{"subject":{"type":"string","maxLength":998,"description":"The subject line, including any template expressions.","example":"Welcome to Acme, {{ bird.contact.first_name }}!"},"preview_text":{"type":"string","maxLength":255,"description":"Inbox preview text. Preview and publication fold it into the top of the HTML as a hidden preheader. Input analysis includes its references.\n","example":"{{ bird.contact.first_name }}, your order is on its way"},"html":{"type":"string","maxLength":524288,"description":"The HTML body, including any template expressions.","example":"<h1>Hi {{ bird.contact.first_name }}</h1>"},"text":{"type":"string","maxLength":524288,"description":"The plain-text body. When omitted, a plain-text alternative is derived from the HTML for preview, input analysis, and publication.\n"}}},"EmailTemplateDraftRevision":{"type":"integer","minimum":0,"description":"The draft revision you last read (from the template's `revision` field). A stale value returns a conflict so you can reload and retry.\n","example":3},"EmailTemplateUpdate":{"type":"object","additionalProperties":false,"description":"Partial update of a template's metadata and draft settings. Only the fields you send are changed. The rest are left as-is. Include the draft `revision` you last read so concurrent edits are detected. Content is not here: save a language on the draft version to change what the template says.\n","required":["revision"],"properties":{"revision":{"$ref":"#/components/schemas/EmailTemplateDraftRevision"},"name":{"type":"string","minLength":1,"maxLength":255,"description":"New display name, in free text. The slug stays fixed at creation, so renaming the template does not break whatever refers to it by slug or id.\n"},"description":{"type":["string","null"],"description":"What the template is for, in your own words. Send `null` to clear it."},"default_language":{"$ref":"#/components/schemas/LanguageTag","description":"New default language for the draft. Must be one of the languages the draft already has, so add the language first if it is not there yet.\n"},"on_missing_language":{"allOf":[{"$ref":"#/components/schemas/TemplateOnMissingLanguage"}],"description":"What a send does when it asks for a language this template does not carry.\n"},"language_source_required":{"type":"boolean","description":"Whether a send has to name a language. Turning it on rejects a send that names none instead of serving the default language. A broadcast must select a template language when this is set.\n"}}},"EmailTemplateDuplicate":{"type":"object","additionalProperties":false,"description":"Optional parameters when duplicating an email template. The body may be omitted entirely to accept the defaults.\n","properties":{"slug":{"allOf":[{"$ref":"#/components/schemas/TemplateSlug"}],"description":"The copy's workspace-unique handle, and the stable alternative to the template ID when sending by template. It can contain lowercase letters, numbers, hyphens, and underscores. Omit it to derive one from the source (for example, `welcome-email-copy`), with a numeric suffix if that slug is already taken. Two prefixes are rejected: `bird_`, reserved for our built-in templates, and `emt_`, the template ID format, which a slug could never be distinguished from. If you supply a slug that is already in use in the workspace, the request returns a conflict.\n","example":"welcome-email-copy"}}},"EmailTemplateParameterType":{"type":"string","minLength":1,"description":"The value type the template declares for a parameter. A broadcast can still supply any scalar value; see `value_domain`.\n\n- `text`: any value. A parameter the template uses without declaring it is reported as a required `text` parameter.\n- `code`: 4 to 8 digits.\n- `ttl`: a whole number from 1 to 999.\n- `count`: a whole number from 1 to 999.\n- `ref`: up to 16 uppercase letters, digits or hyphens.\n- `date`: an ISO 8601 date (YYYY-MM-DD). A date and time is also accepted and shows as its date.\n- `date_time`: an ISO 8601 date and time, with an optional offset.\n- `amount`: a decimal amount in major units, with up to 4 decimal places.\n- `currency`: a known ISO 4217 currency code of 3 uppercase letters.\n","x-extensible-enum":["text","code","ttl","count","ref","date","date_time","amount","currency"],"example":"text"},"EmailTemplateParameterValueDomain":{"type":"string","minLength":1,"description":"The shape of value a broadcast may supply for a parameter, independent of the declared `type`.\n\n- `scalar`: a string, number, boolean or null, used as given.\n","x-extensible-enum":["scalar"],"example":"scalar"},"EmailTemplateUseKind":{"type":"string","minLength":1,"description":"How the template uses a parameter or variable at one place in its content.\n\n- `value`: the template outputs or compares the value.\n- `iterable`: the template loops over the value.\n","x-extensible-enum":["value","iterable"],"example":"value"},"EmailTemplateUseSite":{"type":"string","minLength":1,"description":"The part of the published content where a parameter or variable is used.\n\n- `subject`: the subject line.\n- `html`: the HTML body, including its inbox preview text.\n- `text`: the plain-text body.\n","x-extensible-enum":["subject","html","text"],"example":"html"},"EmailTemplateUseConstraint":{"type":"object","additionalProperties":false,"required":["kind","site"],"description":"One place in the published content that uses a parameter or variable, and how it is used there.","properties":{"kind":{"$ref":"#/components/schemas/EmailTemplateUseKind"},"site":{"$ref":"#/components/schemas/EmailTemplateUseSite"},"path":{"type":"string","description":"The parameter or variable path the template reads at this place, such as `offer` or `bird.contact.first_name`."},"operation":{"type":"string","description":"How the template uses the parameter or variable here, passed through from the template. `output` means it writes the value; other values name the Liquid tag that reads it, such as `if`, `case`, `for` or `assign`."}}},"EmailTemplateParameter":{"type":"object","additionalProperties":false,"required":["name","type","value_domain","required","use_constraints"],"description":"A parameter the published content uses that the broadcast supplies in `template.parameters`, with what the template declares about it.","properties":{"name":{"type":"string","minLength":1,"description":"The parameter name to use as a key in `template.parameters`.","example":"offer"},"type":{"$ref":"#/components/schemas/EmailTemplateParameterType"},"value_domain":{"$ref":"#/components/schemas/EmailTemplateParameterValueDomain"},"required":{"type":"boolean","description":"Whether the template declares the parameter required."},"sensitive":{"type":"boolean","description":"Whether the template marks the parameter sensitive. A broadcast cannot supply a sensitive parameter that its content uses."},"use_constraints":{"type":"array","items":{"$ref":"#/components/schemas/EmailTemplateUseConstraint"},"description":"Each place the content uses the parameter."}}},"EmailTemplateVariableSource":{"type":"string","minLength":1,"description":"Where Bird takes the value of a `bird.` variable from.\n\n- `contact`: a property of the recipient contact, read from `bird.contact.`.\n- `bird`: another value Bird fills in when it sends, such as `bird.unsubscribe_url`.\n","x-extensible-enum":["contact","bird"],"example":"contact"},"EmailTemplateVariable":{"type":"object","additionalProperties":false,"required":["path","source"],"description":"A `bird.` variable the published content uses, which Bird fills in for each recipient. The broadcast does not supply it, and no contact value is returned.","properties":{"path":{"type":"string","minLength":1,"description":"The variable as the template writes it, such as `bird.contact.first_name`.","example":"bird.contact.first_name"},"source":{"$ref":"#/components/schemas/EmailTemplateVariableSource"},"source_type":{"type":"string","description":"The type of the contact property, from this workspace's current contact property definitions, such as `string`. Absent when the variable is not a defined contact property."},"use_constraints":{"type":"array","items":{"$ref":"#/components/schemas/EmailTemplateUseConstraint"},"description":"Each place the content uses the variable."}}},"EmailTemplateParameters":{"type":"object","additionalProperties":false,"required":["template_id","observed_version_id","effective_language","requirements_fingerprint","parameters","variables"],"description":"The parameters and variables a template's current published content uses in one exact language, across its subject, HTML and plain-text body. The HTML includes its inbox preview text. This describes the template and holds no parameter or contact values.","properties":{"template_id":{"$ref":"#/components/schemas/EmailTemplateID","description":"The template that was read."},"observed_version_id":{"$ref":"#/components/schemas/EmailTemplateVersionID","description":"The published template version that was read."},"requested_language":{"$ref":"#/components/schemas/LanguageTag","description":"The language requested with `language`. Absent when none was requested and the published version's default language is used."},"effective_language":{"$ref":"#/components/schemas/LanguageTag","description":"The language whose content was read."},"requirements_fingerprint":{"type":"string","minLength":1,"description":"An opaque value that changes when this content or the parameters and variables it uses change, including for built-in templates whose version ID stays the same. Compare it with an earlier value to tell whether they are still the same. Do not parse it."},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/EmailTemplateParameter"},"description":"The parameters the broadcast supplies, sorted by name."},"variables":{"type":"array","items":{"$ref":"#/components/schemas/EmailTemplateVariable"},"description":"The `bird.` variables Bird fills in, sorted by path."}}},"EmailTemplatePreviewRequest":{"type":"object","additionalProperties":false,"description":"Sample values and options for rendering a template preview. Omit the body entirely to preview the current draft: `bird.contact.` tokens then fill from stand-in values, and a parameter you give no value for renders as empty.\n","properties":{"content":{"allOf":[{"$ref":"#/components/schemas/EmailTemplatePreviewContent"}],"description":"Render this content rather than the template's stored draft. It is what an editor uses to show a change as it is made, since nothing has to be saved first.\n\nThe content is treated exactly as a draft would be: personalization is filled in the same way, a plain-text body is derived from the HTML when you omit it, and content that could not be published is refused with the same error. `version` asks for a published version's own content, so the two cannot be combined.\n"},"parameters":{"type":"object","additionalProperties":true,"description":"Sample values for the variables the template uses, for this one preview only. A variable takes its value under its own name. A `bird.` value nests to match the token, so `{\"bird\": {\"contact\": {\"first_name\": \"Ada\"}}}` fills `{{ bird.contact.first_name }}`.\n\nA preview is more forgiving than a send: a parameter you leave out renders as empty here rather than being rejected. `parameters` is capped at 16 KB once serialized.\n","example":{"bird":{"contact":{"first_name":"Ada"}},"animal":"otter"}},"contact":{"allOf":[{"$ref":"#/components/schemas/ContactID"}],"description":"Render the template the way this contact would receive it. Every `{{ bird.contact.… }}` token takes its value from the contact's record, narrowed to the attributes the template reads and filled from each property's `fallback_value` where the contact holds no value: the same values a broadcast to this contact would send.\n\nValues are read as the contact stands right now, so a preview reflects an edit to their record as soon as you make it. A `bird.contact.…` value you also pass in `parameters` wins for that one attribute, so you can preview a contact with one field changed without editing them.\n"},"language":{"$ref":"#/components/schemas/LanguageTag","description":"Which of the template's languages to render. Omit it to render the default language. When the template does not have the language you ask for, its own `on_missing_language` setting decides whether a close match is rendered instead or the request is rejected. It is the same choice the send makes.\n"},"version":{"allOf":[{"$ref":"#/components/schemas/EmailTemplateVersionID"}],"description":"Preview a specific published version by its id, instead of the current draft.\n"}}},"EmailCompatibilityReportSeverity":{"type":"string","minLength":1,"readOnly":true,"enum":["problem","warning","none"],"x-enum-varnames":["EmailCompatibilityReportSeverityProblem","EmailCompatibilityReportSeverityWarning","EmailCompatibilityReportSeverityNone"],"description":"The worst severity across every finding the response was computed from, which\nis the authoritative reading: a response that caps how many findings it lists\nstill accounts here for the ones it left out. Each response's `compatibility`\nsays which content it covered.\n\n- `problem`: at least one finding is a `problem`.\n- `warning`: every finding is a `warning`.\n- `none`: there are no findings.\n","example":"warning"},"EmailCompatibilityRuleID":{"type":"string","minLength":1,"readOnly":true,"description":"Which rule produced a finding.\n\n- `html_script`: a `<script>` tag.\n- `html_event_handlers`: a JavaScript event-handler attribute such as `onclick`.\n- `html_embedded_content`: an `<iframe>`, `<embed>`, or `<object>`.\n- `html_linked_stylesheet`: a `<link rel=\"stylesheet\">`.\n- `css_at_import`: an `@import` rule.\n- `html_form`: a `<form>`, `<input>`, `<select>`, or `<textarea>`.\n- `html_svg`: an inline `<svg>`.\n- `html_media`: a `<video>` or `<audio>` element.\n- `css_display_flex_grid`: `display: flex` or `display: grid`, and their `inline-` forms.\n- `css_position_fixed_sticky`: `position: fixed` or `position: sticky`.\n- `css_variables_no_fallback`: a `var()` with no fallback value.\n- `css_viewport_units`: a `vh` or `vw` length.\n- `html_button`: a `<button>` element.\n- `css_math_functions`: `clamp()`, `min()`, or `max()`.\n- `css_modern_color`: `oklch()`, `oklab()`, `lch()`, or `lab()`.\n- `html_web_page_markup`: markup a web framework left behind, such as a `data-reactroot` attribute or a `__next` element id.\n","x-extensible-enum":["html_script","html_event_handlers","html_embedded_content","html_linked_stylesheet","css_at_import","html_form","html_svg","html_media","css_display_flex_grid","css_position_fixed_sticky","css_variables_no_fallback","css_viewport_units","html_button","css_math_functions","css_modern_color","html_web_page_markup"],"example":"css_display_flex_grid"},"EmailCompatibilitySeverity":{"type":"string","minLength":1,"readOnly":true,"enum":["problem","warning"],"x-enum-varnames":["EmailCompatibilitySeverityProblem","EmailCompatibilitySeverityWarning"],"description":"What a finding costs you.\n\n- `problem`: the pattern does nothing at all. The client removes the markup, never loads the stylesheet carrying it, or will not operate the control. Where a finding names clients, that is what happens in those clients.\n- `warning`: it does something, but not what you wrote.\n\nNeither one refuses a save, a submit, or a send.\n","example":"warning"},"EmailClientFamily":{"type":"string","minLength":1,"readOnly":true,"description":"Which mail client a finding applies to. A finding's `message` names at most\nApple Mail, Gmail, Outlook, and Yahoo; its `unsupported_clients` and\n`partial_clients` name every client affected.\n\n- `gmail`: Gmail\n- `outlook`: Outlook\n- `yahoo`: Yahoo\n- `apple_mail`: Apple Mail\n- `aol`: AOL\n- `thunderbird`: Mozilla Thunderbird\n- `samsung_email`: Samsung Email\n- `sfr`: SFR\n- `orange`: Orange\n- `protonmail`: ProtonMail\n- `hey`: HEY\n- `mail_ru`: Mail.ru\n- `fastmail`: Fastmail\n- `laposte`: LaPoste.net\n- `gmx`: GMX\n- `web_de`: WEB.DE\n- `ionos_1and1`: 1&1\n- `wp_pl`: WP.pl\n","x-extensible-enum":["gmail","outlook","yahoo","apple_mail","aol","thunderbird","samsung_email","sfr","orange","protonmail","hey","mail_ru","fastmail","laposte","gmx","web_de","ionos_1and1","wp_pl"],"example":"outlook"},"EmailClientPlatform":{"type":"string","minLength":1,"readOnly":true,"description":"Which build of a client family a finding applies to. A family can support a\nfeature in one build and not another, so Gmail on iOS is tracked separately\nfrom Gmail on the web.\n\n- `desktop_webmail`: Desktop Webmail\n- `mobile_webmail`: Mobile Webmail\n- `ios`: iOS\n- `android`: Android\n- `windows`: Windows\n- `macos`: macOS\n- `windows_mail`: Windows Mail\n- `outlook_com`: Outlook.com\n","x-extensible-enum":["desktop_webmail","mobile_webmail","ios","android","windows","macos","windows_mail","outlook_com"],"example":"windows"},"EmailClientSupport":{"type":"object","additionalProperties":false,"description":"One mail client family a finding applies to, and which of that family's platforms.\n","required":["family","platforms"],"properties":{"family":{"readOnly":true,"$ref":"#/components/schemas/EmailClientFamily"},"platforms":{"type":"array","minItems":1,"readOnly":true,"items":{"$ref":"#/components/schemas/EmailClientPlatform"},"description":"Which of the family's platforms this applies to, in alphabetical order.\n","example":["windows","windows_mail"]}}},"EmailCompatibilityFinding":{"type":"object","additionalProperties":false,"description":"One pattern in the HTML that mail clients remove, ignore, or render inconsistently.\n","required":["rule_id","severity","language","field","message","fix","partial","line","column","match","unsupported_clients","partial_clients"],"properties":{"rule_id":{"readOnly":true,"description":"The rule that produced this finding.","$ref":"#/components/schemas/EmailCompatibilityRuleID"},"severity":{"readOnly":true,"$ref":"#/components/schemas/EmailCompatibilitySeverity"},"language":{"readOnly":true,"description":"Which language's content this finding is in. Null when the call covered a single language.\n","oneOf":[{"$ref":"#/components/schemas/LanguageTag"},{"type":"null"}]},"field":{"type":"string","minLength":1,"readOnly":true,"description":"Which field of that language the finding is in. Always `html`; the subject and the plain-text body are not checked.\n","example":"html"},"message":{"type":"string","minLength":1,"readOnly":true,"description":"What is wrong and which clients it affects, worded to show to whoever is authoring the template. It covers the rule's whole category rather than the exact text that matched, so a rule covering `<video>` and `<audio>` names both whichever one is on the line. Show `fix` and then `partial` after it.\n","example":"`display: flex` and `grid` don't work in Outlook (Windows/Windows Mail)."},"fix":{"type":["string","null"],"minLength":1,"readOnly":true,"description":"What to use instead. Null when there is no drop-in alternative and the fix is a restructure.\n","example":"Use tables for layout."},"partial":{"type":["string","null"],"minLength":1,"readOnly":true,"description":"Which clients support the feature only partly. Null when no client's support is partial.\n","example":"Partial support for `display: flex` and `grid` in Gmail (iOS/Android)."},"line":{"type":"integer","minimum":1,"readOnly":true,"description":"The 1-based line the pattern is on, in the HTML the containing response's `compatibility` says it covered.\n","example":14},"column":{"type":"integer","minimum":1,"readOnly":true,"description":"The 1-based column the pattern starts at, on that line.","example":6},"match":{"type":"string","minLength":1,"maxLength":256,"readOnly":true,"description":"The source text that matched, starting at `line` and `column`: the smallest span that identifies what is wrong. Never the enclosing line. For a finding on a whole element, the span runs from the opening tag through the close tag, because the client drops the element's content along with its markup. Cut at 256 characters, so an element holding a long body is quoted from its start rather than in full.\n","example":"display: flex"},"unsupported_clients":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/EmailClientSupport"},"description":"Every client family that does not support the feature at all, in alphabetical order by each entry's `family`. Empty on a finding whose `message`, `fix`, and `partial` name no client. `message` names at most four families; this names all of them.\n"},"partial_clients":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/EmailClientSupport"},"description":"Every client family that renders something other than what you wrote, in alphabetical order by each entry's `family`. Empty when no client's support is partial, which is also when `partial` is null. `partial` names at most four families; this names all of them.\n"}}},"EmailTemplatePreview":{"type":"object","additionalProperties":false,"description":"A rendered preview of an email template: its subject, HTML, and plain-text bodies with the supplied sample values filled in, ready to display.\n","required":["subject","html","text","variables","language","compatibility","compatibility_severity"],"properties":{"editor_url":{"type":"string","format":"uri","readOnly":true,"description":"Optional link to open the saved draft in the browser editor, in the language this preview rendered. Absent for built-in templates, published-version previews, and previews of unsaved `content`.\n"},"subject":{"type":["string","null"],"readOnly":true,"description":"The rendered subject line. Null when the template has no subject."},"html":{"type":["string","null"],"readOnly":true,"description":"The rendered HTML body. Null when the template has no HTML body."},"text":{"type":["string","null"],"readOnly":true,"description":"The rendered plain-text body. Derived from the HTML when the template has no separate plain-text body, and null when it has neither.\n"},"language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The language this preview rendered. It differs from the language you asked for when the template does not have that one and a close match was served instead.\n"},"variables":{"type":"array","readOnly":true,"description":"Every input definition this content uses, in one list: the parameters you fill in\nwith `parameters`, and the values Bird fills in for each recipient. Read `system`\nto tell them apart. This list covers only the language named by `language`. A\nversion read combines the inputs from every language the version holds. Preview\neach language separately to see its own. You can nest sample values under `bird`\nin preview `parameters`; sends reject that reserved namespace.\n","items":{"$ref":"#/components/schemas/TemplateVariable"}},"compatibility_severity":{"readOnly":true,"$ref":"#/components/schemas/EmailCompatibilityReportSeverity"},"compatibility":{"type":"array","readOnly":true,"maxItems":200,"items":{"$ref":"#/components/schemas/EmailCompatibilityFinding"},"description":"What the previewed HTML uses that mail clients remove, ignore, or render inconsistently, in the order the patterns appear. Empty when nothing is worth reporting. Line and column count in the `content.html` you supplied, or in the template's own HTML when you supplied none, so they address the source rather than the rendered output. Previewing a published `version` is the exception: where the stored version keeps no authored copy of a language the publish step rewrote, the positions count in that rewritten body, which no response returns. A preview renders either way. At most 200 findings come back, the first 200 in source order; `compatibility_severity` is derived from every finding the HTML produced, including any beyond those 200.\n"}}},"EmailTemplateVersionStatus":{"type":"string","minLength":1,"readOnly":true,"enum":["draft","published","archived"],"x-enum-varnames":["EmailTemplateVersionStatusDraft","EmailTemplateVersionStatusPublished","EmailTemplateVersionStatusArchived"],"description":"Whether this version is still being edited or has been published. It records\nthe version's publication history: a version that a later one replaced stays\n`published`. The template's `live_version_id` names the version a send\nresolves to now.\n\n`archived` is reserved and no version carries it yet. Version retirement will\nproduce it, so it is declared here ahead of that feature: a client written\nagainst this list today keeps working when the first archived version arrives,\nrather than the value's arrival being a breaking change.\n","example":"published"},"EmailTemplateVersionSummary":{"type":"object","additionalProperties":false,"description":"One version of a template, without its content. Version history lists every version a template has ever had, and each one has a full copy of the content in every language it was published with. The listing describes the versions; read a single version to get what it holds.\n","required":["id","template_id","status","revision","variables","default_language","available_languages","created_at"],"properties":{"id":{"readOnly":true,"description":"Template version ID.","$ref":"#/components/schemas/EmailTemplateVersionID"},"template_id":{"readOnly":true,"description":"The template this version belongs to.","$ref":"#/components/schemas/EmailTemplateID"},"version_number":{"type":["integer","null"],"minimum":1,"readOnly":true,"description":"Sequential published-version number (1, 2, 3…). Null while the version is a draft."},"status":{"$ref":"#/components/schemas/EmailTemplateVersionStatus"},"revision":{"type":"integer","minimum":0,"readOnly":true,"description":"The version's revision counter."},"variables":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/TemplateVariable"},"description":"Input definitions this version uses, including caller parameters and reserved Bird inputs. An entry with `system` false is yours to send in `template.parameters`. An entry with `system` true names a reserved Bird key; supported paths receive Bird values. A draft can also report unsupported reserved paths, including bare `bird`, whose `constraint` explains that no Bird value fills them. Correct these paths before publishing. Naming a reserved Bird key in a send is rejected with a `422`.\n\nThe list combines all the languages, because languages do not have to use the same inputs: if the English body uses `discount_code` and the French body uses `shipping_date`, both appear here. A send requires values only for the caller parameters referenced by its resolved language. Preview each language to see its inputs. In the version list, a published version reports only its own inputs, not those of sections it links from reusable blocks; the single-version read includes them. Extra parameters are ignored; omitting a caller parameter referenced by the resolved language returns a `422` naming it.\n"},"default_language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The language this version treats as its default: the one a send uses when it names none, and the last resort when a requested language is not available.\n"},"available_languages":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/LanguageTag"},"description":"The languages this version holds, as BCP-47 tags: the keys its `languages` map would return, without the content itself.\n","example":["en","pt-BR"]},"created_at":{"type":"string","minLength":1,"format":"date-time","readOnly":true,"description":"When this version was created."},"published_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this version was published, or null if it has not been published."},"updated_by":{"oneOf":[{"$ref":"#/components/schemas/Actor"},{"type":"null"}],"readOnly":true,"description":"Who last saved this version: a member's own session, an OAuth token delegated from one, or a workspace API key. Publishing freezes a version, so on a published one this is whoever published it. Null means no actor is on record: a built-in template, which is code-defined rather than stored, or a version last saved by an API key before this field existed. Every other version has one, even when its display_name could not be resolved (a member whose account is gone, say).\n"}}},"EmailTemplateVersionList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"One page of the template's versions, newest first. Each entry describes a version and which languages it holds. Read a single version if you want its actual content.\n","items":{"$ref":"#/components/schemas/EmailTemplateVersionSummary"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"EmailTemplateBroadcastSummary":{"type":"object","additionalProperties":false,"description":"One broadcast that blocks deleting this template.","required":["id","status","created_at"],"properties":{"id":{"readOnly":true,"description":"Broadcast ID.","$ref":"#/components/schemas/EmailBroadcastID"},"status":{"readOnly":true,"description":"Where the broadcast has got to. Only `scheduled` and `accepted` appear here: those are the two that have not pinned their content yet, so they are the ones blocking the delete. This list carries the status alone; the per-recipient totals live on the broadcast itself.\n","example":"scheduled","allOf":[{"$ref":"#/components/schemas/EmailBroadcastStatus"}]},"scheduled_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the broadcast is due to send, or null when it is not scheduled.","example":"2026-07-03T09:00:00Z"},"created_at":{"type":"string","minLength":1,"format":"date-time","readOnly":true,"description":"When the broadcast was created.","example":"2026-07-01T00:00:00Z"}}},"EmailTemplateBroadcastList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of broadcasts blocking a delete of the template, newest first.","items":{"$ref":"#/components/schemas/EmailTemplateBroadcastSummary"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"EmailTemplateVersion":{"type":"object","additionalProperties":false,"required":["id","template_id","status","revision","variables","languages","default_language","created_at"],"properties":{"id":{"readOnly":true,"description":"Template version ID.","$ref":"#/components/schemas/EmailTemplateVersionID"},"template_id":{"readOnly":true,"description":"The template this version belongs to.","$ref":"#/components/schemas/EmailTemplateID"},"version_number":{"type":["integer","null"],"minimum":1,"readOnly":true,"description":"Sequential published-version number (1, 2, 3…). Null while the version is a draft."},"status":{"$ref":"#/components/schemas/EmailTemplateVersionStatus"},"revision":{"type":"integer","minimum":0,"readOnly":true,"description":"The version's revision counter."},"variables":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/TemplateVariable"},"description":"Input definitions this version uses, including caller parameters and reserved Bird inputs. An entry with `system` false is yours to send in `template.parameters`. An entry with `system` true names a reserved Bird key; supported paths receive Bird values. A draft can also report unsupported reserved paths, including bare `bird`, whose `constraint` explains that no Bird value fills them. Correct these paths before publishing. Naming a reserved Bird key in a send is rejected with a `422`.\n\nThe list combines all the languages, because languages do not have to use the same inputs: if the English body uses `discount_code` and the French body uses `shipping_date`, both appear here. A send requires values only for the caller parameters referenced by its resolved language. Preview each language to see its inputs. Extra parameters are ignored; omitting a caller parameter referenced by the resolved language returns a `422` naming it.\n"},"languages":{"type":"object","readOnly":true,"propertyNames":{"$ref":"#/components/schemas/LanguageTag"},"additionalProperties":{"$ref":"#/components/schemas/EmailTemplateLanguageContent"},"description":"The content this version holds, keyed by language tag in BCP-47 form such as `en` or `pt-BR`. Publishing freezes every language together, so a version shows exactly what it would send in each of them. On a published version this is the send content.\n"},"default_language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The language this version treats as its default: the one a send uses when it names none, and the last resort when a requested language is not available.\n"},"created_at":{"type":"string","minLength":1,"format":"date-time","readOnly":true,"description":"When this version was created."},"published_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this version was published, or null if it has not been published."},"updated_by":{"oneOf":[{"$ref":"#/components/schemas/Actor"},{"type":"null"}],"readOnly":true,"description":"Who last saved this version: a member's own session, an OAuth token delegated from one, or a workspace API key. Publishing freezes a version, so on a published one this is whoever published it. Null means no actor is on record: a built-in template, which is code-defined rather than stored, or a version last saved by an API key before this field existed. Every other version has one, even when its display_name could not be resolved (a member whose account is gone, say).\n"}}},"EmailTemplateLanguageSummary":{"type":"object","additionalProperties":false,"description":"One language of a template version, without its content: enough to list what a version holds and how big each language is. Read a single language to get its content and its compatibility report.\n","required":["language","revision"],"properties":{"language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The language, in its canonical form."},"revision":{"type":"integer","minimum":0,"readOnly":true,"description":"This language's revision counter, to send back when you save it. It counts only this language's own changes.\n"},"content_hash":{"type":["string","null"],"readOnly":true,"description":"A hash over this language's content, prefixed with the algorithm that produced it (`sha256:`), so the algorithm can change without the field becoming ambiguous. It tells you whether a language differs without transferring the content, and is comparable only within one version of this API. Null for a language saved before fingerprints were recorded.\n","example":"sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this language was last saved. Null if that is not recorded."},"has_html":{"type":"boolean","readOnly":true,"description":"Whether this language has an HTML body."},"has_text":{"type":"boolean","readOnly":true,"description":"Whether this language has a plain-text body."}}},"EmailTemplateLanguageList":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","description":"Every language the version holds, ordered by language tag, without their content. Read a single language to get its content.\n","items":{"$ref":"#/components/schemas/EmailTemplateLanguageSummary"}}}},"EmailTemplateLanguage":{"type":"object","additionalProperties":false,"description":"One language of a template version: its content plus the identity a concurrent-edit check needs. Reading a language returns everything you need to edit it and save it back.\n","required":["language","revision","authoring_mode","compatibility","compatibility_severity"],"properties":{"language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The language this content belongs to, in its canonical form. Send a tag in any casing and this reports the form the template stores.\n"},"revision":{"type":"integer","minimum":0,"readOnly":true,"description":"This language's revision counter. Send it back when you save this language so a concurrent edit is caught instead of silently overwritten. It counts only this language's own changes, so editing another language never invalidates it.\n"},"authoring_mode":{"readOnly":true,"$ref":"#/components/schemas/EmailAuthoringMode","description":"How this language is edited, derived from what it stores. `visual`: it keeps a document from the Bird dashboard's visual editor. A request that would add, move or remove its linked blocks is refused, and so is one that would replace its body while it links blocks; open the template's `editor_url` instead. Subject and preview text stay editable. While it links no blocks, a full save without `editor_state` replaces its visual design with your HTML, and a partial update that changes `html` or `text` keeps the design, so the language stays `visual` and the visual editor still shows the design rather than your HTML. `html`: it is edited as HTML, and blocks are linked with HTML comment markers of the form `bird:shared-block:OCCURRENCE_UUID` and `shared_blocks`. It changes only when a save keeps or drops the visual editor's document.\n"},"content_hash":{"type":["string","null"],"readOnly":true,"description":"A hash over this language's content, prefixed with the algorithm that produced it (`sha256:`), so the algorithm can change without the field becoming ambiguous. It tells you whether a language differs without transferring the content, and is comparable only within one version of this API. Null for a language saved before fingerprints were recorded.\n","example":"sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this language was last saved. Null if that is not recorded."},"content":{"$ref":"#/components/schemas/EmailTemplateLanguageContent"},"compatibility_severity":{"readOnly":true,"$ref":"#/components/schemas/EmailCompatibilityReportSeverity"},"compatibility":{"type":"array","readOnly":true,"maxItems":200,"items":{"$ref":"#/components/schemas/EmailCompatibilityFinding"},"description":"What the stored HTML uses that mail clients remove, ignore, or render inconsistently, in the order the patterns appear. Empty when nothing is worth reporting. Line and column count in the `content.html` this response carries. At most 200 findings come back, the first 200 in source order; `compatibility_severity` is derived from every finding the HTML produced, including any beyond those 200.\n"}},"example":{"language":"en","revision":3,"authoring_mode":"html","content_hash":"sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","updated_at":"2026-05-25T16:42:01Z","content":{"subject":"Welcome to Acme, {{ bird.contact.first_name }}!","preview_text":"{{ bird.contact.first_name }}, your order is on its way","html":"<div style=\"display: flex;\"><h1>Hi {{ bird.contact.first_name }}</h1></div>"},"compatibility_severity":"warning","compatibility":[{"rule_id":"css_display_flex_grid","severity":"warning","language":null,"field":"html","message":"`display: flex` and `grid` don't work in Outlook (Windows/Windows Mail).","fix":"Use tables for layout.","partial":"Partial support for `display: flex` and `grid` in Gmail (iOS/Android).","line":1,"column":13,"match":"display: flex","unsupported_clients":[{"family":"outlook","platforms":["windows","windows_mail"]}],"partial_clients":[{"family":"gmail","platforms":["ios","android"]}]}]}},"EmailTemplateLanguageUpsert":{"type":"object","additionalProperties":false,"description":"Content to save for one language, replacing whatever that language held. Send every field you want the language to keep: a field you omit is cleared, which is what makes saving the same content twice land the same way every time.\n","required":["subject"],"properties":{"shared_blocks":{"description":"Links reusable blocks into this language. Send the complete language with it: `html` with one HTML comment `bird:shared-block:OCCURRENCE_UUID` per binding, placed where a section can stand (between block-level elements, not inside a paragraph or a table row), empty `text`, and the `revision` you read (0 to create the language). Key each binding by a lowercase UUID for that occurrence. A newly linked block must be unarchived and published in this exact language. Keep an occurrence's UUID to move it, use a new one to add another, and delete both its marker and its binding to remove it. To remove every link, send HTML without markers and empty `bindings`. A language edited in the Bird dashboard's visual editor cannot be saved this way from outside the dashboard (`E04108`).\n","allOf":[{"$ref":"#/components/schemas/EmailTemplateSharedBlocks"}]},"replace_custom_text":{"type":"boolean","description":"Confirms replacing the language's custom plain-text body with text derived from the linked HTML, in the same save that links its first block. Requires `shared_blocks` and the language `revision`.\n"},"subject":{"type":"string","minLength":0,"maxLength":998,"description":"The email subject line. It may be empty in a draft but is required to publish.","example":"Welcome to Acme, {{ bird.contact.first_name }}!"},"preview_text":{"type":"string","maxLength":255,"description":"The line an inbox shows after the subject in the message list. Leave it out and the inbox shows the opening words of the body instead.\n","example":"{{ bird.contact.first_name }}, your order is on its way"},"html":{"type":"string","maxLength":524288,"description":"The HTML body for this language. On a language that links blocks, a save without `shared_blocks` is refused (`E04109`); read it with `authoring=true` for the HTML with its block markers first.\n","example":"<h1>Hi {{ bird.contact.first_name }}</h1>"},"text":{"type":"string","maxLength":524288,"description":"The plain-text body for this language. Omit it and a plain-text alternative is derived from the HTML when you submit.\n"},"revision":{"type":"integer","minimum":0,"description":"The revision you last read for this language, to detect a concurrent edit. The save is rejected with a conflict if the language moved on since. Omit it to save unconditionally. Creating a language does not need one.\n"}},"example":{"subject":"Welcome to Acme, {{ bird.contact.first_name }}!","preview_text":"{{ bird.contact.first_name }}, your order is on its way","html":"<h1>Hi {{ bird.contact.first_name }}</h1>"}},"EmailTemplateRef":{"type":"string","minLength":1,"readOnly":true,"description":"The template this call addressed, as its id, even when you addressed it by slug. Send it back as `template_ref` on a follow-up call.\n","example":"emt_01krdgeqcxet5s7t44vh8rt9mg"},"EmailTemplateLanguageSaved":{"type":"object","additionalProperties":false,"description":"The identity, revision counters, and fingerprint of a saved language. The response does not include its content; read the language to retrieve it.\n","required":["language","revision","authoring_mode","draft_revision","template_ref","version_id","compatibility","compatibility_severity"],"properties":{"shared_blocks":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailTemplateSharedBlocks"}]},"language":{"$ref":"#/components/schemas/LanguageTag","readOnly":true,"description":"The language that was saved, in its canonical form. Send a tag in any casing and this reports the form the template stores.\n"},"revision":{"type":"integer","minimum":0,"readOnly":true,"description":"This language's new revision. Send it back on your next save of this language so a concurrent edit is caught instead of silently overwritten.\n"},"authoring_mode":{"readOnly":true,"$ref":"#/components/schemas/EmailAuthoringMode","description":"How this language is edited, derived from what it stores. `visual`: it keeps a document from the Bird dashboard's visual editor. A request that would add, move or remove its linked blocks is refused, and so is one that would replace its body while it links blocks; open the template's `editor_url` instead. Subject and preview text stay editable. While it links no blocks, a full save without `editor_state` replaces its visual design with your HTML, and a partial update that changes `html` or `text` keeps the design, so the language stays `visual` and the visual editor still shows the design rather than your HTML. `html`: it is edited as HTML, and blocks are linked with HTML comment markers of the form `bird:shared-block:OCCURRENCE_UUID` and `shared_blocks`. It changes only when a save keeps or drops the visual editor's document.\n"},"draft_revision":{"type":"integer","minimum":0,"readOnly":true,"description":"The draft's new revision. Saving a language moves it, so any template update you make next must send this value instead of the revision you read before the save.\n"},"content_hash":{"type":["string","null"],"readOnly":true,"description":"A hash over the language's content as saved, prefixed with the algorithm that produced it (`sha256:`), so the algorithm can change without the field becoming ambiguous. It tells you whether a language differs without transferring the content, and is comparable only within one version of this API.\n","example":"sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this language was saved."},"template_ref":{"readOnly":true,"description":"The template this save addressed.","$ref":"#/components/schemas/EmailTemplateRef"},"version_id":{"readOnly":true,"description":"The draft this save wrote to.","$ref":"#/components/schemas/EmailTemplateVersionID"},"compatibility_severity":{"readOnly":true,"$ref":"#/components/schemas/EmailCompatibilityReportSeverity"},"next":{"type":"array","readOnly":true,"description":"What to do next with this save. Present on reads that compute it: an empty list means\nthere is nothing to do, and the field is absent entirely on responses that do not\nreport next actions.\n\nA `problem` in `compatibility` routes back to this same write, with the identifiers\nto address it already on this response; a `warning` says what degrades and leaves\nthe draft as it is.\n","items":{"$ref":"#/components/schemas/NextAction"}},"compatibility":{"type":"array","readOnly":true,"maxItems":200,"items":{"$ref":"#/components/schemas/EmailCompatibilityFinding"},"description":"What the HTML you just saved uses that mail clients remove, ignore, or render inconsistently, in the order the patterns appear. Empty when nothing is worth reporting. Advisory: the language was saved either way, and a finding never refuses a write. Line and column count in the HTML as saved, which the language read returns as `content.html`. A partial update reports on the language in full rather than on the fields it carried, so it reads the same as the read of the same language. At most 200 findings come back, the first 200 in source order; `compatibility_severity` is derived from every finding the HTML produced, including any beyond those 200.\n"}},"example":{"language":"en","revision":4,"authoring_mode":"html","draft_revision":12,"content_hash":"sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","updated_at":"2026-05-25T16:42:01Z","template_ref":"emt_01krdgeqcxet5s7t44vh8rt9mg","version_id":"emv_01krdgeqcxet5s7t44vh8rt9mg","compatibility_severity":"none","compatibility":[]}},"EmailTemplateLanguageUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"description":"A partial edit to one language: send only the fields you are changing, and the rest keep their current values. The language must already exist. Create it by saving its full content instead.\n","properties":{"subject":{"type":"string","maxLength":998,"description":"The email subject line. It may be empty in a draft but is required to publish.","example":"Welcome to Acme, {{ bird.contact.first_name }}!"},"preview_text":{"type":["string","null"],"maxLength":255,"description":"A new line for the inbox to show after the subject in the message list. Send null to clear it, and the inbox shows the opening words of the body instead.\n","example":"{{ bird.contact.first_name }}, your order is on its way"},"html":{"type":"string","maxLength":524288,"description":"A new HTML body for this language. Refused on a language that links blocks; change its body with a full save that includes `shared_blocks`.\n","example":"<h1>Hi {{ bird.contact.first_name }}</h1>"},"text":{"type":["string","null"],"maxLength":524288,"description":"A new plain-text body for this language. Send null to clear it, and a plain-text alternative is derived from the HTML when you submit. Refused on a language that links blocks, which always derives its text.\n"},"revision":{"type":"integer","minimum":0,"description":"The revision you last read for this language, to detect a concurrent edit. The edit is rejected with a conflict if the language moved on since. Omit it to apply the edit unconditionally.\n"}}},"EmailTemplateRollback":{"type":"object","additionalProperties":false,"description":"Parameters for rolling a template back to an earlier published version. Rolling back also replaces the draft with that version's content, so you have to pass `revision`, the revision number of the draft you last read. If the draft has changed since you read it, that revision number is now stale, and the rollback fails with a conflict instead of overwriting the newer draft. Read the draft again to get its current revision, and try the rollback again.\n","required":["revision"],"properties":{"revision":{"$ref":"#/components/schemas/EmailTemplateDraftRevision"}}},"EmailTemplateSubmit":{"type":"object","additionalProperties":false,"description":"Options for a submit. Every field here is optional, so an empty request body submits the draft exactly as it stands.\n","properties":{"validate_only":{"type":"boolean","default":false,"description":"Check the draft without actually submitting it. Every language gets checked and every problem gets reported back to you, but nothing is frozen and no new version gets created. Give a validation run its own `Idempotency-Key`, separate from the real submit that follows it. You can also send no key. The validation request and real submit have different bodies, so using the same key for both is rejected as key reuse.\n"},"expected_revision":{"$ref":"#/components/schemas/EmailTemplateDraftRevision"},"languages":{"type":"array","minItems":1,"maxItems":25,"items":{"$ref":"#/components/schemas/LanguageTag"},"description":"Languages to process when submitting an already-published version. Email templates accept submissions only for drafts, so setting this field for an email template is rejected.\n"}},"example":{"expected_revision":3}},"EmailTemplateSubmitProblem":{"type":"object","additionalProperties":false,"description":"One problem found while checking whether a version can be submitted.","required":["code","message"],"properties":{"language":{"readOnly":true,"description":"The language this problem is about. Null when the problem is about the whole version rather than one language, for example an empty draft, or a default language the draft does not have.\n","oneOf":[{"$ref":"#/components/schemas/LanguageTag"},{"type":"null"}]},"field":{"type":["string","null"],"minLength":1,"readOnly":true,"description":"Which field within that language has the problem, such as `subject` or `html`. Null when the problem is not about one particular field.\n","example":"subject"},"code":{"type":"string","minLength":1,"pattern":"^E\\d{5}$","readOnly":true,"description":"The error code a real submit would fail with. Look it up in the error catalog to see what it means and what to do about it.\n","example":"E04051"},"message":{"type":"string","minLength":1,"readOnly":true,"description":"What is wrong, worded so you can show it directly to whoever is authoring the template.\n","example":"A subject is required to submit."}}},"EmailTemplateSubmitResult":{"type":"object","additionalProperties":false,"description":"The outcome of a submit. This has the same shape whether the submit was a validation run or a real one, so you can read `valid` and `version` the same way either time to see what happened.\n","required":["valid","errors","template_ref","version_id","compatibility","compatibility_severity"],"properties":{"valid":{"type":"boolean","readOnly":true,"description":"Whether the version passed every check."},"errors":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/EmailTemplateSubmitProblem"},"description":"Every problem found across the draft's languages. Empty when `valid` is `true`.\n"},"version":{"readOnly":true,"description":"The version this submit created, or null when it was only a validation run and nothing got frozen. As soon as this is not null, sends already use that version. No further action is required to make it live.\n","oneOf":[{"$ref":"#/components/schemas/EmailTemplateVersion"},{"type":"null"}]},"template_ref":{"readOnly":true,"description":"The template this submit addressed.","$ref":"#/components/schemas/EmailTemplateRef"},"version_id":{"readOnly":true,"description":"The draft this submit addressed: the one it froze, or on a validation run the one it checked and left as it was. The frozen version, when there is one, is `version`.\n","$ref":"#/components/schemas/EmailTemplateVersionID"},"compatibility_severity":{"readOnly":true,"$ref":"#/components/schemas/EmailCompatibilityReportSeverity"},"compatibility":{"type":"array","readOnly":true,"maxItems":200,"items":{"$ref":"#/components/schemas/EmailCompatibilityFinding"},"description":"What the draft's HTML uses that mail clients remove, ignore, or render inconsistently, across every language, in alphabetical order of language tag and then the order the patterns appear. Empty when nothing is worth reporting. Advisory, and separate from `errors`: a finding never fails a submit, so the version froze either way. Each finding names the `language` it is in, and its line and column count in that language's HTML, which the language read returns as `content.html`. At most 200 findings come back, the first 200 in that order, so a draft that reaches the cap can omit a later language's findings entirely rather than trimming each language: read a language's own findings from its read or its write. `compatibility_severity` is derived from every finding the draft produced, including any beyond those 200.\n"}}},"InboundAddressID":{"type":"string","minLength":1,"pattern":"^ina_[0-9a-hjkmnp-tv-z]{26}$","example":"ina_01krdgeqcxet5s7t44vh8rt9mg"},"InboundAddress":{"type":"object","additionalProperties":false,"description":"An email address we create for you, which receives mail on your behalf. Forward a real mailbox (for example, a support inbox) to this address. Every message sent to it becomes a received email you can retrieve.\n","required":["id","address","label","created_at","updated_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/InboundAddressID","description":"Inbound address ID."},"address":{"type":"string","format":"email","minLength":5,"readOnly":true,"description":"The address to forward your mailbox to. We generate it when the inbound address is created.","example":"mfzxq2lom5uxi3lb@eu1.inbound.bird.com"},"label":{"type":["string","null"],"maxLength":255,"description":"Your own label for this address, typically the source mailbox it maps to. `null` when unset.","example":"Support mailbox"},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the inbound address was created."},"updated_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the inbound address was last updated."}}},"InboundAddressList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of inbound addresses, newest first.","items":{"$ref":"#/components/schemas/InboundAddress"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"InboundAddressCreate":{"type":"object","additionalProperties":false,"description":"Parameters for minting a new inbound address.","properties":{"label":{"type":"string","minLength":1,"maxLength":255,"description":"Your own label for this address, typically the source mailbox it maps to.","example":"Support mailbox"}},"example":{"label":"Support mailbox"}},"InboundAddressUpdate":{"type":"object","additionalProperties":false,"description":"Fields to update on an inbound address.","properties":{"label":{"type":["string","null"],"maxLength":255,"description":"Your own label for this address, typically the source mailbox it maps to. Send `null` to clear it. Omit the field to leave it unchanged.","example":"Support mailbox"}},"example":{"label":"Sales mailbox"}},"MailboxID":{"type":"string","minLength":1,"pattern":"^mbx_[0-9a-hjkmnp-tv-z]{26}$","example":"mbx_01krdgeqcxet5s7t44vh8rt9mg"},"InboundEmailMessageID":{"type":"string","minLength":1,"pattern":"^rem_[0-9a-hjkmnp-tv-z]{26}$","example":"rem_01krdgeqcxet5s7t44vh8rt9mg"},"InboundAttachmentID":{"type":"string","minLength":1,"pattern":"^rea_[0-9a-hjkmnp-tv-z]{26}$","example":"rea_01krdgeqcxet5s7t44vh8rt9mg"},"InboundAttachment":{"type":"object","additionalProperties":false,"required":["id","filename","content_type","size"],"description":"Metadata for a file attached to a received email. The raw bytes are fetched separately with `GET /v1/email/inbound-messages/{inbound_message_id}/attachments/{attachment_id}`.\n","properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/InboundAttachmentID","description":"Attachment ID, stable within the received message."},"filename":{"type":["string","null"],"description":"Filename from the attachment's Content-Disposition, or `null` when the sender did not name the part.","example":"invoice.pdf"},"content_type":{"type":["string","null"],"description":"MIME type parsed from the attachment part, or `null` when absent.","example":"application/pdf"},"size":{"type":"integer","minimum":0,"description":"Size of the attachment in bytes.","example":215432}}},"InboundEmailMessage":{"type":"object","additionalProperties":false,"description":"An email received on your behalf, parsed from the original message. Fetch the body with `/body`, the original MIME with `/raw`, and attachment bytes with `/attachments/{attachment_id}`.\n","required":["id","from","to","cc","subject","message_id","in_reply_to","mailbox_id","thread_id","authentication","spf_pass","dkim_pass","dmarc_pass","spam_score","attachments","received_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/InboundEmailMessageID","description":"Received message ID."},"from":{"$ref":"#/components/schemas/EmailAddress","description":"Sender address parsed from the message."},"to":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddress"},"description":"Recipients on the message's To header."},"cc":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddress"},"description":"Recipients on the message's Cc header."},"subject":{"type":["string","null"],"description":"Subject line as received, or `null` when the message had no subject.","example":"Re: Your receipt"},"message_id":{"type":["string","null"],"description":"RFC 5322 Message-ID header from the sender, or `null` when the sender did not include one.","example":"<CAH+T8d5...@mail.gmail.com>"},"in_reply_to":{"type":["string","null"],"description":"The `In-Reply-To` header, which holds the Message-ID this message is replying to. `null` when the message is not a reply.","example":"<previous-message@example.com>"},"references":{"type":"array","items":{"type":"string"},"description":"The References header, which holds every Message-ID in this conversation, oldest first. Left out when the message arrived without one."},"mailbox_id":{"oneOf":[{"$ref":"#/components/schemas/MailboxID"},{"type":"null"}],"description":"Mailbox that received this message, or `null` when it arrived on an inbound address or domain without a mailbox."},"thread_id":{"type":["string","null"],"description":"Mailbox conversation this message belongs to, or `null` when it was not received by a mailbox or has since been deleted from it."},"authentication":{"type":["string","null"],"enum":["pass","fail","unknown",null],"description":"DMARC result for the domain in the received message's `From` header.\n\n- `pass`: SPF or DKIM passed and aligned with that domain.\n- `fail`: DMARC was evaluated and did not pass.\n- `unknown`: no trustworthy verdict is available.\n\nThis follows `dmarc_pass` and does not verify a particular person. The receiving provider currently supplies no DMARC result, so received messages report `unknown`.\n"},"spf_pass":{"type":["boolean","null"],"description":"Whether the receiving provider reports that SPF authorized the envelope sender for the sending server. A soft failure is `false`. Missing, neutral and inconclusive results are `null`."},"dkim_pass":{"type":["boolean","null"],"description":"Whether the receiving provider verified a DKIM signature. A passing signature makes this `true` even when another signature fails. Missing signatures and inconclusive verification results are `null`."},"dmarc_pass":{"type":["boolean","null"],"description":"Whether SPF or DKIM passed and aligned with the domain in the message's `From` header. The receiving provider currently supplies no DMARC result, so this is `null`."},"spam_score":{"type":["number","null"],"description":"Content spam score when available. The receiving provider currently supplies no score, so this is `null`."},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/InboundAttachment"},"description":"Metadata for each attachment found on the message. Empty when the message had no attachments."},"received_at":{"type":"string","minLength":1,"format":"date-time","readOnly":true,"description":"When the message was received."}}},"InboundEmailMessageList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of received emails, newest first.","items":{"$ref":"#/components/schemas/InboundEmailMessage"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"InboundEmailMessageBody":{"type":"object","additionalProperties":false,"description":"The parsed body of a received email.","required":["html","text"],"properties":{"html":{"type":["string","null"],"description":"The HTML body of the message, or `null` when the message had no HTML part."},"text":{"type":["string","null"],"description":"The plain-text body of the message, or `null` when the message had no text part."}}},"InboundAttachmentList":{"type":"object","additionalProperties":false,"description":"The attachments on a received email. The response returns every attachment without pagination.","required":["data"],"properties":{"data":{"type":"array","description":"Metadata for every attachment on the message. Empty when the message had no attachments.","items":{"$ref":"#/components/schemas/InboundAttachment"}}}},"MailboxOwner":{"type":"object","additionalProperties":false,"description":"The principal that owns the mailbox. Always the workspace.","required":["type","id"],"properties":{"type":{"type":"string","minLength":1,"enum":["workspace"],"readOnly":true,"description":"Owner principal type."},"id":{"readOnly":true,"$ref":"#/components/schemas/WorkspaceID","description":"Owner principal ID."}}},"Mailbox":{"type":"object","additionalProperties":false,"description":"A durable mailbox identity for an agent. A mailbox owns an email address, groups mail into threads, applies receive policy, and remembers message metadata, extracted text, and attachments for its retention tier. The body and raw MIME of each message remain available for 30 days.\n","required":["id","address","forwarding_address","name","display_name","default_reply_to","receive_policy","state","channel","owner","inbound_address_id","retention_tier","message_count","thread_count","size_bytes","metadata","local_part_generated","last_message_at","created_at","updated_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/MailboxID","description":"Mailbox ID."},"address":{"type":"string","format":"email","minLength":5,"readOnly":true,"description":"The mailbox's email address. Immutable once created.","example":"concierge@inbox.ai"},"forwarding_address":{"type":["string","null"],"format":"email","readOnly":true,"description":"An address we generate on our receiving domain, either when the mailbox is created on a domain not set up for receiving with us or later, when you set up forwarding for the mailbox. Forward mail for `address` here from your current email provider, and it lands in this mailbox. Replies still go out from `address`. Immutable once set. It stops receiving while the mailbox is deleted, works again with the same value after a restore, and keeps working if you later enable or disable receiving on the domain. `null` until set up; always `null` on the shared domain, which receives directly.","example":"k7q2mzxw4h6p5ra3@eu1.inbound.bird.com"},"name":{"type":["string","null"],"maxLength":255,"description":"Optional sender name recipients see in the From header of outgoing mail. We recommend setting it so recipients can recognize the sender. `null` when unset.","example":"Acme Concierge"},"display_name":{"type":["string","null"],"maxLength":255,"description":"Name shown to your team in the dashboard and tools. Defaults to `name` when no override is set.","example":"Customer Support"},"default_reply_to":{"type":["string","null"],"format":"email","description":"Default `Reply-To` address stamped on mail sent from this mailbox. `null` when unset."},"receive_policy":{"type":"string","minLength":1,"enum":["open","replies_only","allowlist","drop"],"description":"Which inbound mail the mailbox accepts:\n\n- `open`: Accepts everything not blocked by a rule.\n- `replies_only`: Accepts only replies to messages this mailbox has\n  sent. A reply must match a message the mailbox sent. Landing in an\n  existing thread by itself does not count.\n- `allowlist`: Accepts only senders matching an allow rule. Replies to\n  prior outbound mail are always admitted unless blocked.\n- `drop`: Stores nothing.\n"},"state":{"type":"string","minLength":1,"enum":["active","suspended"],"readOnly":true,"description":"Lifecycle state. `active` means the mailbox can send, receive, and expose conversations. `suspended` pauses sending, conversation reads, and events; inbound mail is retained with the `blocked` label until you resume it."},"channel":{"type":"string","minLength":1,"enum":["email"],"readOnly":true,"description":"The channel this mailbox receives on. Always `email`."},"owner":{"readOnly":true,"$ref":"#/components/schemas/MailboxOwner"},"inbound_address_id":{"readOnly":true,"$ref":"#/components/schemas/InboundAddressID","description":"The underlying inbound address that receives this mailbox's mail."},"retention_tier":{"type":"string","minLength":1,"enum":["30d","90d","1y"],"description":"How long message metadata, extracted text, and attachments are kept. Original bodies and inbound raw MIME are limited to 30 days on every tier."},"message_count":{"type":"integer","format":"int64","readOnly":true,"description":"Number of retained messages across all threads."},"thread_count":{"type":"integer","format":"int64","readOnly":true,"description":"Number of retained threads."},"size_bytes":{"type":"integer","format":"int64","readOnly":true,"description":"Stored bytes across the mailbox's retained messages: subject, preview, extracted text, and attachment bytes. Message bodies and raw MIME expire after 30 days and do not count. Maintained with each message written or deleted, so the value is current; messages stored before the counter existed are not counted."},"unread_thread_count":{"type":["integer","null"],"format":"int64","readOnly":true,"description":"Number of threads with unread messages in this mailbox, excluding trash. `null` on create/update responses.\n"},"metadata":{"type":"object","additionalProperties":true,"description":"Your own key/value data attached to the mailbox. Up to 2 KB. Keys starting with `__bird` are reserved."},"local_part_generated":{"readOnly":true,"type":"boolean","description":"Whether we generated the local part of the address. `false` means a custom handle was chosen at creation. On the shared `inbox.ai` domain a custom handle counts against your plan's custom-handle allowance."},"last_message_at":{"type":["string","null"],"format":"date-time","description":"When the mailbox last sent or received a message. Bird records this activity from 26 August 2026, so compare `null` with `created_at`: a mailbox created after that date has had no activity, while an older one has had none since that date."},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the mailbox was created."},"updated_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the mailbox was last updated."},"deleted_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the mailbox was deleted, or `null` if active. Deletion stops receiving; restore is available for 30 days unless permanent erasure has started."},"next":{"type":"array","readOnly":true,"description":"What to do next with this mailbox. The response that creates it suggests subscribing to the mail it receives. Forwarding-address setup suggests configuring the email provider. Create and update responses recommend setting the sender name when it is unset. Other single-mailbox responses return an empty list, and lists omit this field.","items":{"$ref":"#/components/schemas/NextAction"}}}},"MailboxList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Mailbox"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"MailboxCreate":{"type":"object","additionalProperties":false,"description":"Parameters for creating a mailbox.","properties":{"local_part":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9._-]+$","description":"The local part of the mailbox address (the part before `@`). Letters, digits, dots, underscores, and hyphens. Stored lowercase. On the shared `inbox.ai` domain, separators must sit between letters or digits. Leading, trailing, and repeated separators are not allowed. Reserved names such as `postmaster` and `abuse` are unavailable. Choosing your own local part uses one of your plan's custom-handle allowance slots; generated addresses remain available. Omit this field to generate a random local part.","example":"concierge"},"domain":{"type":"string","minLength":1,"maxLength":255,"default":"inbox.ai","description":"The domain the address lives under. Defaults to `inbox.ai`, our shared mailbox domain. Creating a mailbox claims the shared address for your organization on a first-come, first-served basis. The address remains reserved to your organization after the mailbox is deleted. You can instead use one of your own domains. On a domain enabled for receiving, mail arrives directly. On a domain this workspace has verified (its `status` is `verified`) that is not set up for receiving, the mailbox gets a `forwarding_address`: forward mail for the address there from your current email provider, with no MX change. If another workspace receives the domain's mail, creation fails with `E17009`.","example":"mail.acme.com"},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Optional sender name recipients see in the From header of outgoing mail. We recommend setting it so recipients can recognize the sender. Must contain a non-whitespace character and cannot contain carriage returns or line feeds."},"display_name":{"type":"string","minLength":1,"maxLength":255,"description":"Name shown to your team in the dashboard and tools. Defaults to `name` when omitted.","example":"Acme Concierge"},"default_reply_to":{"type":"string","format":"email","minLength":5,"description":"Default `Reply-To` address stamped on mail sent from this mailbox."},"receive_policy":{"type":"string","enum":["open","replies_only","allowlist","drop"],"default":"open","description":"Which inbound mail the mailbox accepts:\n\n- `open`: Accepts everything not blocked by a rule.\n- `replies_only`: Accepts only replies to messages this mailbox has\n  sent. A reply must match a message the mailbox sent. Landing in an\n  existing thread by itself does not count.\n- `allowlist`: Accepts only senders matching an allow rule.\n- `drop`: Stores nothing.\n"},"retention_tier":{"type":"string","enum":["30d","90d","1y"],"default":"30d","description":"How long message metadata, extracted text, and attachments are kept. Original bodies and inbound raw MIME are limited to 30 days on every tier. Longer tiers require a plan that includes them."},"metadata":{"type":"object","additionalProperties":true,"description":"Your own key/value data to attach to the mailbox. Up to 2 KB. Keys starting with `__bird` are reserved."}},"example":{"local_part":"concierge","name":"Acme Concierge","receive_policy":"open","retention_tier":"30d"}},"MailboxIdentifier":{"type":"string","minLength":1,"maxLength":320,"description":"Mailbox ID beginning with mbx_, or the mailbox email address in this workspace. Email addresses are case-insensitive. Responses return the canonical mailbox ID.","example":"concierge@inbox.ai"},"MailboxUpdate":{"type":"object","additionalProperties":false,"description":"Fields to update on a mailbox. Omitted fields are unchanged. Fields set to `null` are cleared. The address and domain are immutable.","properties":{"name":{"type":["string","null"],"minLength":1,"maxLength":255,"description":"Optional sender name recipients see in the From header of outgoing mail. We recommend setting it so recipients can recognize the sender. Must contain a non-whitespace character and cannot contain carriage returns or line feeds. `null` clears it."},"display_name":{"type":["string","null"],"maxLength":255,"description":"Name shown to your team in the dashboard and tools. `null` clears the override and uses `name`."},"default_reply_to":{"type":["string","null"],"format":"email","description":"Default `Reply-To` address stamped on mail sent from this mailbox. `null` clears it."},"receive_policy":{"type":"string","enum":["open","replies_only","allowlist","drop"],"description":"Which inbound mail the mailbox accepts:\n\n- `open`: Accepts everything not blocked by a rule.\n- `replies_only`: Accepts only replies to messages this mailbox has\n  sent. A reply must match a message the mailbox sent. Landing in an\n  existing thread by itself does not count.\n- `allowlist`: Accepts only senders matching an allow rule.\n- `drop`: Stores nothing.\n"},"retention_tier":{"type":"string","enum":["30d","90d","1y"],"description":"How long message metadata, extracted text, and attachments are kept. Original bodies and inbound raw MIME are limited to 30 days on every tier. Longer tiers require a plan that includes them. Lowering the tier requires `confirm=true` when messages would be affected; accepted changes hide those messages immediately. Deletion waits at least ten minutes and until the retention update finishes."},"metadata":{"type":"object","additionalProperties":true,"description":"Replaces the mailbox's key/value data. Up to 2 KB. Keys starting with `__bird` are reserved."}},"example":{"name":"Acme Concierge","retention_tier":"30d"}},"MailboxStatsSummary":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Single-row aggregate of the mailbox's email activity across the full requested period. Counts use each field's message, recipient, or event identity across the whole window. Repeat opens, clicks, and unsubscribes from the same recipient contribute as separate events; unique engagement fields count distinct recipients. Adding per-bucket distinct counts can overstate the summary. Latency percentiles are computed across the whole period. Rates are `null` when their denominator is zero.\n","required":["sends_accepted","delivery","engagement","latency","received"],"properties":{"sends_accepted":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct email messages the mailbox sent that were accepted, counted once at the message level across the period.","example":231},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailLatencyStats"}]},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct emails the mailbox received, counted once across the period.","example":519}}},"MailboxStatsPoint":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Per-mailbox email activity for one time bucket, bucketed by event time. Sent-mail metrics use the same delivery, engagement, and latency breakdowns as the email stats endpoints. `received` counts mail that arrived at the mailbox. Buckets with no activity are included with zero counts and `null` latency percentiles.\n","required":["bucket","sends_accepted","delivery","engagement","latency","received"],"properties":{"bucket":{"type":"string","minLength":1,"readOnly":true,"description":"The day (`YYYY-MM-DD`) or instant (RFC 3339, on the bucket boundary) this point covers, matching the period's grain.","example":"2026-07-21"},"sends_accepted":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct email messages the mailbox sent that were accepted in this bucket, counted at the message level (one per accepted send regardless of how many recipients it addresses). Every other sent-mail metric in `delivery` and `engagement` is recipient-level or event-level.\n","example":12},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailDeliveryStats"}]},"engagement":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailEngagementStats"}]},"latency":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EmailLatencyStats"}]},"received":{"type":"integer","minimum":0,"readOnly":true,"description":"Distinct emails the mailbox received in this bucket.","example":34}}},"MailboxStatsResponse":{"type":"object","additionalProperties":false,"description":"A mailbox's sent and received email statistics: a period-wide summary plus a bucketed time series. `period` echoes the range and grain actually used. `data` is one row per bucket in chronological order.\n","required":["period","summary","data"],"properties":{"period":{"$ref":"#/components/schemas/EmailStatsSeriesPeriod"},"summary":{"$ref":"#/components/schemas/MailboxStatsSummary"},"data":{"type":"array","readOnly":true,"description":"One row per bucket in the period, in chronological order. Buckets with no activity are included with zero counts.","items":{"$ref":"#/components/schemas/MailboxStatsPoint"}}}},"ReceiveRuleID":{"type":"string","minLength":1,"pattern":"^erl_[0-9a-hjkmnp-tv-z]{26}$","example":"erl_01krdgeqcxet5s7t44vh8rt9mg"},"ReceiveRule":{"type":"object","additionalProperties":false,"description":"An allow or block entry on a mailbox, evaluated when inbound mail arrives. Matching is against the message's envelope sender; domain entries also match subdomains. A given entry can be allow or block, never both.\n","required":["id","mailbox_id","action","entry","entry_type","note","created_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/ReceiveRuleID","description":"Identifies this rule for deletion. There is no update operation."},"mailbox_id":{"readOnly":true,"$ref":"#/components/schemas/MailboxID","description":"The mailbox the rule applies to."},"action":{"type":"string","minLength":1,"enum":["allow","block"],"readOnly":true,"description":"What the rule does when it matches. Block rules always win: over allow rules and over the reply admission on allowlist mailboxes."},"entry":{"type":"string","minLength":1,"maxLength":255,"readOnly":true,"description":"The sender address or domain the rule matches. Domains also match their subdomains.","example":"partner.example.com"},"entry_type":{"type":"string","minLength":1,"enum":["address","domain"],"readOnly":true,"description":"Whether the entry is a full address or a domain."},"note":{"type":["string","null"],"maxLength":512,"readOnly":true,"description":"Your own note about why the rule exists. `null` when unset."},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the rule was created."}}},"ReceiveRuleList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReceiveRule"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"ReceiveRuleCreate":{"type":"object","additionalProperties":false,"description":"Parameters for adding a receive rule to a mailbox.","required":["action","entry"],"properties":{"action":{"type":"string","minLength":1,"enum":["allow","block"],"description":"What the rule does when it matches. Block rules always win. To flip an entry's action, delete the existing rule and re-create it."},"entry":{"type":"string","minLength":1,"maxLength":255,"description":"The sender address (`alice@example.com`) or domain (`example.com`) to match. Domains also match their subdomains. Stored lowercase.","example":"partner.example.com"},"note":{"type":"string","minLength":1,"maxLength":512,"description":"Your own note about why the rule exists."}},"example":{"action":"allow","entry":"partner.example.com","note":"Approved partner senders"}},"EmailInboundRouteID":{"type":"string","minLength":1,"pattern":"^ein_[0-9a-hjkmnp-tv-z]{26}$","example":"ein_01krdgeqcxet5s7t44vh8rt9mg"},"InboundRoute":{"type":"object","additionalProperties":false,"description":"A routing rule that directs inbound mail on one of your domains into a mailbox, or drops it. Routes are tried in priority order, lowest number first. Each mailbox's own address always matches at priority 10 and your own routes take a priority from 11 to 1000, so delivery to an exact address always takes precedence.\n","required":["id","domain","match_type","match_value","action","target_mailbox_id","priority","enabled","created_at","updated_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/EmailInboundRouteID","description":"Inbound route ID."},"domain":{"type":"string","minLength":1,"readOnly":true,"description":"The domain the route applies to.","example":"mail.acme.com"},"match_type":{"type":"string","minLength":1,"enum":["address","catch_all"],"description":"How the route matches recipients. `address` matches one local part. `catch_all` matches every recipient on the domain that nothing else matched."},"match_value":{"type":["string","null"],"maxLength":64,"description":"The local part an `address` route matches. `null` for `catch_all` routes.","example":"refunds"},"action":{"type":"string","minLength":1,"enum":["deliver_to_mailbox","drop"],"description":"What happens to matching mail. `deliver_to_mailbox` delivers it to `target_mailbox_id`. `drop` discards it silently, with nothing stored and no webhook fired."},"target_mailbox_id":{"oneOf":[{"$ref":"#/components/schemas/MailboxID"},{"type":"null"}],"description":"The mailbox that receives matching mail. `null` for `drop` routes."},"priority":{"type":"integer","minimum":11,"maximum":1000,"description":"The order routes are tried in, lowest number first. Your own routes take a priority from 11 to 1000, and default to 100. A mailbox's own address always matches at priority 10."},"enabled":{"type":"boolean","description":"Whether the route is evaluated. Disabled routes are kept but skipped."},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the route was created."},"updated_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the route was last updated."}}},"InboundRouteList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of inbound routes in evaluation order, with the lowest priority number first.","items":{"$ref":"#/components/schemas/InboundRoute"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"InboundRouteCreate":{"type":"object","additionalProperties":false,"description":"Parameters for creating an inbound route.","required":["domain","match_type","action"],"properties":{"domain":{"type":"string","minLength":1,"maxLength":255,"description":"The domain the route applies to. It has to be one of your inbound-enabled custom domains.","example":"mail.acme.com"},"match_type":{"type":"string","minLength":1,"enum":["address","catch_all"],"description":"How the route matches recipients. `address` matches one local part and requires `match_value`. `catch_all` matches every recipient on the domain that nothing else matched."},"match_value":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9._-]+$","description":"The local part an `address` route matches. Required for `address` routes. Stored lowercase.","example":"refunds"},"action":{"type":"string","minLength":1,"enum":["deliver_to_mailbox","drop"],"description":"What happens to matching mail. `deliver_to_mailbox` delivers it to `target_mailbox_id` (required). `drop` discards it silently, with nothing stored and no webhook fired."},"target_mailbox_id":{"$ref":"#/components/schemas/MailboxID","description":"The mailbox that receives matching mail. Required for `deliver_to_mailbox` routes."},"priority":{"type":"integer","minimum":11,"maximum":1000,"default":100,"description":"The order routes are tried in, lowest number first. Your own routes take a priority from 11 to 1000. The mailbox's own address always matches at priority 10, so a route can never pre-empt exact-address delivery."},"enabled":{"type":"boolean","default":true,"description":"Whether the route is evaluated."}},"example":{"domain":"mail.acme.com","match_type":"address","match_value":"refunds","action":"deliver_to_mailbox","target_mailbox_id":"mbx_01krdgeqcxet5s7t44vh8rt9mg"}},"InboundRouteUpdate":{"type":"object","additionalProperties":false,"description":"Fields to update on an inbound route. Omitted fields are unchanged. The domain is immutable.","properties":{"match_type":{"type":"string","enum":["address","catch_all"],"description":"How the route matches recipients."},"match_value":{"type":["string","null"],"maxLength":64,"description":"The local part an `address` route matches. `null` for `catch_all` routes."},"action":{"type":"string","enum":["deliver_to_mailbox","drop"],"description":"What happens to matching mail. `deliver_to_mailbox` delivers it to `target_mailbox_id` (required). `drop` discards it silently, with nothing stored and no webhook fired."},"target_mailbox_id":{"oneOf":[{"$ref":"#/components/schemas/MailboxID"},{"type":"null"}],"description":"The mailbox that receives matching mail. `null` for `drop` routes."},"priority":{"type":"integer","minimum":11,"maximum":1000,"description":"The order routes are tried in, lowest number first. Your own routes take a priority from 11 to 1000. The mailbox's own address always matches at priority 10."},"enabled":{"type":"boolean","description":"Whether the route is evaluated."}},"example":{"priority":50,"enabled":true}},"EmailThreadFolder":{"type":"string","enum":["inbox","archive","spam","blocked","sent","trash"],"description":"Primary conversation folder. The supported folders are inbox, archive, spam, blocked, sent, and trash. Blocked and sent are assigned automatically. The sent filter also includes sent conversations that received replies and still sit in the inbox; moving them with PATCH removes them from the sent filter."},"EmailThreadReadState":{"type":"string","enum":["read","unread"],"description":"Whether retained received messages in the thread have been read. Includes retained trash, spam and blocked messages."},"ThreadID":{"type":"string","minLength":1,"pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","example":"thr_01krdgeqcxet5s7t44vh8rt9mg"},"EmailThreadParticipantName":{"type":"object","additionalProperties":false,"description":"A conversation participant's display name.","required":["address","name"],"properties":{"address":{"type":"string","format":"email","minLength":1,"description":"Participant address, as listed in the conversation's `participants`.","example":"ada@example.com"},"name":{"type":"string","minLength":1,"maxLength":256,"description":"Display name for this participant, such as `Ada Lovelace`. It is not verified.","example":"Ada Lovelace"}}},"EmailThreadHighlights":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Matched search fragments for a thread, one array per field the query matched, with the matched terms wrapped in `**`. A field is present only when the query matched it, so the keys that are present tell you which fields produced the hit. Returned only on thread search results.\n","properties":{"subject":{"type":"array","items":{"type":"string","minLength":1},"description":"Matched fragments from the conversation's subject.","example":["Re: your **order** **4821**"]},"text":{"type":"array","items":{"type":"string","minLength":1},"description":"Matched fragments from a message's body text.","example":["confirming your **order** **4821** shipped"]}}},"EmailThread":{"type":"object","readOnly":true,"additionalProperties":false,"description":"A conversation in a mailbox. It groups every message in both directions, the mail the mailbox received and the replies it sent, and it holds the conversation's read state, labels, and participant list. A message is retained until it is trashed or ages past the mailbox's retention tier. Only retained messages count toward the totals below.\n","required":["id","mailbox_id","channel","contact_id","subject","participants","participant_names","message_count","unread_count","last_message_at","last_direction","labels","folder","read","created_at","updated_at"],"properties":{"id":{"$ref":"#/components/schemas/ThreadID","description":"Thread ID."},"mailbox_id":{"$ref":"#/components/schemas/MailboxID","description":"Mailbox this conversation belongs to."},"channel":{"type":"string","minLength":1,"description":"Channel this conversation lives on. Always `email`.","example":"email"},"contact_id":{"oneOf":[{"$ref":"#/components/schemas/ContactID"},{"type":"null"}],"description":"Contact linked to this conversation, or null when none is linked."},"subject":{"type":["string","null"],"description":"Subject of the conversation, taken from its first message. Null when that message had no subject.","example":"Re: Your order"},"participants":{"type":"array","items":{"type":"string","format":"email"},"description":"Addresses that appear on the retained messages in this conversation, including the mailbox's own address."},"participant_names":{"type":"array","items":{"$ref":"#/components/schemas/EmailThreadParticipantName"},"description":"Display names for participants, taken from this conversation's messages. A name is either the one a sender gave in their From header or the one your mailbox gave a To or Cc recipient when sending. When a participant was named more than once, the most recent name is shown. Names are not verified, so identify participants by address. A participant without a name is absent."},"message_count":{"type":"integer","minimum":0,"description":"Number of retained messages in this conversation, both directions."},"unread_count":{"type":"integer","minimum":0,"description":"Number of retained received messages that are still unread. Spam and blocked mail is not counted."},"last_message_at":{"type":"string","format":"date-time","minLength":1,"description":"When the most recent retained message in this conversation was received or sent."},"last_direction":{"type":"string","enum":["inbound","outbound"],"minLength":1,"description":"Direction of the most recent message: `inbound` for a received message, `outbound` for a sent one."},"folder":{"$ref":"#/components/schemas/EmailThreadFolder"},"read":{"type":"boolean","description":"Whether every retained received message is read, including trash, spam and blocked messages. Outbound messages do not affect this state."},"labels":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":20,"description":"Custom labels applied to this conversation. Folder and read state are separate fields.","example":["urgent"]},"created_at":{"type":"string","format":"date-time","minLength":1,"description":"When the thread was created."},"updated_at":{"type":"string","format":"date-time","minLength":1,"description":"When the thread last changed."},"highlights":{"$ref":"#/components/schemas/EmailThreadHighlights","description":"Matched search fragments, keyed by the field that matched. Returned only by thread search. Omitted when listing threads.\n"},"scheduled_count":{"type":"integer","format":"int64","minimum":0,"description":"Scheduled or dispatching sends targeting this conversation. Returned by conversation get and list, including zero when none remain. Omitted by search."},"next_scheduled_at":{"type":"string","format":"date-time","description":"Earliest due time among scheduled or dispatching sends. Returned by conversation get and list only when scheduled_count is positive. Omitted by search and when no sends remain."}}},"EmailThreadList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailThread"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"EmailThreadWritableFolder":{"type":"string","minLength":1,"enum":["inbox","archive","spam"],"description":"Folder a caller can choose through PATCH. Use DELETE to move a thread to trash and [Restore a thread from trash](/docs/api/reference/restore-email-thread) (POST /v1/email/threads/{thread_id}/restore) to recover it."},"EmailThreadLabelsUpdate":{"type":"object","additionalProperties":false,"not":{"anyOf":[{"required":["set","add"],"properties":{"set":{},"add":{}}},{"required":["set","remove"],"properties":{"set":{},"remove":{}}}]},"example":{"add":["urgent"],"remove":["pending"]},"description":"Custom labels to add or remove, or the full set to replace them with. Send `set` on its own; combining it with `add` or `remove` returns 422. System names are refused; use read and folder for thread state. Reserved names are refused too, except a label the conversation already carries from before its name was reserved, which can still be removed, and kept in a `set` in any casing. The resulting custom-label set must contain at most 20 labels; larger sets return 422. A custom name added or set that the workspace does not have yet becomes a workspace label that stays after it is removed from every conversation; once the workspace has 100 labels, a write that would create one more is refused with `E17057`. Custom label names match the workspace's labels in any casing, so adding `Urgent` where the workspace has `urgent` applies `urgent`, and responses return the workspace's spelling.","properties":{"add":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[^,\\s\\x00-\\x1F\\x7F-\\x9F](?:[^,\\x00-\\x1F\\x7F-\\x9F]*[^,\\s\\x00-\\x1F\\x7F-\\x9F])?$"},"maxItems":20,"description":"Labels to apply.","example":["urgent"]},"remove":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[^,\\s\\x00-\\x1F\\x7F-\\x9F](?:[^,\\x00-\\x1F\\x7F-\\x9F]*[^,\\s\\x00-\\x1F\\x7F-\\x9F])?$"},"maxItems":20,"description":"Labels to take off.","example":["pending"]},"set":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[^,\\s\\x00-\\x1F\\x7F-\\x9F](?:[^,\\x00-\\x1F\\x7F-\\x9F]*[^,\\s\\x00-\\x1F\\x7F-\\x9F])?$"},"maxItems":20,"description":"The custom labels the conversation should carry, replacing all of its current ones. An empty array removes every custom label.","example":["urgent","follow-up"]}}},"EmailThreadUpdateRequest":{"type":"object","additionalProperties":false,"description":"Changes to apply to a thread. Omitted fields are left unchanged. Folder changes accept inbox, archive or spam and reject trashed threads with 422; first use [Restore a thread from trash](/docs/api/reference/restore-email-thread). Read and custom-label updates remain available in trash.","properties":{"read":{"type":"boolean","description":"Mark all retained received messages read or unread. Includes trash, spam and blocked messages; unread_count continues to exclude them."},"folder":{"$ref":"#/components/schemas/EmailThreadWritableFolder","description":"Move a non-trashed conversation to inbox, archive or spam. Use DELETE to trash it and POST restore to recover it. Blocked and sent folders are assigned automatically."},"labels":{"$ref":"#/components/schemas/EmailThreadLabelsUpdate"},"contact_id":{"oneOf":[{"$ref":"#/components/schemas/ContactID"},{"type":"null"}],"description":"Contact to link this conversation to, or null to unlink the current contact."}}},"MailboxScheduledMessageID":{"type":"string","minLength":1,"pattern":"^msm_[0-9a-hjkmnp-tv-z]{26}$","example":"msm_01krdgeqcxet5s7t44vh8rt9mg"},"EmailThreadMessageRecipient":{"type":"object","additionalProperties":false,"description":"One recipient's terminal delivery outcome on a sent conversation message, recorded once the outcome becomes known.\n","required":["address","status"],"properties":{"address":{"type":"string","format":"email","readOnly":true,"minLength":1,"description":"Recipient address."},"status":{"type":"string","enum":["delivered","failed"],"minLength":1,"readOnly":true,"description":"Terminal outcome: `delivered`, or `failed` (bounce or provider rejection)."}}},"EmailThreadMessageAttachment":{"type":"object","additionalProperties":false,"description":"Attachment metadata on a conversation message. Both the metadata and the attachment bytes stay available for the mailbox's retention tier.\n","required":["id","filename","content_type","size"],"properties":{"id":{"type":"string","readOnly":true,"minLength":1,"description":"Attachment ID, used to download the attachment bytes.","example":"rea_01krdgeqcxet5s7t44vh8rt9mg"},"filename":{"type":["string","null"],"readOnly":true,"description":"Original filename, or null when the attachment had none.","example":"invoice.pdf"},"content_type":{"type":["string","null"],"readOnly":true,"description":"MIME content type, or null when it could not be determined.","example":"application/pdf"},"size":{"type":"integer","readOnly":true,"minimum":0,"description":"Attachment size in bytes."}}},"EmailThreadMessageSource":{"type":"object","additionalProperties":false,"description":"Link to the message's entry in the received-message or sent-message log, which has delivery analytics such as per-recipient events. Log entries expire 30 days after the message occurred.\n","required":["resource","available_until"],"properties":{"resource":{"type":"string","readOnly":true,"minLength":1,"description":"API path of the log entry for this message.","example":"/v1/email/inbound-messages/rem_01krdgeqcxet5s7t44vh8rt9mg"},"available_until":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the log entry (and the message's body and raw MIME) expires. For a scheduled acknowledgement, calculated from the due time and replaced by the actual dispatch-based deadline once dispatched."}}},"EmailThreadMessage":{"type":"object","additionalProperties":false,"description":"A message in a mailbox conversation, either direction. Message metadata, extracted text, and attachment bytes stay readable for the mailbox's retention tier. The body and raw MIME are available through the body and raw endpoints for 30 days after the message occurred.\nA scheduled acknowledgement reserves the message and thread IDs but is not stored in the conversation until dispatch. Use its scheduled_message_id and mailbox_id to inspect or cancel the separate schedule; body and raw reads are unavailable before dispatch.\n","required":["id","direction","channel","thread_id","from","from_name","to","cc","delivered_to","subject","preview","labels","status","authentication","spf_pass","dkim_pass","dmarc_pass","attachment_count","attachment_manifest","reference_ids","contact_id","recipients","purge_at","source","occurred_at"],"properties":{"scheduled_message_id":{"$ref":"#/components/schemas/MailboxScheduledMessageID","readOnly":true,"description":"Separate schedule record, always present when status is scheduled."},"scheduled_at":{"type":"string","format":"date-time","readOnly":true,"description":"Planned send time on a scheduled acknowledgement."},"mailbox_id":{"$ref":"#/components/schemas/MailboxID","readOnly":true,"description":"Owning mailbox, always present on scheduled acknowledgements."},"notice":{"type":"string","readOnly":true,"description":"Informational notice when conversation retention expires before dispatch; the reserved thread is recreated without expired messages."},"id":{"type":"string","readOnly":true,"minLength":1,"pattern":"^(rem|em)_[0-9a-hjkmnp-tv-z]{26}$","description":"Message ID. Received messages have a `rem_` ID, sent messages an `em_` ID: the same IDs used by the received-message and sent-message logs.\n","example":"rem_01krdgeqcxet5s7t44vh8rt9mg"},"direction":{"type":"string","enum":["inbound","outbound"],"minLength":1,"readOnly":true,"description":"Which way the message went. `inbound` means you received it, `outbound` means you sent it."},"channel":{"type":"string","readOnly":true,"minLength":1,"description":"Channel this message lives on. Always `email`.","example":"email"},"thread_id":{"readOnly":true,"$ref":"#/components/schemas/ThreadID","description":"Conversation this message belongs to."},"from":{"type":"string","format":"email","readOnly":true,"minLength":1,"description":"Sender address."},"from_name":{"type":["string","null"],"readOnly":true,"maxLength":256,"description":"Display name in the sender's From header, such as `Ada Lovelace`. The sender chooses it and it is not verified, so identify the sender by `from`. Null when the sender gave no name or the name is not available.","example":"Ada Lovelace"},"to":{"type":"array","readOnly":true,"items":{"type":"string","format":"email"},"description":"Recipient addresses on the To line."},"cc":{"type":"array","readOnly":true,"items":{"type":"string","format":"email"},"description":"Recipient addresses on the Cc line. Empty when the message had none."},"delivered_to":{"type":["string","null"],"format":"email","readOnly":true,"description":"Address the message was actually delivered to, when it differs from the mailbox address (for example mail routed in from another address). Null for sent messages and for mail addressed directly to the mailbox.\n"},"subject":{"type":["string","null"],"readOnly":true,"description":"Message subject. Null when the message had no subject.","example":"Re: Your order"},"preview":{"type":["string","null"],"readOnly":true,"description":"Short plain-text preview of the message body."},"extracted_text":{"type":["string","null"],"readOnly":true,"description":"Plain-text content of the message with quoted history stripped. Readable for the mailbox's full retention tier, in both directions. Always present when fetching a single message. On list endpoints it is included only when the request sets `include=extracted_text`. Null when no text could be extracted.\n"},"labels":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":20,"description":"Labels on this message. A received message always has exactly one placement label:\n\n- `inbox`: Accepted mail.\n- `archive`: The message's conversation was filed away.\n- `spam`: The message is filed in Spam.\n- `blocked`: The message was rejected by the mailbox's receive policy or rules.\n\nA received message also has `unread` until it is read. `trash` marks a message in the trash, in either direction. Custom labels share the same list, and a message has at most 20 labels in total.\n","example":["inbox","unread"]},"status":{"type":["string","null"],"readOnly":true,"description":"Aggregate delivery status of a sent message:\n\n- `scheduled`: Acknowledgement only; the separate schedule is linked by scheduled_message_id.\n- `accepted`: Accepted for sending.\n- `sent`: Handed off to the provider.\n- `delivered`: All attempted recipients delivered.\n- `failed`: Terminal failure.\n\nNull for received messages.\n"},"recipients":{"type":["array","null"],"readOnly":true,"items":{"$ref":"#/components/schemas/EmailThreadMessageRecipient"},"description":"Terminal delivery outcomes for the visible To and Cc recipients of a sent message, filled in as each one becomes known and kept for the mailbox's full retention tier. Bcc recipients are omitted; aggregate status still includes every attempted recipient. Null for received messages and before any visible recipient reaches a terminal state. Per-recipient event detail lives on the sent-message log (`source`) for 30 days.\n"},"authentication":{"type":["string","null"],"enum":["pass","fail","unknown",null],"readOnly":true,"description":"DMARC result for the domain in the received message's `From` header.\n\n- `pass`: SPF or DKIM passed and aligned with that domain.\n- `fail`: DMARC was evaluated and did not pass.\n- `unknown`: no trustworthy verdict is available.\n\nThis follows `dmarc_pass` and does not verify a particular person. The receiving provider currently supplies no DMARC result, so received messages report `unknown`.\n\nNull for sent messages. This field is readable for the mailbox's full\nretention tier, so the verdict is still available after the 30-day\nreceived-message log has expired.\n"},"spf_pass":{"type":["boolean","null"],"readOnly":true,"description":"Whether the receiving provider reports that SPF authorized the envelope sender for the sending server. A soft failure is `false`. Missing, neutral and inconclusive results are `null`. Sent messages have `null` results. Kept for the mailbox retention tier."},"dkim_pass":{"type":["boolean","null"],"readOnly":true,"description":"Whether the receiving provider verified a DKIM signature. A passing signature makes this `true` even when another signature fails. Missing signatures and inconclusive verification results are `null`. Sent messages have `null` results. Kept for the mailbox retention tier."},"dmarc_pass":{"type":["boolean","null"],"readOnly":true,"description":"Whether SPF or DKIM passed and aligned with the domain in the message's `From` header. The receiving provider currently supplies no DMARC result, so this is `null`. Sent messages have `null` results. Kept for the mailbox retention tier."},"purge_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"Scheduled permanent-deletion time. For a scheduled acknowledgement, this is based on the due time and replaced with actual dispatch-based retention once it sends. This is the end of the mailbox's retention tier, moved to no more than 30 days in the future while the message is in the trash. Restore a trashed message before then with `PATCH {\"labels\": {\"remove\": [\"trash\"]}}`.\n"},"attachment_count":{"type":"integer","readOnly":true,"minimum":0,"description":"Number of attachments on the message."},"attachment_manifest":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/EmailThreadMessageAttachment"},"description":"Attachment metadata (filename, content type, size). Both the metadata and the attachment bytes stay available for the mailbox's retention tier.\n"},"reference_ids":{"type":"array","readOnly":true,"items":{"type":"string"},"description":"RFC 5322 References header entries used to thread the conversation."},"contact_id":{"oneOf":[{"$ref":"#/components/schemas/ContactID"},{"type":"null"}],"description":"Contact linked to this message, or null when none is linked."},"source":{"readOnly":true,"$ref":"#/components/schemas/EmailThreadMessageSource"},"occurred_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the message was received or accepted for sending. For a scheduled acknowledgement, the time it is due to send, replaced by the actual send time once it sends.\n"}}},"EmailThreadMessageList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailThreadMessage"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"EmailLabelsUpdate":{"type":"object","additionalProperties":false,"not":{"anyOf":[{"required":["set","add"],"properties":{"set":{},"add":{}}},{"required":["set","remove"],"properties":{"set":{},"remove":{}}}]},"example":{"add":["urgent"],"remove":["pending"]},"description":"Label changes to apply. Labels in `add` are applied and labels in `remove` are taken off; other labels are left untouched. Adding a label that is already present, or removing one that is not, has no effect. `set` instead replaces every custom label and leaves system labels as they are; send it on its own, since combining it with `add` or `remove` returns 422. On a message, adding or removing `unread` flips read state. Adding or removing `trash` moves it to or out of the trash. Placement labels cannot be applied to a message; use `folder` on [Update a thread](/docs/api/reference/update-email-thread) (`PATCH /v1/email/threads/{thread_id}`) to move its conversation. A sent message cannot use unread. Custom labels are 1-64 characters with no commas, control characters, or leading or trailing whitespace. System label names and a small reserved set (`all`, `archived`, `assigned`, `closed`, `deleted`, `draft`, `drafts`, `flagged`, `important`, `junk`, `muted`, `none`, `open`, `outbox`, `pinned`, `read`, `scheduled`, `snoozed`, `starred`) cannot be applied as custom labels, in any casing. A label applied before its name was reserved can still be removed, added again under the same name with no effect, and kept in a `set` in any casing. A conversation or message has at most 20 labels, system labels included. A custom name added or set that the workspace does not have yet becomes a workspace label that stays after it is removed from every conversation; once the workspace has 100 labels, a write that would create one more is refused with `E17057`. A name in both `add` and `remove` is removed and does not count as added. Custom label names match the workspace's labels in any casing: adding `Urgent` where the workspace has `urgent` applies `urgent`, and responses return the workspace's spelling.\n","properties":{"add":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[^,\\s\\x00-\\x1F\\x7F-\\x9F](?:[^,\\x00-\\x1F\\x7F-\\x9F]*[^,\\s\\x00-\\x1F\\x7F-\\x9F])?$"},"maxItems":20,"description":"Labels to apply.","example":["urgent"]},"remove":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[^,\\s\\x00-\\x1F\\x7F-\\x9F](?:[^,\\x00-\\x1F\\x7F-\\x9F]*[^,\\s\\x00-\\x1F\\x7F-\\x9F])?$"},"maxItems":20,"description":"Labels to take off.","example":["pending"]},"set":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[^,\\s\\x00-\\x1F\\x7F-\\x9F](?:[^,\\x00-\\x1F\\x7F-\\x9F]*[^,\\s\\x00-\\x1F\\x7F-\\x9F])?$"},"maxItems":20,"description":"The custom labels the message should carry, replacing all of its current ones; system labels such as `unread` and `trash` are unchanged. An empty array removes every custom label.","example":["urgent","follow-up"]}}},"EmailThreadMessageUpdateRequest":{"type":"object","additionalProperties":false,"description":"Changes to apply to a conversation message. Omitted fields are left unchanged.","properties":{"labels":{"$ref":"#/components/schemas/EmailLabelsUpdate"},"contact_id":{"oneOf":[{"$ref":"#/components/schemas/ContactID"},{"type":"null"}],"description":"Contact to link this message to, or null to unlink the current contact."}}},"EmailThreadMessageBody":{"type":"object","additionalProperties":false,"description":"The original rendered body of a conversation message. Available for 30 days after the message occurred. After that, the endpoint returns `410 Gone`, but the message's extracted text stays readable on the message itself.\n","required":["html","text"],"properties":{"html":{"type":["string","null"],"description":"The HTML body of the message, or null when the message had no HTML part."},"text":{"type":["string","null"],"description":"The plain-text body of the message, or null when the message had no text part."}}},"EmailThreadMessageAttachmentList":{"type":"object","additionalProperties":false,"description":"The attachments on a conversation message.","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailThreadMessageAttachment"}}}},"EmailRecipientAddress":{"type":"string","format":"email","minLength":5,"description":"Email address without a display name.","example":"jane@example.com"},"EmailThreadMessageReplyRequest":{"type":"object","additionalProperties":false,"description":"A reply to a conversation message. For a received message, recipients are derived from its Reply-To address when present, otherwise its From address. For a message the mailbox sent, recipients are derived from its original To line. Set `reply_all` to also include the original To and Cc recipients (minus the mailbox's own address). Add `cc` or `bcc` to copy further recipients. The subject and threading headers are set automatically. At least one of `html` or `text` must be provided.\n","not":{"required":["scheduled_at","attachments"],"properties":{"scheduled_at":{},"attachments":{"minItems":1}}},"properties":{"scheduled_at":{"type":"string","format":"date-time","description":"Send between 30 seconds and 30 days ahead, sharing the scheduled-email allowance. The scheduled send is listed separately and enters the conversation only at dispatch. Sender, mailbox and send-volume eligibility are rechecked then; refusal fails the schedule record without adding a conversation message. Retention starts at dispatch. Attachments are not supported on scheduled messages; send now or schedule without attachments."},"html":{"type":"string","maxLength":524288,"description":"HTML body of the reply. At least one of html or text must be provided."},"text":{"type":"string","maxLength":524288,"description":"Plain-text body of the reply. At least one of html or text must be provided."},"cc":{"type":"array","items":{"$ref":"#/components/schemas/EmailRecipientAddress"},"maxItems":50,"description":"Additional Cc recipients, merged with recipients derived by `reply_all`. Addresses already on the derived To line are dropped (case-insensitive). The merged Cc set must contain at most 50 addresses; larger sets return 422."},"bcc":{"type":"array","items":{"$ref":"#/components/schemas/EmailRecipientAddress"},"maxItems":50,"description":"Blind-copy recipients. Addresses already on the derived To or merged Cc line are dropped (case-insensitive). Bcc addresses are omitted from conversation participants, visible recipient headers, and the 202 response. Bcc delivery outcomes are excluded from the message's `recipients` list."},"reply_all":{"type":"boolean","default":false,"description":"Also send the reply to the original To and Cc recipients, minus the mailbox's own address."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"},"maxItems":20,"description":"Structured `{name, value}` labels for filtering and analytics on the sent-message log. Cap: 20 tags per send.\n"},"metadata":{"type":"object","additionalProperties":true,"description":"Arbitrary JSON object stored on the send and echoed in webhook payloads. Cap: 2 KB serialized.\n"},"category":{"$ref":"#/components/schemas/EmailMessageCategory","default":"transactional"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/EmailAttachment"},"maxItems":20,"description":"File attachments to include with the reply. The send is rejected when the estimated generated message size exceeds 20 MB (bodies plus all attachments after base64 encoding). Keep total raw attachment content at or below 15 MB for reliable headroom. Attachment metadata stays on the message's `attachment_manifest`, and the bytes are downloadable for the mailbox's retention tier.\n"},"cancel_on_reply":{"type":"boolean","default":false,"description":"When scheduled_at is set, cancel if an inbound message arrives in the conversation before dispatch is claimed. Defaults to false: the frozen parent, recipients and content are sent unchanged even if new mail arrives."}},"example":{"text":"Thanks, confirming we received your request."}},"EmailMailboxScheduledMessageStatus":{"type":"string","minLength":1,"enum":["scheduled","sending","sent","failed","canceled"],"description":"- `scheduled`: Waiting for its due time; cancellation is still possible.\n- `sending`: Dispatch has been claimed; cancellation is no longer possible.\n- `sent`: Handed to the ordinary send pipeline, not necessarily delivered. Follow message_id for delivery status.\n- `failed`: Terminal dispatch refusal or failure; see failure_reason. The schedule will not retry.\n- `canceled`: Terminal cancellation before dispatch; see cancellation_reason. The message will not send."},"EmailMailboxScheduledMessage":{"readOnly":true,"unevaluatedProperties":false,"allOf":[{"type":"object","description":"A mailbox-owned scheduled send, separate from conversation messages. Sent means handed to the ordinary send pipeline, not delivered; follow message_id for delivery status. Frozen recipients and reply headers do not change when new mail arrives. Terminal records remain until the mailbox is permanently erased.","required":["id","mailbox_id","thread_id","status","scheduled_at","cancel_on_reply","recipients","subject","snippet","created_by"],"properties":{"id":{"$ref":"#/components/schemas/MailboxScheduledMessageID","description":"Scheduled send identifier."},"mailbox_id":{"$ref":"#/components/schemas/MailboxID","description":"Mailbox that owns the send."},"thread_id":{"$ref":"#/components/schemas/ThreadID","description":"Reserved conversation identifier. A new compose does not create the conversation until dispatch."},"message_id":{"$ref":"#/components/schemas/EmailID","description":"Actual message identifier once handed to the send pipeline."},"status":{"$ref":"#/components/schemas/EmailMailboxScheduledMessageStatus"},"scheduled_at":{"type":"string","minLength":1,"format":"date-time","description":"Scheduled at."},"cancel_on_reply":{"type":"boolean","description":"Whether an inbound message cancels this send before dispatch is claimed."},"failure_reason":{"type":"string","description":"Why dispatch failed."},"cancellation_reason":{"type":"string","description":"Why canceled; replied means new inbound mail canceled an opted-in schedule."},"subject":{"type":"string","minLength":0,"description":"Frozen subject."},"snippet":{"type":"string","minLength":0,"description":"Plain-text preview of the frozen message."},"recipients":{"type":"array","items":{"type":"string","format":"email","minLength":1},"description":"Visible recipients (To and Cc). Bcc addresses remain only in the frozen send payload."},"created_by":{"$ref":"#/components/schemas/Actor","description":"Authenticated caller that scheduled the send."}}},{"$ref":"#/components/schemas/Timestamps"}],"example":{"id":"msm_01krdgeqcxet5s7t44vh8rt9mg","mailbox_id":"mbx_01krdgeqcxet5s7t44vh8rt9mg","thread_id":"thr_01krdgeqcxet5s7t44vh8rt9mg","status":"scheduled","scheduled_at":"2026-05-20T10:00:00Z","cancel_on_reply":false,"recipients":["customer@example.com"],"subject":"Your request","snippet":"Here is the reply.","created_by":{"id":"usr_01krdgeqcxet5s7t44vh8rt9mg","type":"user"},"created_at":"2026-05-20T09:14:52Z","updated_at":"2026-05-20T09:14:52Z"}},"EmailMailboxScheduledMessageList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailMailboxScheduledMessage"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"EmailMailboxComposeRequest":{"type":"object","additionalProperties":false,"description":"A new message sent from a mailbox, starting a new conversation. Mirrors the plain send request without `from`, because the mailbox is who the message comes from, and accepts `scheduled_at` to send later. Omit it to send immediately. We set the RFC 5322 Message-ID so replies thread back into this conversation. At least one of `html` or `text` must be provided.\n","required":["to","subject"],"not":{"required":["scheduled_at","attachments"],"properties":{"scheduled_at":{},"attachments":{"minItems":1}}},"properties":{"scheduled_at":{"type":"string","format":"date-time","description":"Send between 30 seconds and 30 days ahead, sharing the scheduled-email allowance. The scheduled send is listed separately and enters the conversation only at dispatch. Sender, mailbox and send-volume eligibility are rechecked then; refusal fails the schedule record without adding a conversation message. Retention starts at dispatch. Attachments are not supported on scheduled messages; send now or schedule without attachments."},"to":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddressInput"},"minItems":1,"maxItems":50,"description":"Primary recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@acme.com>`), or an object with an optional display name."},"cc":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddressInput"},"maxItems":50,"description":"CC recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@acme.com>`), or an object with an optional display name."},"bcc":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddressInput"},"maxItems":50,"description":"BCC recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@acme.com>`), or an object with an optional display name."},"subject":{"type":"string","minLength":1,"maxLength":998,"description":"Message subject line."},"html":{"type":"string","maxLength":524288,"description":"HTML body. At least one of html or text must be provided."},"text":{"type":"string","maxLength":524288,"description":"Plain-text body. At least one of html or text must be provided."},"reply_to":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddressInput"},"minItems":1,"maxItems":25,"description":"Reply-To addresses. When omitted, the mailbox's `default_reply_to` applies (replies then come back to the mailbox itself).\n"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/EmailAttachment"},"maxItems":20,"description":"File attachments. The send is rejected when the estimated generated message size exceeds 20 MB (bodies plus all attachments after base64 encoding). Keep total raw attachment content at or below 15 MB for reliable headroom. Attachment metadata stays on the message's `attachment_manifest`, and the bytes are downloadable for the mailbox's retention tier.\n"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"},"maxItems":20,"description":"Structured `{name, value}` labels for filtering and analytics on the sent-message log. Cap: 20 tags per send.\n"},"metadata":{"type":"object","additionalProperties":true,"description":"Arbitrary JSON object stored on the send and echoed in webhook payloads. Cap: 2 KB serialized.\n"},"category":{"$ref":"#/components/schemas/EmailMessageCategory","default":"transactional"},"cancel_on_reply":{"type":"boolean","default":false,"description":"When scheduled_at is set, cancel if an inbound message arrives in the conversation before dispatch is claimed. Defaults to false: the frozen parent, recipients and content are sent unchanged even if new mail arrives."}},"example":{"to":["delivered@messagebird.dev"],"subject":"Your quote","text":"Hi, here is the quote you asked for."}},"EmailSmtpConfig":{"allOf":[{"type":"object","required":["api_key_id","category","tags","track_opens","track_clicks"],"properties":{"api_key_id":{"readOnly":true,"$ref":"#/components/schemas/APIKeyID","description":"ID of the API key this config applies to, the same key your SMTP client authenticates with. One config exists per key.\n"},"ip_pool_id":{"type":["string","null"],"pattern":"^ipp_([0-9a-hjkmnp-tv-z]{26}|shared)$","description":"ID of the IP pool that SMTP sends with this key use, or `ipp_shared` for the shared pool. `null` when this key uses your organization's default pool.\n"},"category":{"type":"string","minLength":1,"enum":["marketing","transactional"],"description":"Content classification applied to messages submitted over SMTP with\nthis key. Controls suppression policy:\n\n- `marketing`: Blocks on all suppression reasons.\n- `transactional`: Allows delivery through complaint and unsubscribe suppressions.\n"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"},"maxItems":20,"description":"Structured `{name, value}` labels applied to every message submitted over SMTP with this key, the same tags used by the email sending API. Use tags to filter and break down your email statistics.\n"},"track_opens":{"type":"boolean","description":"Whether open events are tracked for messages submitted over SMTP with this key."},"track_clicks":{"type":"boolean","description":"Whether click events are tracked for messages submitted over SMTP with this key."}}},{"$ref":"#/components/schemas/Timestamps"},{"type":"object","properties":{"brand_id":{"type":["string","null"],"pattern":"^bnd_[0-9a-hjkmnp-tv-z]{26}$","description":"Brand selected for SMTP messages submitted with this key. `null` means messages use the workspace default Brand.\n"}}}]},"EmailSmtpConfigList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","description":"Page of stored SMTP configs, newest first by default.","items":{"$ref":"#/components/schemas/EmailSmtpConfig"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"EmailSmtpConfigUpdate":{"type":"object","additionalProperties":false,"description":"Desired changes to the SMTP config for the key. A field you omit is left unchanged. If no config exists yet for this key, omitted fields take their documented defaults instead.\n","properties":{"ip_pool_id":{"type":["string","null"],"pattern":"^ipp_([0-9a-hjkmnp-tv-z]{26}|shared)$","description":"ID of the IP pool to send from (`ipp_` prefix), or `ipp_shared` to route through the shared pool explicitly. Send `null` to reset to your organization's default pool, or omit to leave unchanged. An unknown pool, or a pool with no dedicated IPs available to send from, is rejected with a `422`.\n"},"category":{"type":"string","enum":["marketing","transactional"],"description":"Content classification, independent of which endpoint messages are\nsubmitted through. Controls suppression policy:\n\n- `marketing`: Blocks on all suppression reasons.\n- `transactional`: Allows delivery through complaint and unsubscribe suppressions.\n\nOmit to leave unchanged.\n"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"},"maxItems":20,"description":"Structured `{name, value}` labels applied to every message submitted over SMTP with this key. Send an empty array to clear all tags, or omit to leave unchanged.\n"},"track_opens":{"type":"boolean","description":"Whether to track open events for messages submitted over SMTP with this key. Omit to leave unchanged."},"track_clicks":{"type":"boolean","description":"Whether to track click events for messages submitted over SMTP with this key. Omit to leave unchanged."},"brand_id":{"type":["string","null"],"pattern":"^bnd_[0-9a-hjkmnp-tv-z]{26}$","description":"Select an active Brand in this workspace for messages submitted with this key. Send `null` to use the workspace default Brand, or omit to keep the current selection. An unavailable selection returns `422`; a Brand whose setup is incomplete returns `503`. When rotating an API key, configure the replacement key's Brand before switching SMTP traffic; the new key does not inherit these settings.\n"}}},"WebhookSortField":{"type":"string","enum":["created_at","url"],"default":"created_at","description":"Field to sort webhook endpoints by: `created_at` (the default; newest first with the default `order`) or `url`.\n"},"WebhookEndpointID":{"type":"string","minLength":1,"pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","example":"whk_01krdgeqcxet5s7t44vh8rt9mg"},"WebhookFilter":{"type":"object","required":["mailbox_id"],"additionalProperties":false,"properties":{"mailbox_id":{"allOf":[{"$ref":"#/components/schemas/MailboxID"}],"description":"Mailbox to receive events for. Must belong to this workspace; a mailbox outside it returns `422`.\n"}},"description":"Exact match on `mailbox_id`, for `email_mailbox.*` events only; the mailbox must belong to this workspace. Cannot be combined with Realtime app scope. Omit on create for all resources; on update omit to keep, send `null` to clear.\n","example":{"mailbox_id":"mbx_01kr97a6rje4wbe5z40wxdfcy9"}},"WebhookEventType":{"type":"string","minLength":1,"description":"Webhook event type. This is an open enum, so accept unrecognized values in deliveries. Subscribing to a type outside the event catalog returns a `422`.\n","x-extensible-enum":["amb.accepted","amb.authentication.updated","amb.conversation_closed","amb.conversation_reopened","amb.conversation_started","amb.received","amb.rejected","amb.send_failed","amb.sent","amb_suppression.created","domain.failed","domain.verified","email.accepted","email.bounced","email.canceled","email.clicked","email.complained","email.deferred","email.delivered","email.list_unsubscribed","email.opened","email.out_of_band_bounce","email.processed","email.received","email.rejected","email.scheduled","email.unsubscribed","email_mailbox.message_delivered","email_mailbox.message_failed","email_mailbox.message_received","email_mailbox.message_sent","email_mailbox.suspended","email_mailbox.thread_created","email_suppression.created","preference.deleted","preference.granted","preference.revoked","sms.accepted","sms.delivered","sms.expired","sms.failed","sms.received","sms.rejected","sms.sent","sms.undelivered","sms_suppression.created","verify.attempt.delivered","verify.attempt.sent","verify.attempt.undelivered","verify.verification.created","verify.verification.failed","verify.verification.verified","voice_call.answered","voice_call.ended","voice_call.initiated","whatsapp.accepted","whatsapp.delivered","whatsapp.failed","whatsapp.group.join_request_created","whatsapp.group.join_request_revoked","whatsapp.reacted","whatsapp.read","whatsapp.received","whatsapp.rejected","whatsapp.sent","whatsapp_suppression.created"]},"WebhookRawDestination":{"type":"object","additionalProperties":false,"required":["type"],"description":"Posts the signed event to the endpoint's `url` unchanged.","properties":{"type":{"type":"string","minLength":1,"const":"webhook"}}},"ConnectorID":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$","description":"Stable identifier of a connector, such as `claude_managed_agents`.","example":"claude_managed_agents"},"ConnectorActionID":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$","description":"Identifier of an action, unique within its connector.","example":"trigger_run"},"ConnectionConfig":{"type":"object","maxProperties":16,"additionalProperties":{"type":"string","minLength":1,"maxLength":2048},"description":"Values for the connector's nonsecret fields, keyed by field `name`, such as the URL the endpoint's requests go to. A URL must be HTTPS, on one of the connector's `allowed_origins`, and under its `path_prefix` when it has one. It cannot include user info, a fragment, an IP address as its host, dot segments, or encoded slashes.\n","example":{"trigger_url":"https://agents.example.com/triggers/support"}},"WebhookConnectorBinding":{"type":"object","additionalProperties":false,"required":["connector_id","action","connection_name"],"properties":{"connector_id":{"$ref":"#/components/schemas/ConnectorID"},"action":{"allOf":[{"$ref":"#/components/schemas/ConnectorActionID"}],"description":"Action of the connector that each delivery runs."},"connection_name":{"type":"string","minLength":1,"description":"Label of the credentials the endpoint delivers with.","example":"Support triage agent"},"config":{"allOf":[{"$ref":"#/components/schemas/ConnectionConfig"}],"description":"The connector's nonsecret fields as the endpoint delivers with them. Secret fields are never returned.\n"}}},"WebhookConnectorDestination":{"type":"object","additionalProperties":false,"required":["type","connector"],"description":"Sends the request a connector action builds, with the credentials stored for this endpoint. The endpoint's URL comes from its connector setup, so updating the endpoint with a `url` returns a `422`.\n","properties":{"type":{"type":"string","minLength":1,"const":"connector"},"connector":{"$ref":"#/components/schemas/WebhookConnectorBinding"}}},"WebhookDestination":{"description":"How each delivery to the endpoint is built. The type cannot change after the endpoint is created.","oneOf":[{"$ref":"#/components/schemas/WebhookRawDestination"},{"$ref":"#/components/schemas/WebhookConnectorDestination"}],"discriminator":{"propertyName":"type","mapping":{"webhook":"#/components/schemas/WebhookRawDestination","connector":"#/components/schemas/WebhookConnectorDestination"}}},"WebhookEndpoint":{"allOf":[{"type":"object","required":["id","url","events","filter","status","created_at","updated_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/WebhookEndpointID","description":"Unique identifier for the endpoint (`whk_` prefix). Accepted as `webhook_id` by every `/v1/webhooks/{webhook_id}` operation.\n"},"url":{"type":"string","format":"uri","minLength":1,"description":"HTTPS URL where the API delivers events for this endpoint.","example":"https://example.com/webhook"},"description":{"type":"string","minLength":1,"description":"Human-readable label for the endpoint.","example":"Production webhook endpoint"},"filter":{"description":"Mailbox scope configured through filter, or null.","example":null,"oneOf":[{"$ref":"#/components/schemas/WebhookFilter"},{"type":"null"}]},"events":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventType"},"description":"Event types this endpoint is subscribed to; only matching events are delivered. Change the set with [Update a webhook endpoint](/docs/api/reference/update-webhook).\n","example":["email.delivered","email.bounced"]},"status":{"type":"string","readOnly":true,"minLength":1,"description":"Delivery state of the endpoint.\n\n- `active`: The initial state; events are being delivered normally.\n- `degraded`: Recent deliveries are failing. We keep delivering and retrying,\n  and the endpoint returns to `active` automatically once deliveries succeed\n  again.\n- `paused`: All delivery is stopped, either because an update set `status` to\n  `paused` or automatically after sustained delivery failures. A paused endpoint\n  never resumes on its own: re-enable it with\n  [Update a webhook endpoint](/docs/api/reference/update-webhook), then\n  [Replay failed deliveries](/docs/api/reference/create-webhook-replay) to\n  recover the deliveries that failed before the pause. Events that arrived\n  while it was paused were never attempted, so a replay does not reach them.\n","enum":["active","degraded","paused"]},"destination":{"allOf":[{"$ref":"#/components/schemas/WebhookDestination"}],"description":"How each delivery to the endpoint is built.","example":{"type":"webhook"}},"next":{"type":"array","readOnly":true,"description":"What to do next with this endpoint. The responses that create or update a connector endpoint suggest testing it, which checks its fields with the connected platform. Other responses that return one endpoint return an empty list, and lists omit it.","items":{"$ref":"#/components/schemas/NextAction"}}}},{"$ref":"#/components/schemas/Timestamps"}]},"WebhookEndpointList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"WebhookConnectorID":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$","description":"The connector to deliver through; [Webhook connectors](/docs/ai/webhook-connectors) lists each one's fields, accepted events and platform setup.","example":"claude_managed_agents"},"ConnectionCredentials":{"type":"object","writeOnly":true,"x-sensitive":true,"minProperties":1,"maxProperties":16,"additionalProperties":{"type":"string","minLength":1,"maxLength":4096},"description":"Values for the connector's secret fields, keyed by field `name`. Every required secret field must be present, after merging with the stored values on an update, and a key the connector does not declare as secret returns a `422`. No response includes these values.\n","example":{"token":"example-trigger-token"}},"WebhookConnectorSetup":{"type":"object","additionalProperties":false,"required":["connector_id","credentials"],"properties":{"connector_id":{"$ref":"#/components/schemas/WebhookConnectorID"},"action":{"allOf":[{"$ref":"#/components/schemas/ConnectorActionID"}],"description":"Action of the connector that each delivery runs. Omit when the connector has one action. An action the connector does not have, or `events` the action does not accept, returns a `422`.\n"},"credentials":{"$ref":"#/components/schemas/ConnectionCredentials"},"config":{"$ref":"#/components/schemas/ConnectionConfig"}},"description":"The connector to deliver through and the values it needs. Omit the endpoint's `url`: Bird builds it from the connector's URL and these `config` values, and a URL given anyway must equal that. The credentials belong to this endpoint alone, and deleting the endpoint erases them.\n"},"WebhookConnectorDestinationCreate":{"type":"object","additionalProperties":false,"required":["type","connector"],"description":"Sends the request a connector action builds, with credentials stored for this endpoint.","properties":{"type":{"type":"string","minLength":1,"const":"connector"},"connector":{"x-sensitive":true,"allOf":[{"$ref":"#/components/schemas/WebhookConnectorSetup"}]}}},"WebhookDestinationCreate":{"description":"How each delivery to the endpoint is built. The type cannot change after the endpoint is created.","oneOf":[{"$ref":"#/components/schemas/WebhookRawDestination"},{"$ref":"#/components/schemas/WebhookConnectorDestinationCreate"}],"discriminator":{"propertyName":"type","mapping":{"webhook":"#/components/schemas/WebhookRawDestination","connector":"#/components/schemas/WebhookConnectorDestinationCreate"}}},"WebhookEndpointCreate":{"type":"object","additionalProperties":false,"required":["events"],"properties":{"url":{"type":"string","maxLength":2048,"format":"uri","minLength":1,"description":"HTTPS URL to deliver events to, at most 2048 characters. The host must be publicly reachable: URLs on private, loopback, or link-local addresses are rejected with a `422`. Required unless `destination` is a connector, whose URL comes from the connector and its `config`; a URL given with one must equal it.\n","example":"https://example.com/webhook"},"filter":{"description":"Limit delivery to one mailbox and only email_mailbox events. Omit to include all resources.","$ref":"#/components/schemas/WebhookFilter"},"events":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventType"},"minItems":1,"description":"Event types to subscribe to; the endpoint receives only matching events. Types outside the event catalog return a `422`, and an endpoint holds at most 100 entries.","example":["email.delivered","email.bounced"]},"description":{"type":"string","maxLength":256,"description":"Human-readable label for this endpoint, up to 256 characters.","example":"Production webhook endpoint"},"destination":{"allOf":[{"$ref":"#/components/schemas/WebhookDestinationCreate"}],"description":"How each delivery is built. Omit to post the signed event to `url` unchanged, the same as `{\"type\": \"webhook\"}`.\n"}},"example":{"url":"https://example.com/webhooks/bird","events":["email.delivered","email.bounced"],"description":"Production delivery + bounce notifications"}},"WebhookEndpointCreated":{"allOf":[{"$ref":"#/components/schemas/WebhookEndpoint"},{"type":"object","required":["secret"],"properties":{"secret":{"type":"string","minLength":1,"x-sensitive":true,"description":"Signing secret for this endpoint (`whsec_` prefix), used to verify every delivery signature. Present in this response only: store it immediately, it cannot be retrieved again. If you lose it, mint a new one with [Rotate webhook signing secret](/docs/api/reference/rotate-webhook-secret).\n","example":"whsec_base64encodedvalue"}}}]},"WebhookDestinationType":{"type":"string","enum":["webhook","connector"],"description":"How deliveries to the webhook endpoint are built: `webhook` posts the signed event unchanged to the endpoint URL; `connector` builds the delivery using the configured connector action. An existing endpoint's type cannot change; a different value returns a `422`.\n"},"ConnectionConfigPatch":{"type":"object","maxProperties":16,"additionalProperties":{"type":["string","null"],"minLength":1,"maxLength":2048},"description":"Changes to the connector's nonsecret fields, keyed by field `name`. A key given replaces that field, `null` clears an optional one, and a key left out keeps its stored value. A required field cannot be cleared, and the result is checked as at creation.\n","example":{"vault_id":"vlt_011CZkZDLs7fYzm1hXNPeRjv"}},"WebhookConnectorSetupUpdate":{"type":"object","additionalProperties":false,"properties":{"connector_id":{"allOf":[{"$ref":"#/components/schemas/WebhookConnectorID"}],"description":"The endpoint's connector. It cannot change, so a different value returns a `422`."},"action":{"allOf":[{"$ref":"#/components/schemas/ConnectorActionID"}],"description":"The endpoint's action. It cannot change, so a different value returns a `422`."},"credentials":{"allOf":[{"$ref":"#/components/schemas/ConnectionCredentials"}],"description":"New values for the connector's secret fields, merged over the stored ones: a key given replaces that field and an omitted key keeps its value. The next delivery, retries included, uses them.\n"},"config":{"$ref":"#/components/schemas/ConnectionConfigPatch"}},"description":"Changes to the endpoint's connector, nested as on creation. A field the endpoint's URL is built from moves the URL with it. New deliveries are prepared with the current config. Queued deliveries keep their prepared body, but every send attempt, including retries, uses the current destination URL and credentials.\n"},"WebhookDestinationUpdate":{"type":"object","additionalProperties":false,"properties":{"type":{"$ref":"#/components/schemas/WebhookDestinationType"},"connector":{"x-sensitive":true,"allOf":[{"$ref":"#/components/schemas/WebhookConnectorSetupUpdate"}]}},"description":"Changes to how deliveries are built, shaped as at creation. Only a `connector` destination takes `connector`; on any other endpoint it returns a `422`. Omit to keep the destination.\n"},"WebhookEndpointUpdate":{"type":"object","additionalProperties":false,"x-sensitive":true,"properties":{"url":{"type":"string","maxLength":2048,"format":"uri","description":"Replacement delivery URL. Same rules as at creation: HTTPS, at most 2048 characters, and the host must be publicly reachable (private, loopback, and link-local addresses return a `422`). Omit to keep the current URL. A connector endpoint's URL comes from its connector and cannot be replaced: any value returns a `422`.\n","example":"https://example.com/webhook"},"description":{"type":"string","maxLength":256,"description":"Human-readable label for this endpoint, up to 256 characters.","example":"Updated webhook endpoint"},"filter":{"description":"Replace the mailbox scope. Omit to keep it, or send null to include all resources. Scoped endpoints accept only email_mailbox events.","oneOf":[{"$ref":"#/components/schemas/WebhookFilter"},{"type":"null"}]},"events":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventType"},"minItems":1,"description":"Replaces all event subscriptions with this list. Omit to keep the current set. Types outside the event catalog return a `422`.\n","example":["email.delivered","email.bounced","email.complained"]},"destination":{"$ref":"#/components/schemas/WebhookDestinationUpdate"},"status":{"type":"string","enum":["active","paused"],"description":"`paused` stops all deliveries; `active` re-enables a paused endpoint. Omit to leave the status unchanged. Events that fire while paused are not delivered and a replay cannot recover them, because they were never attempted; after re-enabling, [Replay failed deliveries](/docs/api/reference/create-webhook-replay) reaches only the deliveries that failed before the pause. A `degraded` endpoint cannot be reset through this field: it returns to `active` automatically once deliveries succeed again.\n"}}},"WebhookRotateSecretResponse":{"type":"object","additionalProperties":false,"required":["secret"],"properties":{"secret":{"type":"string","minLength":1,"x-sensitive":true,"description":"The new signing secret (`whsec_` prefix). Shown only in this response: store it immediately, it cannot be retrieved again. Deliveries are signed with both this and the previous secret for 24 hours after rotation, then the previous secret stops signing.\n","example":"whsec_newbase64encodedvalue"}}},"WebhookTestRequest":{"type":"object","additionalProperties":false,"properties":{"event_type":{"type":"string","description":"Event type to simulate. Any type from the event catalog is accepted, whether or not the endpoint subscribes to it; an unknown type returns a `422`. When omitted, the endpoint's first subscribed event type is used.\n","example":"email.delivered"}},"example":{"event_type":"email.delivered"}},"WebhookTestKind":{"type":"string","minLength":1,"enum":["delivery","probe"],"description":"What the test did. `delivery` sent the test event to the endpoint. `probe` read the connected platform instead, which checks a connector endpoint's fields, sends no event and starts nothing; the status, HTTP details and latency are then the platform's answer to that read. Absent when the test stopped before sending anything, with `error` saying why.\n"},"AMBAcceptedEventType":{"type":"string","minLength":1,"enum":["amb.accepted"],"description":"Always `amb.accepted` for this event.","example":"amb.accepted"},"EventAMBMessageData":{"type":"object","additionalProperties":false,"description":"The workspace and message snapshot at the time of the lifecycle event.","required":["workspace_id","message"],"properties":{"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"Workspace that owns this message."},"message":{"$ref":"#/components/schemas/AMBMessage","description":"Message state when the event occurred. Later state changes do not alter this snapshot. Customer metadata is included when present; reserved Bird metadata is excluded."}}},"EventAMBAccepted":{"type":"object","additionalProperties":false,"description":"An outbound message was accepted for processing after confirming billing coverage. This does not confirm receipt by Apple.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/AMBAcceptedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When this lifecycle event occurred, independent of webhook delivery time.","example":"2026-09-25T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventAMBMessageData","example":{"workspace_id":"ws_01krdgeqcxet5s7t44vh8rt9mg","message":{"id":"amb_01krdgeqcxet5s7t44vh8rt9mg","conversation_id":"acv_01krdgeqcxet5s7t44vh8rt9mg","business_account_id":"abz_01krdgeqcxet5s7t44vh8rt9mg","direction":"outbound","status":"accepted","kind":"text","source":"operator","text":{"body":"Your order has shipped."},"locale":"en_US","category":"order_update","tags":[{"name":"category","value":"welcome"}],"cost":null,"requested_language":null,"resolved_language":null,"template_id":null,"template_version_id":null,"template_content_hash":null,"created_at":"2026-09-25T11:59:59Z"}}}}},"AMBAuthenticationUpdatedEventType":{"type":"string","minLength":1,"enum":["amb.authentication.updated"],"description":"Always `amb.authentication.updated` for this event.","example":"amb.authentication.updated"},"EventAMBAuthenticationData":{"type":"object","additionalProperties":false,"description":"Business routing context and the authentication request at its terminal status.","required":["workspace_id","business_account_id","authentication"],"properties":{"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"Workspace that owns this authentication request."},"business_account_id":{"$ref":"#/components/schemas/AMBBusinessID","description":"Apple Messages business that owns this authentication request."},"authentication":{"$ref":"#/components/schemas/AMBAuthentication","description":"The completed authentication request, in the same format as a single-request read."}}},"EventAMBAuthenticationUpdated":{"type":"object","additionalProperties":false,"description":"An Apple Messages for Business authentication request reached a terminal status. A request produces at most one event, and none when its business is disconnected. Read the request to recover a missing outcome. The event never contains the customer's tokens or authorization code.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/AMBAuthenticationUpdatedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the request reached its terminal status, independent of webhook delivery time.","example":"2026-11-11T09:14:27Z"},"data":{"$ref":"#/components/schemas/EventAMBAuthenticationData"}}},"AMBConversationClosedEventType":{"type":"string","minLength":1,"enum":["amb.conversation_closed"],"description":"Always `amb.conversation_closed` for this event.","example":"amb.conversation_closed"},"EventAMBConversationData":{"type":"object","additionalProperties":false,"description":"Conversation identity and routing context when a lifecycle event occurred.","required":["workspace_id","business_account_id","conversation_id","open_count"],"properties":{"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"Workspace that owns this conversation."},"business_account_id":{"$ref":"#/components/schemas/AMBBusinessID","description":"Business that owns this conversation."},"conversation_id":{"$ref":"#/components/schemas/AMBConversationID","description":"Conversation that changed state."},"open_count":{"type":"integer","minimum":1,"description":"Number of times the conversation has opened, starting at 1 and increasing on each reopen. Together with the conversation ID and event type, this identifies the lifecycle occurrence across retries."},"origin":{"type":"string","minLength":1,"description":"Source of the lifecycle change, when recorded."},"group_id":{"type":"string","minLength":1,"description":"Apple entry-point group recorded for this occurrence, when present."},"intent_id":{"type":"string","minLength":1,"description":"Apple entry-point intent recorded for this occurrence, when present."},"queue":{"type":"string","minLength":1,"description":"Routing queue recorded for this occurrence, when present."}}},"EventAMBConversationClosed":{"type":"object","additionalProperties":false,"description":"A customer conversation closed. Closing a conversation is not a message.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/AMBConversationClosedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When this lifecycle event occurred, independent of webhook delivery time.","example":"2026-09-25T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventAMBConversationData"}}},"AMBConversationReopenedEventType":{"type":"string","minLength":1,"enum":["amb.conversation_reopened"],"description":"Always `amb.conversation_reopened` for this event.","example":"amb.conversation_reopened"},"EventAMBConversationReopened":{"type":"object","additionalProperties":false,"description":"An existing customer conversation reopened after it had closed.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/AMBConversationReopenedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When this lifecycle event occurred, independent of webhook delivery time.","example":"2026-09-25T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventAMBConversationData"}}},"AMBConversationStartedEventType":{"type":"string","minLength":1,"enum":["amb.conversation_started"],"description":"Always `amb.conversation_started` for this event.","example":"amb.conversation_started"},"EventAMBConversationStarted":{"type":"object","additionalProperties":false,"description":"A customer conversation opened for the first time.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/AMBConversationStartedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When this lifecycle event occurred, independent of webhook delivery time.","example":"2026-09-25T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventAMBConversationData"}}},"AMBReceivedEventType":{"type":"string","minLength":1,"enum":["amb.received"],"description":"Always `amb.received` for this event.","example":"amb.received"},"EventAMBReceived":{"type":"object","additionalProperties":false,"description":"Bird received an ordinary customer message from Apple. Invitation responses are excluded.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/AMBReceivedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When this lifecycle event occurred, independent of webhook delivery time.","example":"2026-09-25T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventAMBMessageData","example":{"workspace_id":"ws_01krdgeqcxet5s7t44vh8rt9mg","message":{"id":"amb_01krdgh7m2zq8w4x6y9b3c5d7e","conversation_id":"acv_01krdgeqcxet5s7t44vh8rt9mg","business_account_id":"abz_01krdgeqcxet5s7t44vh8rt9mg","direction":"inbound","status":"received","kind":"text","text":{"body":"Where is my order?"},"locale":"en_US","cost":null,"requested_language":null,"resolved_language":null,"template_id":null,"template_version_id":null,"template_content_hash":null,"created_at":"2026-09-25T12:00:00Z"}}}}},"AMBRejectedEventType":{"type":"string","minLength":1,"enum":["amb.rejected"],"description":"Always `amb.rejected` for this event.","example":"amb.rejected"},"EventAMBRejected":{"type":"object","additionalProperties":false,"description":"Bird refused an outbound message before acceptance. This message has no accepted event.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/AMBRejectedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When this lifecycle event occurred, independent of webhook delivery time.","example":"2026-09-25T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventAMBMessageData","example":{"workspace_id":"ws_01krdgeqcxet5s7t44vh8rt9mg","message":{"id":"amb_01krdgeqcxet5s7t44vh8rt9mg","conversation_id":"acv_01krdgeqcxet5s7t44vh8rt9mg","business_account_id":"abz_01krdgeqcxet5s7t44vh8rt9mg","direction":"outbound","status":"rejected","kind":"text","source":"operator","text":{"body":"Your order has shipped."},"locale":"en_US","category":"order_update","tags":[{"name":"category","value":"welcome"}],"cost":null,"requested_language":null,"resolved_language":null,"template_id":null,"template_version_id":null,"template_content_hash":null,"created_at":"2026-09-25T11:59:59Z","last_error":{"code":"bird:price_missing","description":"Bird has no price for this message, so it was not sent.","occurred_at":"2026-09-25T12:00:00Z"}}}}}},"AMBSendFailedEventType":{"type":"string","minLength":1,"enum":["amb.send_failed"],"description":"Always `amb.send_failed` for this event.","example":"amb.send_failed"},"EventAMBSendFailed":{"type":"object","additionalProperties":false,"description":"An accepted outbound message could not be handed to Apple. The message snapshot carries the failure detail.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/AMBSendFailedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When this lifecycle event occurred, independent of webhook delivery time.","example":"2026-09-25T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventAMBMessageData","example":{"workspace_id":"ws_01krdgeqcxet5s7t44vh8rt9mg","message":{"id":"amb_01krdgeqcxet5s7t44vh8rt9mg","conversation_id":"acv_01krdgeqcxet5s7t44vh8rt9mg","business_account_id":"abz_01krdgeqcxet5s7t44vh8rt9mg","direction":"outbound","status":"send_failed","kind":"text","source":"operator","text":{"body":"Your order has shipped."},"locale":"en_US","category":"order_update","tags":[{"name":"category","value":"welcome"}],"cost":null,"requested_language":null,"resolved_language":null,"template_id":null,"template_version_id":null,"template_content_hash":null,"created_at":"2026-09-25T11:59:59Z","last_error":{"code":"apple:404","description":"Apple refused the message with HTTP status 404.","occurred_at":"2026-09-25T12:00:00Z"}}}}}},"AMBSentEventType":{"type":"string","minLength":1,"enum":["amb.sent"],"description":"Always `amb.sent` for this event.","example":"amb.sent"},"EventAMBSent":{"type":"object","additionalProperties":false,"description":"Apple accepted an outbound message from Bird. This does not establish delivery to the customer or a read receipt.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/AMBSentEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When this lifecycle event occurred, independent of webhook delivery time.","example":"2026-09-25T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventAMBMessageData","example":{"workspace_id":"ws_01krdgeqcxet5s7t44vh8rt9mg","message":{"id":"amb_01krdgeqcxet5s7t44vh8rt9mg","conversation_id":"acv_01krdgeqcxet5s7t44vh8rt9mg","business_account_id":"abz_01krdgeqcxet5s7t44vh8rt9mg","direction":"outbound","status":"sent","kind":"text","source":"operator","text":{"body":"Your order has shipped."},"locale":"en_US","category":"order_update","tags":[{"name":"category","value":"welcome"}],"cost":null,"requested_language":null,"resolved_language":null,"template_id":null,"template_version_id":null,"template_content_hash":null,"created_at":"2026-09-25T11:59:59Z","sent_at":"2026-09-25T12:00:00Z"}}}}},"AMBSuppressionCreatedEventType":{"type":"string","minLength":1,"enum":["amb_suppression.created"],"description":"Always `amb_suppression.created` for this event.","example":"amb_suppression.created"},"EventAMBSuppressionCreatedData":{"type":"object","additionalProperties":false,"description":"Payload of the amb_suppression.created event.","required":["suppression_id","business_account_id","address","address_type","reason","origin","workspace_id"],"properties":{"suppression_id":{"$ref":"#/components/schemas/AMBSuppressionID","description":"The suppression episode that was opened.","example":"asp_01krdgeqcxet5s7t44vh8rt9mg"},"business_account_id":{"oneOf":[{"$ref":"#/components/schemas/AMBBusinessID"},{"type":"null"}],"description":"The business account this suppression covers, or null when it covers the workspace.","example":"abz_01krdgeqcxet5s7t44vh8rt9mg"},"address":{"type":"string","minLength":1,"maxLength":1024,"description":"The canonical phone number or exact opaque Apple identifier that was suppressed.","example":"+15551234567"},"address_type":{"$ref":"#/components/schemas/AMBSuppressionAddressType"},"reason":{"$ref":"#/components/schemas/AMBSuppressionReason"},"origin":{"$ref":"#/components/schemas/AMBSuppressionOrigin"},"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"The workspace the suppression belongs to.","example":"ws_01krdgeqcxet5s7t44vh8rt9mg"}}},"EventAMBSuppressionCreated":{"type":"object","additionalProperties":false,"description":"An address was added to the workspace's Apple Messages for Business suppression ledger.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/AMBSuppressionCreatedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the suppression episode took effect.","example":"2026-09-28T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventAMBSuppressionCreatedData"}}},"EventDomainFailedData":{"type":"object","additionalProperties":false,"description":"Payload of the domain.failed event.","required":["domain_id","domain","workspace_id"],"properties":{"domain_id":{"$ref":"#/components/schemas/DomainID","description":"The sending domain resource whose verification failed.","example":"dom_01krdgeqcxet5s7t44vh8rt9mg"},"domain":{"type":"string","minLength":1,"description":"The sending domain hostname.","example":"mail.example.com"},"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"The workspace the domain is assigned to.","example":"ws_01krdgeqcxet5s7t44vh8rt9mg"},"failure_reason":{"type":["string","null"],"description":"Why verification failed, when a specific reason is available (for example, the DKIM record was not found at the expected selector).","example":"DKIM record not found at the expected selector."}}},"EventDomainFailed":{"type":"object","additionalProperties":false,"description":"A sending domain failed DNS verification.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["domain.failed"],"description":"Event type.","example":"domain.failed"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the event occurred.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventDomainFailedData"}}},"EventDomainVerifiedData":{"type":"object","additionalProperties":false,"description":"Payload of the domain.verified event.","required":["domain_id","domain","workspace_id"],"properties":{"domain_id":{"$ref":"#/components/schemas/DomainID","description":"The sending domain resource that verified.","example":"dom_01krdgeqcxet5s7t44vh8rt9mg"},"domain":{"type":"string","minLength":1,"description":"The sending domain hostname.","example":"mail.example.com"},"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"The workspace the domain is assigned to.","example":"ws_01krdgeqcxet5s7t44vh8rt9mg"}}},"EventDomainVerified":{"type":"object","additionalProperties":false,"description":"A sending domain completed DNS verification successfully.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["domain.verified"],"description":"Event type.","example":"domain.verified"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the event occurred.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventDomainVerifiedData"}}},"EventEmailBase":{"type":"object","description":"Identity fields shared by every email lifecycle event payload.","required":["email_id","recipient_id","workspace_id","recipient","recipient_role","tags","metadata","broadcast_id"],"properties":{"email_id":{"$ref":"#/components/schemas/EmailID","description":"ID of the email send."},"recipient_id":{"$ref":"#/components/schemas/RecipientID","description":"ID of the recipient."},"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"ID of the workspace that owns this event."},"recipient":{"type":"string","minLength":1,"format":"email","description":"Recipient address as it appeared on the envelope.","example":"alice@bird.com"},"recipient_role":{"$ref":"#/components/schemas/RecipientRole","description":"Envelope position of the recipient."},"tags":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Tag"},"description":"Tags from the send request when available. Null when no tags were supplied. On email.unsubscribed and email.list_unsubscribed from Bird unsubscribe links, null for individual sends and when broadcast context is unavailable. Correlate using workspace_id and email_id even when tags are null.\n"},"metadata":{"type":["object","null"],"additionalProperties":true,"description":"Metadata from the send request when available. Null when no metadata was supplied. On email.unsubscribed and email.list_unsubscribed from Bird unsubscribe links, null for individual sends and when broadcast context is unavailable. Keep a mapping from workspace_id and email_id to your own records for correlation.\n","example":{"order_id":"ord_123"}},"reference":{"allOf":[{"$ref":"#/components/schemas/MessageReference"}],"description":"The `reference` from the send request, echoed on the message's events. Absent when the send set none, and on `email.unsubscribed` and `email.list_unsubscribed` events Bird records from its own unsubscribe links, which carry no send fields.\n"},"broadcast_id":{"oneOf":[{"$ref":"#/components/schemas/EmailBroadcastID"},{"type":"null"}],"description":"The broadcast this send went out as part of, echoed on every per-recipient event for the send so you can attribute engagement to the broadcast without an extra lookup. Null when the send was not part of a broadcast. On `email.unsubscribed` and `email.list_unsubscribed`, null can also mean the recipient used an unsubscribe link that names no broadcast, so on those two events null does not rule a broadcast out.\n","example":"eb_01krdgeqcxet5s7t44vh8rt9mg"},"brand_id":{"oneOf":[{"$ref":"#/components/schemas/BrandID"},{"type":"null"}],"readOnly":true,"description":"The business whose email preferences and unsubscribe page apply.\n"}}},"EventEmailAcceptedData":{"type":"object","description":"Payload of the email.accepted event.","allOf":[{"$ref":"#/components/schemas/EventEmailBase"}]},"EventEmailAccepted":{"type":"object","additionalProperties":false,"description":"The API accepted the email send and is preparing it for delivery. Fires once per requested recipient.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email.accepted"],"description":"Event type.","example":"email.accepted"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the API accepted the send.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailAcceptedData"}}},"EmailBounceType":{"type":"string","minLength":1,"enum":["hard","soft","undetermined","admin","block"],"description":"Bounce classification.\n\n- `hard`: A permanent failure, such as an invalid address or a domain that does not exist.\n- `soft`: A transient failure, such as a full mailbox or a server that is temporarily unavailable.\n- `block`: The receiving mail server refused the sending IP on reputation grounds.\n- `admin`: An administrative refusal, such as relaying denied or a blocklisted domain.\n- `undetermined`: The receiving server's response was ambiguous.\n","example":"hard"},"EventEmailBouncedData":{"type":"object","description":"Payload of the email.bounced event.","allOf":[{"$ref":"#/components/schemas/EventEmailBase"},{"type":"object","required":["bounce_type","bounce_class","bounce_code","bounce_description","sending_ip"],"properties":{"bounce_type":{"$ref":"#/components/schemas/EmailBounceType"},"bounce_class":{"type":["integer","null"],"minimum":1,"maximum":255,"description":"Numeric bounce classification for fine-grained deliverability triage, or null when the receiving server's response could not be classified. Lets you distinguish, for example, a DNS failure from a spam block when both would be `bounce_type: soft` or `bounce_type: block`.\n","example":10},"bounce_code":{"type":["string","null"],"description":"SMTP reply code returned by the receiving mail server, or null when none was provided.","example":"550"},"bounce_description":{"type":["string","null"],"description":"Human-readable reason the receiving mail server gave for the bounce, or null when none was provided.","example":"5.1.1 Unknown user"},"sending_ip":{"type":["string","null"],"description":"The IP address used to send this message, or null when it is not known.","example":"192.0.2.10"}}}]},"EventEmailBounced":{"type":"object","additionalProperties":false,"description":"An outbound email permanently failed at the recipient's mail server. Fires once per recipient.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email.bounced"],"description":"Event type.","example":"email.bounced"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the bounce was recorded.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailBouncedData"}}},"EventEmailMessageBase":{"type":"object","description":"Identity fields shared by the message-level email lifecycle events (scheduled, canceled), which are not tied to a single recipient.","required":["email_id","workspace_id","tags","metadata"],"properties":{"email_id":{"$ref":"#/components/schemas/EmailID","description":"ID of the email send."},"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"ID of the workspace that owns this event."},"tags":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Tag"},"description":"Tags provided on the send request, echoed on the event so you can route and correlate without an extra lookup. Null when the send carried no tags.\n"},"metadata":{"type":["object","null"],"additionalProperties":true,"description":"The metadata object provided on the send request, echoed on the event so you can correlate events with your own records. Null when the send carried no metadata.\n","example":{"order_id":"ord_123"}},"reference":{"allOf":[{"$ref":"#/components/schemas/MessageReference"}],"description":"The `reference` from the send request. Absent when the send set none.\n"},"brand_id":{"oneOf":[{"$ref":"#/components/schemas/BrandID"},{"type":"null"}],"readOnly":true,"description":"The business whose email preferences and unsubscribe page apply.\n"}}},"EventEmailCanceledData":{"type":"object","description":"Payload of the email.canceled event.","allOf":[{"$ref":"#/components/schemas/EventEmailMessageBase"}]},"EventEmailCanceled":{"type":"object","additionalProperties":false,"description":"A scheduled send was canceled before it fired. Fires once for each message regardless of its recipient count.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email.canceled"],"description":"Event type.","example":"email.canceled"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the scheduled send was canceled.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailCanceledData"}}},"EventEmailClickedData":{"type":"object","description":"Payload of the email.clicked event.","allOf":[{"$ref":"#/components/schemas/EventEmailBase"},{"type":"object","required":["url","ip_address","user_agent"],"properties":{"url":{"type":"string","minLength":1,"description":"The URL the recipient clicked.","example":"https://bird.com/welcome"},"ip_address":{"type":["string","null"],"description":"IP address of the client that clicked the link, or null when it is not known.","example":"203.0.113.9"},"user_agent":{"type":["string","null"],"description":"User-agent string of the client that clicked the link, or null when it is not known.","example":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)"}}}]},"EventEmailClicked":{"type":"object","additionalProperties":false,"description":"The recipient clicked a tracked link in the email. May fire more than once per recipient.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email.clicked"],"description":"Event type.","example":"email.clicked"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the click was recorded.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailClickedData"}}},"EventEmailComplainedData":{"type":"object","description":"Payload of the email.complained event.","allOf":[{"$ref":"#/components/schemas/EventEmailBase"},{"type":"object","required":["feedback_type"],"properties":{"feedback_type":{"type":["string","null"],"description":"The kind of feedback the mailbox provider reported (such as `abuse` or `fraud`), or null when the provider did not specify one.","example":"abuse"}}}]},"EventEmailComplained":{"type":"object","additionalProperties":false,"description":"The recipient marked the email as spam through their mailbox provider's feedback loop. Fires once per recipient.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email.complained"],"description":"Event type.","example":"email.complained"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the complaint was recorded.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailComplainedData"}}},"EventEmailDeferredData":{"type":"object","description":"Payload of the email.deferred event.","allOf":[{"$ref":"#/components/schemas/EventEmailBase"},{"type":"object","required":["bounce_type","bounce_class","defer_reason","sending_ip"],"properties":{"bounce_type":{"$ref":"#/components/schemas/EmailBounceType"},"bounce_class":{"type":["integer","null"],"minimum":1,"maximum":255,"description":"Numeric bounce classification for fine-grained deliverability triage, or null when the receiving server's response could not be classified. Distinguishes, for example, a greylisting deferral from a full mailbox.\n","example":21},"defer_reason":{"type":["string","null"],"description":"Human-readable reason the receiving mail server gave for the deferral, or null when none was provided.","example":"4.2.1 Mailbox temporarily unavailable, will retry"},"sending_ip":{"type":["string","null"],"description":"The IP address used to send this message, or null when it is not known.","example":"192.0.2.10"}}}]},"EventEmailDeferred":{"type":"object","additionalProperties":false,"description":"The recipient's mail server temporarily refused the email. Delivery remains pending and is retried. May fire more than once per recipient.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email.deferred"],"description":"Event type.","example":"email.deferred"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the deferral was recorded.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailDeferredData"}}},"EventEmailDeliveredData":{"type":"object","description":"Payload of the email.delivered event.","allOf":[{"$ref":"#/components/schemas/EventEmailBase"}]},"EventEmailDelivered":{"type":"object","additionalProperties":false,"description":"An outbound email reached the recipient's mail server and was accepted.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email.delivered"],"description":"Event type.","example":"email.delivered"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the recipient's mail server accepted the message.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailDeliveredData"}}},"EventEmailListUnsubscribedData":{"type":"object","description":"Payload of the email.list_unsubscribed event.","allOf":[{"$ref":"#/components/schemas/EventEmailBase"}]},"EventEmailListUnsubscribed":{"type":"object","additionalProperties":false,"description":"Recipient unsubscribed via the RFC 8058 one-click List-Unsubscribe mechanism. Fires once per recipient.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email.list_unsubscribed"],"description":"Event type.","example":"email.list_unsubscribed"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the unsubscribe was recorded.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailListUnsubscribedData"}}},"EventEmailOpenedData":{"type":"object","description":"Payload of the email.opened event.","allOf":[{"$ref":"#/components/schemas/EventEmailBase"},{"type":"object","required":["ip_address","user_agent"],"properties":{"ip_address":{"type":["string","null"],"description":"IP address of the client that opened the email, or null when it is not known.","example":"203.0.113.9"},"user_agent":{"type":["string","null"],"description":"User-agent string of the client that opened the email, or null when it is not known.","example":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)"}}}]},"EventEmailOpened":{"type":"object","additionalProperties":false,"description":"The recipient opened the email (the tracking pixel was loaded). May fire more than once per recipient.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email.opened"],"description":"Event type.","example":"email.opened"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the open was recorded.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailOpenedData"}}},"EventEmailOutOfBandBounceData":{"type":"object","description":"Payload of the email.out_of_band_bounce event.","allOf":[{"$ref":"#/components/schemas/EventEmailBase"},{"type":"object","required":["bounce_type","bounce_class","bounce_code","bounce_description","sending_ip"],"properties":{"bounce_type":{"$ref":"#/components/schemas/EmailBounceType"},"bounce_class":{"type":["integer","null"],"minimum":1,"maximum":255,"description":"Numeric bounce classification for fine-grained deliverability triage, or null when the receiving server's response could not be classified.\n","example":10},"bounce_code":{"type":["string","null"],"description":"SMTP reply code returned by the receiving mail server, or null when none was provided.","example":"550"},"bounce_description":{"type":["string","null"],"description":"Human-readable reason the receiving mail server gave for the bounce, or null when none was provided.","example":"5.1.1 Unknown user"},"sending_ip":{"type":["string","null"],"description":"The IP address used to send this message, or null when it is not known.","example":"192.0.2.10"}}}]},"EventEmailOutOfBandBounce":{"type":"object","additionalProperties":false,"description":"A bounce notification arrived after the message had already been accepted for delivery. Fires once per recipient.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email.out_of_band_bounce"],"description":"Event type.","example":"email.out_of_band_bounce"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the bounce notification was recorded.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailOutOfBandBounceData"}}},"EventEmailProcessedData":{"type":"object","description":"Payload of the email.processed event.","allOf":[{"$ref":"#/components/schemas/EventEmailBase"}]},"EventEmailProcessed":{"type":"object","additionalProperties":false,"description":"The API prepared the message for delivery to the recipient's mail server. Fires once per recipient.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email.processed"],"description":"Event type.","example":"email.processed"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the message was prepared for delivery.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailProcessedData"}}},"EventEmailReceivedData":{"type":"object","additionalProperties":false,"description":"Payload of the email.received event.","required":["inbound_message_id","workspace_id","message_id","from","to","subject"],"properties":{"inbound_message_id":{"$ref":"#/components/schemas/InboundEmailMessageID","description":"ID of the received email. Fetch its parsed metadata with `GET /v1/email/inbound-messages/{id}`, and its content from that message's `/body`, `/raw`, and `/attachments` sub-resources."},"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"ID of the workspace that owns this event."},"message_id":{"type":["string","null"],"description":"RFC 5322 Message-ID header from the sender, or null when the sender did not include one.","example":"<CAH+T8d5...@mail.gmail.com>"},"from":{"type":"string","minLength":1,"format":"email","description":"Address from the message's From header, with the relay's parsed sender and then the SMTP envelope sender as fallbacks when that header cannot be read. This field alone does not authenticate the sender.","example":"alice@example.com"},"to":{"type":"array","items":{"type":"string","format":"email"},"description":"Parsed recipient addresses from the message headers, not the envelope recipient used to route this delivery.","example":["support@acme.com"]},"subject":{"type":["string","null"],"description":"Subject line as received, or null when the message had no subject.","example":"Welcome to Bird"},"in_reply_to":{"type":["string","null"],"description":"`In-Reply-To` header containing the `Message-ID` this message replies to, or null when it is not a reply.","example":"<previous-message@example.com>"},"authentication":{"type":["string","null"],"enum":["pass","fail","unknown",null],"description":"DMARC result for the domain in the received message's `From` header.\n\n- `pass`: SPF or DKIM passed and aligned with that domain.\n- `fail`: DMARC was evaluated and did not pass.\n- `unknown`: no trustworthy verdict is available.\n\nThis follows `dmarc_pass` and does not verify a particular person. The receiving provider currently supplies no DMARC result, so received messages report `unknown`.\n"},"spf_pass":{"type":["boolean","null"],"description":"Whether the receiving provider reports that SPF authorized the envelope sender for the sending server. A soft failure is `false`. Missing, neutral and inconclusive results are `null`."},"dkim_pass":{"type":["boolean","null"],"description":"Whether the receiving provider verified a DKIM signature. A passing signature makes this `true` even when another signature fails. Missing signatures and inconclusive verification results are `null`."},"dmarc_pass":{"type":["boolean","null"],"description":"Whether SPF or DKIM passed and aligned with the domain in the message's `From` header. The receiving provider currently supplies no DMARC result, so this is `null`."},"spam_score":{"type":["number","null"],"description":"Content spam score when available. The receiving provider currently supplies no score, so this is `null`."}}},"EventEmailReceived":{"type":"object","additionalProperties":false,"description":"The API received and parsed an inbound email. The payload carries the message's identifiers, sender and recipients, subject, threading reference, and authentication results, which is enough to route and triage without a fetch. Fetch content separately. Get the parsed body with `GET /v1/email/inbound-messages/{id}/body`. Get the original MIME with `GET /v1/email/inbound-messages/{id}/raw`. Get attachment bytes with `GET /v1/email/inbound-messages/{id}/attachments/{attachment_id}`.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email.received"],"description":"Event type.","example":"email.received"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the API received the message.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailReceivedData"}}},"EmailRejectionReason":{"type":"string","minLength":1,"x-extensible-enum":["recipient_suppressed","transmission_failed","generation_failure","policy_rejection","domain_unverified","quota_exceeded","recipient_not_allowed","workspace_suspended"],"description":"Why an email was rejected before delivery.\n\n- `recipient_suppressed`: The recipient is on the workspace suppression list, so\n  delivery was never attempted.\n- `transmission_failed`: The message could not be transmitted for delivery.\n- `generation_failure`: The message could not be built for delivery (template or\n  content issue).\n- `policy_rejection`: The message was refused by sending policy.\n- `domain_unverified`: The sending domain was not verified.\n- `quota_exceeded`: The organization's send quota was reached.\n- `recipient_not_allowed`: A recipient was not permitted for this send (for shared\n  onboarding-domain sends, recipients must be verified workspace members).\n- `workspace_suspended`: The workspace is suspended, so this mail was not sent and will not be sent after reactivation. Contact Bird support to reactivate the workspace.\n","example":"recipient_suppressed"},"EventEmailRejectedData":{"type":"object","description":"Payload of the email.rejected event.","allOf":[{"$ref":"#/components/schemas/EventEmailBase"},{"type":"object","required":["rejection_reason"],"properties":{"rejection_reason":{"$ref":"#/components/schemas/EmailRejectionReason"}}}]},"EventEmailRejected":{"type":"object","additionalProperties":false,"description":"The API rejected the email before delivery because of suppression, transmission failure, content, or policy. Fires once per recipient.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email.rejected"],"description":"Event type.","example":"email.rejected"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the rejection was recorded.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailRejectedData"}}},"EventEmailScheduledData":{"type":"object","description":"Payload of the email.scheduled event.","allOf":[{"$ref":"#/components/schemas/EventEmailMessageBase"},{"type":"object","required":["scheduled_at"],"properties":{"scheduled_at":{"type":"string","minLength":1,"format":"date-time","description":"When the message is scheduled to send.","example":"2026-05-22T09:00:00Z"}}}]},"EventEmailScheduled":{"type":"object","additionalProperties":false,"description":"The API accepted an email scheduled for a future time. Fires once per message when the schedule is created.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email.scheduled"],"description":"Event type.","example":"email.scheduled"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the send was scheduled.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailScheduledData"}}},"EventEmailUnsubscribedData":{"type":"object","description":"Payload of the email.unsubscribed event.","allOf":[{"$ref":"#/components/schemas/EventEmailBase"}]},"EventEmailUnsubscribed":{"type":"object","additionalProperties":false,"description":"Recipient unsubscribed by clicking a tracked unsubscribe link in the email. Fires once per recipient.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email.unsubscribed"],"description":"Event type.","example":"email.unsubscribed"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the unsubscribe was recorded.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailUnsubscribedData"}}},"EventEmailMailboxMessageDeliveredData":{"type":"object","additionalProperties":false,"description":"Payload of the email_mailbox.message_delivered event.","required":["message_id","mailbox_id","thread_id"],"properties":{"message_id":{"$ref":"#/components/schemas/EmailID","description":"ID of the delivered message. Per-recipient `email.*` events use this value as `email_id`. Use it to deduplicate events when you subscribe to both event families."},"mailbox_id":{"$ref":"#/components/schemas/MailboxID","description":"ID of the mailbox the message was sent from."},"thread_id":{"$ref":"#/components/schemas/ThreadID","description":"ID of the thread the message belongs to."}}},"EventEmailMailboxMessageDelivered":{"type":"object","additionalProperties":false,"description":"Every recipient of a mailbox message reached a delivered state. This event fires once per message. The same send also emits one `email.delivered` event for each recipient. Choose one event family for each automation and deduplicate mailbox events by `message_id`.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email_mailbox.message_delivered"],"description":"Event type.","example":"email_mailbox.message_delivered"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the event occurred.","example":"2026-07-08T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailMailboxMessageDeliveredData"}}},"EventEmailMailboxMessageFailedData":{"type":"object","additionalProperties":false,"description":"Payload of the email_mailbox.message_failed event.","required":["message_id","mailbox_id","thread_id","reason"],"properties":{"message_id":{"$ref":"#/components/schemas/EmailID","description":"ID of the failed message. Per-recipient `email.*` events use this value as `email_id`. Use it to deduplicate events when you subscribe to both event families."},"mailbox_id":{"$ref":"#/components/schemas/MailboxID","description":"ID of the mailbox the message was sent from."},"thread_id":{"$ref":"#/components/schemas/ThreadID","description":"ID of the thread the message belongs to."},"reason":{"type":"string","minLength":1,"description":"Why the message reached a terminal delivery failure.","example":"all recipients bounced"}}},"EventEmailMailboxMessageFailed":{"type":"object","additionalProperties":false,"description":"A mailbox message reached a terminal delivery failure. This event fires once per message. The same send also emits per-recipient `email.*` events. Choose one event family for each automation and deduplicate mailbox events by `message_id`.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email_mailbox.message_failed"],"description":"Event type.","example":"email_mailbox.message_failed"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the event occurred.","example":"2026-07-08T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailMailboxMessageFailedData"}}},"EventEmailMailboxMessageReceivedData":{"type":"object","additionalProperties":false,"description":"Identifiers, threading details, authentication results, and extracted text for a received mailbox message. The thread-message endpoints provide the original source during its 30-day retention window.","required":["message_id","mailbox_id","thread_id","from","to","subject","attachment_count"],"properties":{"message_id":{"$ref":"#/components/schemas/InboundEmailMessageID","description":"ID of the received message. The corresponding `email.received` event uses this value as `inbound_message_id`. Use it to deduplicate events when you subscribe to both event families."},"mailbox_id":{"$ref":"#/components/schemas/MailboxID","description":"ID of the mailbox that received the message."},"thread_id":{"$ref":"#/components/schemas/ThreadID","description":"ID of the thread the message was filed into."},"route_id":{"type":["string","null"],"description":"ID (ein_…) of the explicit inbound route that matched, or null when the message was delivered by the virtual exact-address route.","example":null},"from":{"type":"string","minLength":1,"format":"email","description":"Envelope-from address.","example":"alice@example.com"},"to":{"type":"array","items":{"type":"string","format":"email"},"description":"Recipient addresses the message was sent to.","example":["support@inbox.ai"]},"subject":{"type":["string","null"],"description":"Subject line as received, or null when the message had no subject.","example":"Re: Your quote"},"extracted_text":{"type":["string","null"],"description":"Plain-text body with quoted history removed, capped at 64 KB. See `truncated_text` to check whether the value was truncated. Null when extraction produces no text.","example":"Sounds good — can you send the invoice?"},"truncated_text":{"type":"boolean","description":"True when `extracted_text` was truncated to the 64 KB cap. Fetch the full text through the thread-member endpoint.","default":false},"attachment_count":{"type":"integer","minimum":0,"description":"Number of attachments on the message. Attachment content remains available for the mailbox's retention tier.","example":1},"authentication":{"type":["string","null"],"enum":["pass","fail","unknown",null],"description":"DMARC result for the domain in the received message's `From` header.\n\n- `pass`: SPF or DKIM passed and aligned with that domain.\n- `fail`: DMARC was evaluated and did not pass.\n- `unknown`: no trustworthy verdict is available.\n\nThis follows `dmarc_pass` and does not verify a particular person. The receiving provider currently supplies no DMARC result, so received messages report `unknown`.\n"},"spf_pass":{"type":["boolean","null"],"description":"Whether the receiving provider reports that SPF authorized the envelope sender for the sending server. A soft failure is `false`. Missing, neutral and inconclusive results are `null`."},"dkim_pass":{"type":["boolean","null"],"description":"Whether the receiving provider verified a DKIM signature. A passing signature makes this `true` even when another signature fails. Missing signatures and inconclusive verification results are `null`."},"dmarc_pass":{"type":["boolean","null"],"description":"Whether SPF or DKIM passed and aligned with the domain in the message's `From` header. The receiving provider currently supplies no DMARC result, so this is `null`."}}},"EventEmailMailboxMessageReceived":{"type":"object","additionalProperties":false,"description":"An email arrived in a mailbox. The same message also emits an `email.received` event. The two events can arrive in either order. Choose one event family for each automation and deduplicate mailbox events by `message_id`.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email_mailbox.message_received"],"description":"Event type.","example":"email_mailbox.message_received"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the event occurred.","example":"2026-07-08T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailMailboxMessageReceivedData"}}},"EventEmailMailboxMessageSentData":{"type":"object","additionalProperties":false,"description":"Payload of the email_mailbox.message_sent event.","required":["message_id","mailbox_id","thread_id"],"properties":{"message_id":{"$ref":"#/components/schemas/EmailID","description":"ID of the sent message. Per-recipient `email.*` events use this value as `email_id`. Use it to deduplicate events when you subscribe to both event families."},"mailbox_id":{"$ref":"#/components/schemas/MailboxID","description":"ID of the mailbox the message was sent from."},"thread_id":{"$ref":"#/components/schemas/ThreadID","description":"ID of the thread the message belongs to."}}},"EventEmailMailboxMessageSent":{"type":"object","additionalProperties":false,"description":"A mailbox message was handed off for delivery. This event fires once per message. The same send also emits per-recipient `email.*` events. Choose one event family for each automation and deduplicate mailbox events by `message_id`.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email_mailbox.message_sent"],"description":"Event type.","example":"email_mailbox.message_sent"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the event occurred.","example":"2026-07-08T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailMailboxMessageSentData"}}},"EventEmailMailboxSuspendedData":{"type":"object","additionalProperties":false,"description":"Payload of the email_mailbox.suspended event.","required":["mailbox_id","reason"],"properties":{"mailbox_id":{"$ref":"#/components/schemas/MailboxID","description":"ID of the suspended mailbox."},"reason":{"type":"string","minLength":1,"description":"Why the mailbox was suspended.","example":"abuse review"}}},"EventEmailMailboxSuspended":{"type":"object","additionalProperties":false,"description":"This mailbox-suspension event is reserved and is not currently emitted.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email_mailbox.suspended"],"description":"Event type.","example":"email_mailbox.suspended"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the event occurred.","example":"2026-07-08T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailMailboxSuspendedData"}}},"EventEmailMailboxThreadCreatedData":{"type":"object","additionalProperties":false,"description":"Payload of the email_mailbox.thread_created event.","required":["thread_id","mailbox_id","subject","initiated_by"],"properties":{"thread_id":{"$ref":"#/components/schemas/ThreadID","description":"ID of the thread."},"mailbox_id":{"$ref":"#/components/schemas/MailboxID","description":"ID of the mailbox the thread was created in."},"subject":{"type":["string","null"],"description":"Subject of the first message in the thread, or null when it had none.","example":"Your quote"},"initiated_by":{"type":"string","minLength":1,"enum":["inbound","outbound"],"description":"Which direction created the thread.","example":"inbound"}}},"EventEmailMailboxThreadCreated":{"type":"object","additionalProperties":false,"description":"A new thread was created in a mailbox, from either direction.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email_mailbox.thread_created"],"description":"Event type.","example":"email_mailbox.thread_created"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the event occurred.","example":"2026-07-08T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailMailboxThreadCreatedData"}}},"EventEmailSuppressionCreatedData":{"type":"object","additionalProperties":false,"description":"Payload of the email_suppression.created event.","required":["suppression_id","email","reason","workspace_id"],"properties":{"suppression_id":{"$ref":"#/components/schemas/SuppressionID","description":"The suppression entry that was created.","example":"sup_01krdgeqcxet5s7t44vh8rt9mg"},"email":{"type":"string","minLength":1,"format":"email","description":"The recipient address that was added to the suppression list.","example":"user@example.com"},"reason":{"type":"string","minLength":1,"x-extensible-enum":["hard_bounce","complaint","unsubscribe","manual"],"description":"Why the address was suppressed. New values may be added over time; treat unknown values as informational.\n","example":"hard_bounce"},"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"The workspace the suppression belongs to.","example":"ws_01krdgeqcxet5s7t44vh8rt9mg"}}},"EventEmailSuppressionCreated":{"type":"object","additionalProperties":false,"description":"An email address was added to the workspace's suppression list (manually, via complaint, or via hard bounce).","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["email_suppression.created"],"description":"Event type.","example":"email_suppression.created"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the event occurred.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventEmailSuppressionCreatedData"}}},"EsimID":{"type":"string","minLength":1,"pattern":"^esm_[0-9a-hjkmnp-tv-z]{26}$","example":"esm_01krdgeqcxet5s7t44vh8rt9mg"},"EsimDeliveryChannel":{"type":"string","minLength":1,"enum":["email","sms"],"description":"Channel the install credentials are delivered over."},"EsimDeliveryID":{"type":"string","minLength":1,"pattern":"^edv_[0-9a-hjkmnp-tv-z]{26}$","example":"edv_01krdgeqcxet5s7t44vh8rt9mg"},"EsimPackageID":{"type":"string","minLength":1,"pattern":"^epk_[0-9a-hjkmnp-tv-z]{26}$","example":"epk_01krdgeqcxet5s7t44vh8rt9mg"},"EsimOrderID":{"type":"string","minLength":1,"pattern":"^eor_[0-9a-hjkmnp-tv-z]{26}$","example":"eor_01krdgeqcxet5s7t44vh8rt9mg"},"EsimOfferID":{"type":"string","minLength":1,"pattern":"^eof_[0-9a-hjkmnp-tv-z]{26}$","example":"eof_01krdgeqcxet5s7t44vh8rt9mg"},"EsimRecurringSubscriptionID":{"type":"string","minLength":1,"pattern":"^ers_[0-9a-hjkmnp-tv-z]{26}$","example":"ers_01krdgeqcxet5s7t44vh8rt9mg"},"EsimRecurringStopReason":{"type":"string","minLength":1,"description":"Reason future package renewal stopped.\n\n- `canceled`: cancellation was requested.\n- `funding_unavailable`: the next period could not be funded.\n- `price_changed`: the published price changed and requires new acceptance.\n- `delivery_failed`: a paid package could not be delivered.\n- `delivery_unresolved`: the previous period’s delivery remains unresolved.\n\nCheck period history for delivery and credit outcomes before starting another subscription.\n","enum":["canceled","funding_unavailable","price_changed","delivery_failed","delivery_unresolved"]},"PreferenceDeletedEventType":{"type":"string","minLength":1,"enum":["preference.deleted"],"description":"Always `preference.deleted` for this event.","example":"preference.deleted"},"EventPreferenceBase":{"type":"object","description":"Identity fields shared by every preference lifecycle event: the key plus the ledger entry the write appended. `effective_at` is not repeated here: it is the envelope `timestamp`.","required":["preference_id","transition_id","channel","handle","sender_scope","topic_id","coverage","contact_id"],"properties":{"preference_id":{"$ref":"#/components/schemas/PreferenceID","description":"The preference key this write applied to.","example":"prf_01krdgeqcxet5s7t44vh8rt9mg"},"transition_id":{"$ref":"#/components/schemas/PreferenceTransitionID","description":"The ledger entry this write appended.","example":"prt_01krdgeqcxet5s7t44vh8rt9mg"},"channel":{"allOf":[{"$ref":"#/components/schemas/PreferenceChannel"}]},"handle":{"type":"string","minLength":1,"maxLength":320,"description":"Who the statement is about: an email address on the email channel, a phone number in E.164 format on SMS, WhatsApp, and Apple Messages for Business.","example":"+15550001234"},"sender_scope":{"type":["string","null"],"description":"The sender the statement is limited to, or null when it covers the whole channel. On Apple Messages for Business, this is the Apple business ID used to send invitations. Present-with-null on every payload of this type: it is part of the key alongside `topic_id`, and pinning its presence keeps a subscriber from ever learning `(handle, channel)` as the unique key.","example":"+15557654321"},"topic_id":{"type":["string","null"],"description":"The topic the statement is limited to, or null when it covers every topic. Reserved: always null in v1. Present-with-null for the same reason as `sender_scope`.","example":null},"coverage":{"allOf":[{"$ref":"#/components/schemas/PreferenceCoverage"}]},"contact_id":{"oneOf":[{"$ref":"#/components/schemas/ContactID"},{"type":"null"}],"description":"The contact whose handle matched when the statement was recorded. Null when no contact matched at that moment."},"brand_id":{"example":null,"oneOf":[{"$ref":"#/components/schemas/BrandID"},{"type":"null"}],"description":"The business this email preference belongs to."}}},"EventPreferenceDeletedData":{"type":"object","description":"Payload of the preference.deleted event.","allOf":[{"$ref":"#/components/schemas/EventPreferenceBase"}]},"EventPreferenceDeleted":{"type":"object","additionalProperties":false,"description":"A stated preference was deleted, superseding it in the ledger without erasing its history.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/PreferenceDeletedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the delete took effect (`effective_at`), not when it was recorded.","example":"2026-08-12T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventPreferenceDeletedData"}}},"PreferenceGrantedEventType":{"type":"string","minLength":1,"enum":["preference.granted"],"description":"Always `preference.granted` for this event.","example":"preference.granted"},"EventPreferenceGrantedData":{"type":"object","description":"Payload of the preference.granted event.","allOf":[{"$ref":"#/components/schemas/EventPreferenceBase"}]},"EventPreferenceGranted":{"type":"object","additionalProperties":false,"description":"A stated preference was granted (a person consented, or a customer wrote a grant) and became the key's live statement.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/PreferenceGrantedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the statement took effect (`effective_at`), not when it was recorded.","example":"2026-08-12T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventPreferenceGrantedData"}}},"PreferenceRevokedEventType":{"type":"string","minLength":1,"enum":["preference.revoked"],"description":"Always `preference.revoked` for this event.","example":"preference.revoked"},"EventPreferenceRevokedData":{"type":"object","description":"Payload of the preference.revoked event.","allOf":[{"$ref":"#/components/schemas/EventPreferenceBase"}]},"EventPreferenceRevoked":{"type":"object","additionalProperties":false,"description":"A stated preference was revoked (a person opted out, or a customer wrote a revoke) and became the key's live statement.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/PreferenceRevokedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the statement took effect (`effective_at`), not when it was recorded.","example":"2026-08-12T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventPreferenceRevokedData"}}},"EventSMSBase":{"type":"object","description":"Fields shared by every outbound SMS lifecycle event payload.","required":["sms_id","workspace_id","to","from","tags","metadata","requested_language","resolved_language","template_id","template_version_id","template_content_hash","segments"],"properties":{"content_type":{"$ref":"#/components/schemas/SMSContentType"},"sms_id":{"$ref":"#/components/schemas/SMSMessageID","description":"ID of the SMS message."},"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"ID of the workspace that owns this event."},"to":{"type":"string","minLength":1,"description":"The recipient's phone number, in E.164 format.\n","example":"+15551234567"},"from":{"type":"string","minLength":1,"description":"The sender you sent the message from: an E.164 number, an alphanumeric sender ID, or a short code.\n","example":"+15557654321"},"tags":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Tag"},"description":"Tags provided on the send request, echoed on every event for the message so you can route and correlate without an extra lookup. Null when the message carried no tags.\n"},"metadata":{"type":["object","null"],"additionalProperties":true,"description":"The metadata object provided on the send request, echoed on every event for the message so you can correlate events with your own records. Null when the message carried no metadata.\n","example":{"order_id":"ord_123"}},"requested_language":{"description":"The template language requested by the send, in canonical form. Null when the send named no language or used no template.\n","oneOf":[{"$ref":"#/components/schemas/LanguageTag"},{"type":"null"}]},"resolved_language":{"description":"The template language rendered at acceptance, in canonical form. Null when the send used no template.\n","oneOf":[{"$ref":"#/components/schemas/LanguageTag"},{"type":"null"}]},"template_id":{"description":"The template rendered at acceptance, or null for a free-text message.","oneOf":[{"$ref":"#/components/schemas/SMSTemplateID"},{"type":"null"}]},"template_version_id":{"description":"The workspace published version or synthetic built-in version rendered at acceptance, or null for a free-text message. For a built-in template, `template_content_hash` identifies the exact catalogue source.\n","oneOf":[{"$ref":"#/components/schemas/SMSTemplateVersionID"},{"type":"null"}]},"template_content_hash":{"description":"The rendered language's source fingerprint, or null for a free-text message.","oneOf":[{"$ref":"#/components/schemas/SMSTemplateContentHash"},{"type":"null"}]},"messaging_profile_id":{"description":"The messaging profile this message was sent under. Absent when no messaging profile applied.","$ref":"#/components/schemas/SMSMessagingProfileID"},"country_code":{"allOf":[{"$ref":"#/components/schemas/CountryCode"}],"description":"The country of the recipient's number. Absent when not known.\n"},"segments":{"$ref":"#/components/schemas/SMSSegments","description":"Segment breakdown used to calculate the message charge."},"cost":{"$ref":"#/components/schemas/MessageCost","description":"Message cost as of this event, split into the platform charge and any\nthird-party fees passed through. Null on an event that priced nothing.\n\nComponents are named so you can merge them per component rather than replacing the\nobject: webhook delivery is not ordered, so an older event arriving late would\notherwise overwrite a newer figure. Take the latest `occurred_at` you have seen for\neach component. `amount` is the sum of the components in this payload and does not\nrepresent a settled total.\n"},"reference":{"allOf":[{"$ref":"#/components/schemas/MessageReference"}],"description":"The `reference` from the send request, echoed on every event for the message. Absent when the send set none.\n"},"cost_center":{"type":"string","description":"The `cost_center` applied to the message, from the send request or else its messaging profile, echoed on every event for the message. Absent when neither set one.\n","example":"CC001234"}}},"EventSMSAcceptedData":{"type":"object","description":"Payload of the sms.accepted event.","allOf":[{"$ref":"#/components/schemas/EventSMSBase"}]},"EventSMSAccepted":{"type":"object","additionalProperties":false,"description":"The API accepted the SMS send request and queued it for processing.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["sms.accepted"],"description":"Event type.","example":"sms.accepted"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the API accepted the request.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventSMSAcceptedData"}}},"EventSMSDeliveredData":{"type":"object","description":"Payload of the sms.delivered event.","allOf":[{"$ref":"#/components/schemas/EventSMSBase"},{"type":"object","properties":{"carrier":{"type":"string","description":"Carrier that delivered the message. Absent when the carrier does not report one.","example":"Verizon"},"mcc_mnc":{"type":"string","description":"Mobile country code and mobile network code of the carrier. Absent when the carrier does not report one.","example":"311480"}}}]},"EventSMSDelivered":{"type":"object","additionalProperties":false,"description":"The carrier confirmed delivery of the message to the recipient handset.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["sms.delivered"],"description":"Event type.","example":"sms.delivered"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the carrier confirmed delivery.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventSMSDeliveredData"}}},"EventSMSExpiredData":{"type":"object","description":"Payload of the sms.expired event.","allOf":[{"$ref":"#/components/schemas/EventSMSBase"},{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/SMSError","description":"Why the message was still undelivered when its validity period elapsed. Typically `unreachable`, the handset having stayed off or out of coverage for the whole window."},"carrier":{"type":"string","description":"Carrier that reported the expiry. Absent when the carrier does not report one.","example":"Verizon"},"mcc_mnc":{"type":"string","description":"Mobile country code and mobile network code of the carrier. Absent when the carrier does not report one.","example":"311480"}}}]},"EventSMSExpired":{"type":"object","additionalProperties":false,"description":"The message's validity period elapsed before it could be delivered.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["sms.expired"],"description":"Event type.","example":"sms.expired"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the message expired.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventSMSExpiredData"}}},"EventSMSFailedData":{"type":"object","description":"Payload of the sms.failed event.","allOf":[{"$ref":"#/components/schemas/EventSMSBase"},{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/SMSError","description":"Why the message failed."},"carrier":{"type":"string","description":"Carrier that reported the failure. Absent when the carrier does not report one.","example":"Verizon"},"mcc_mnc":{"type":"string","description":"Mobile country code and mobile network code of the carrier. Absent when the carrier does not report one.","example":"311480"}}}]},"EventSMSFailed":{"type":"object","additionalProperties":false,"description":"The carrier reported that delivery failed for a reason not expected to clear. Bird does not retry the message, but a carrier report of another outcome that occurred later, such as `sms.delivered`, can follow.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["sms.failed"],"description":"Event type.","example":"sms.failed"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the failure was recorded.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventSMSFailedData"}}},"SMSReceivedEventType":{"type":"string","minLength":1,"enum":["sms.received"],"description":"Always `sms.received` for this event.","example":"sms.received"},"EventSMSReceivedData":{"type":"object","description":"Payload of the sms.received event.","allOf":[{"type":"object","required":["sms_id","workspace_id","to","from","segments"],"anyOf":[{"required":["text"]},{"required":["subject"]},{"required":["media"]}],"properties":{"content_type":{"$ref":"#/components/schemas/SMSContentType"},"sms_id":{"$ref":"#/components/schemas/SMSMessageID","description":"ID of the SMS message."},"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"ID of the workspace that owns this event."},"to":{"type":"string","minLength":1,"description":"Your number that received the message: an E.164 number, or a short code.\n","example":"+15551234567"},"from":{"type":"string","minLength":1,"description":"The sender: an E.164 number, or a short code or alphanumeric sender ID when the message came from one.\n","example":"+15557654321"},"messaging_profile_id":{"description":"The messaging profile this message was received under. Absent when no messaging profile applied.","$ref":"#/components/schemas/SMSMessagingProfileID"},"cost":{"$ref":"#/components/schemas/MessageCost","description":"Message cost as of this event, split into the platform charge and any\nthird-party fees passed through. Null on an event that priced nothing.\n\nComponents are named so you can merge them per component rather than replacing the\nobject: webhook delivery is not ordered, so an older event arriving late would\notherwise overwrite a newer figure. Take the latest `occurred_at` you have seen for\neach component. `amount` is the sum of the components in this payload and does not\nrepresent a settled total.\n"},"text":{"type":"string","minLength":1,"description":"The message body, so you can act on it without a follow-up read. Absent when the message carried only attachments and no text of its own.\n","example":"STOP"},"segments":{"$ref":"#/components/schemas/SMSSegments","description":"Segment breakdown of the received body."},"carrier":{"type":"string","description":"Carrier the message came in over. Absent where the carrier does not report one.","example":"Verizon"},"mcc_mnc":{"type":"string","description":"Mobile country code and mobile network code of the carrier. Absent when not known.","example":"311480"},"country_code":{"allOf":[{"$ref":"#/components/schemas/CountryCode"}],"description":"Country of the sender's number. When the sender is not a phone number, such as a short code or an alphanumeric sender, the country of your number that received the message. Absent when neither is known.\n"},"in_reply_to_message":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/SMSInReplyToMessage"}],"description":"The outbound message this one was paired with through its messaging profile's outbound matching. Absent when it was not paired.\n"},"subject":{"type":"string","description":"Subject line. Absent when the message carried none."},"media":{"type":"array","items":{"$ref":"#/components/schemas/SMSMedia"},"description":"Attachments on the message. Omitted when the message carried none."}}}]},"EventSMSReceived":{"type":"object","additionalProperties":false,"description":"A message was received on one of your numbers.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/SMSReceivedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the sender sent the message.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventSMSReceivedData"}}},"EventSMSRejectedData":{"type":"object","description":"Payload of the sms.rejected event.","allOf":[{"$ref":"#/components/schemas/EventSMSBase"},{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/SMSError","description":"Why Bird or the carrier refused the message."},"carrier":{"type":"string","description":"Carrier the message was routed to. Absent when Bird rejected the message before routing it, or the carrier does not report one.","example":"Verizon"},"mcc_mnc":{"type":"string","description":"Mobile country code and mobile network code of the carrier. Absent when the carrier does not report one.","example":"311480"}}}]},"EventSMSRejected":{"type":"object","additionalProperties":false,"description":"The API rejected the message before sending it to the carrier because of an invalid destination, suppression, or content or policy restriction.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["sms.rejected"],"description":"Event type.","example":"sms.rejected"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the rejection was recorded.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventSMSRejectedData"}}},"EventSMSSentData":{"type":"object","description":"Payload of the sms.sent event.","allOf":[{"$ref":"#/components/schemas/EventSMSBase"},{"type":"object","properties":{"carrier":{"type":"string","description":"Carrier that handled the message. Absent when the carrier does not report one.","example":"Verizon"},"mcc_mnc":{"type":"string","description":"Mobile country code and mobile network code of the carrier. Absent when the carrier does not report one.","example":"311480"}}}]},"EventSMSSent":{"type":"object","additionalProperties":false,"description":"The API handed the message to the carrier for delivery.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["sms.sent"],"description":"Event type.","example":"sms.sent"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the message was handed to the carrier.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventSMSSentData"}}},"EventSMSUndeliveredData":{"type":"object","description":"Payload of the sms.undelivered event.","allOf":[{"$ref":"#/components/schemas/EventSMSBase"},{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/SMSError","description":"Why the message was not delivered."},"carrier":{"type":"string","description":"Carrier that reported the delivery failure. Absent when the carrier does not report one.","example":"Verizon"},"mcc_mnc":{"type":"string","description":"Mobile country code and mobile network code of the carrier. Absent when the carrier does not report one.","example":"311480"}}}]},"EventSMSUndelivered":{"type":"object","additionalProperties":false,"description":"The carrier reported a non-permanent failure to deliver the message. Bird does not retry it, but a carrier report of another outcome that occurred later, such as `sms.delivered`, can follow.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["sms.undelivered"],"description":"Event type.","example":"sms.undelivered"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the non-delivery was recorded.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventSMSUndeliveredData"}}},"SMSSuppressionCreatedEventType":{"type":"string","minLength":1,"enum":["sms_suppression.created"],"description":"Always `sms_suppression.created` for this event.","example":"sms_suppression.created"},"EventSMSSuppressionCreatedData":{"type":"object","additionalProperties":false,"description":"Payload of the sms_suppression.created event.","required":["suppression_id","destination","originator","reason","workspace_id"],"properties":{"suppression_id":{"$ref":"#/components/schemas/SMSSuppressionID","description":"The suppression episode that was opened.","example":"ssu_01krdgeqcxet5s7t44vh8rt9mg"},"destination":{"type":"string","minLength":2,"maxLength":20,"description":"The subscriber, in E.164 format.","example":"+15550001234"},"originator":{"type":"string","minLength":1,"maxLength":20,"description":"The sender this stops. An SMS suppression is the exact (sender, recipient) pair, so your other senders still reach this subscriber.","example":"+15557654321"},"reason":{"allOf":[{"$ref":"#/components/schemas/SMSSuppressionReason"}]},"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"The workspace the suppression belongs to.","example":"ws_01krdgeqcxet5s7t44vh8rt9mg"}}},"EventSMSSuppressionCreated":{"type":"object","additionalProperties":false,"description":"A destination was added to the workspace's SMS suppression ledger: a subscriber's STOP, a carrier opt-out, or a manual add.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/SMSSuppressionCreatedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the episode's opening statement took effect (`effective_at`).","example":"2026-08-12T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventSMSSuppressionCreatedData"}}},"EventVerifyBase":{"type":"object","description":"Identity fields shared by every Verify lifecycle event payload.","required":["verification_id","workspace_id","to","metadata"],"properties":{"verification_id":{"$ref":"#/components/schemas/VerificationID","description":"ID of the verification session."},"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"ID of the workspace that owns this event."},"to":{"$ref":"#/components/schemas/VerificationTo","description":"The recipient identity of the verification session (email address, phone number, or both), echoed on every event so you can correlate without an extra lookup. An individual attempt reports the single address it was dispatched to in its own `address` field."},"metadata":{"type":["object","null"],"additionalProperties":true,"description":"The metadata object provided when the verification was created, echoed on every event for the session so you can correlate events with your own records. Null when the verification carried no metadata.\n","example":{"user_id":"usr_123"}}}},"EventVerifyAttemptDeliveredData":{"type":"object","description":"Payload of the verify.attempt.delivered event.","allOf":[{"$ref":"#/components/schemas/EventVerifyBase"},{"type":"object","required":["channel","address","carrier","mcc_mnc","delivered_at"],"properties":{"channel":{"$ref":"#/components/schemas/VerificationChannel","description":"The channel this attempt was sent on.","example":"sms"},"address":{"type":"string","minLength":1,"description":"The single address this attempt was dispatched to, an E.164 phone number or an email address.","example":"+14155550100"},"carrier":{"type":["string","null"],"description":"Carrier that delivered the message, when the carrier network reports it. Always null for email, WhatsApp, Telegram, and voice.","example":"Verizon"},"mcc_mnc":{"type":["string","null"],"description":"Mobile country code and mobile network code of the delivering carrier, when reported. Always null for email, WhatsApp, Telegram, and voice.","example":"311480"},"delivered_at":{"type":"string","minLength":1,"format":"date-time","description":"Time delivery was confirmed.","example":"2026-07-24T12:00:05Z"}}}]},"EventVerifyAttemptDelivered":{"type":"object","additionalProperties":false,"description":"The channel confirmed delivery of a one-time passcode to the recipient.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["verify.attempt.delivered"],"description":"Event type.","example":"verify.attempt.delivered"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time delivery was confirmed.","example":"2026-07-24T12:00:05Z"},"data":{"$ref":"#/components/schemas/EventVerifyAttemptDeliveredData"}}},"EventVerifyAttemptSentData":{"type":"object","description":"Payload of the verify.attempt.sent event.","allOf":[{"$ref":"#/components/schemas/EventVerifyBase"},{"type":"object","required":["channel","address","from","sent_at"],"properties":{"channel":{"$ref":"#/components/schemas/VerificationChannel","description":"The channel this attempt was sent on.","example":"sms"},"address":{"type":"string","minLength":1,"description":"The single address this attempt was dispatched to, an E.164 phone number or an email address.","example":"+14155550100"},"from":{"type":["string","null"],"description":"The sender the passcode was sent from: a phone number, alphanumeric sender ID, short code, or email address. Null when the channel exposes no sender.","example":"29999"},"sent_at":{"type":"string","minLength":1,"format":"date-time","description":"Time the passcode was dispatched.","example":"2026-07-24T12:00:01Z"}}}]},"EventVerifyAttemptSent":{"type":"object","additionalProperties":false,"description":"A one-time passcode was dispatched to the recipient on a channel.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["verify.attempt.sent"],"description":"Event type.","example":"verify.attempt.sent"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the passcode was dispatched.","example":"2026-07-24T12:00:01Z"},"data":{"$ref":"#/components/schemas/EventVerifyAttemptSentData"}}},"EventVerifyAttemptUndeliveredData":{"type":"object","description":"Payload of the verify.attempt.undelivered event.","allOf":[{"$ref":"#/components/schemas/EventVerifyBase"},{"type":"object","required":["channel","address","reason","error","failed_at"],"properties":{"channel":{"$ref":"#/components/schemas/VerificationChannel","description":"The channel this attempt was sent on.","example":"sms"},"address":{"type":"string","minLength":1,"description":"The single address this attempt was dispatched to, an E.164 phone number or an email address.","example":"+14155550100"},"reason":{"$ref":"#/components/schemas/VerificationAttemptFailureReason","description":"Why the attempt failed to reach the recipient.","example":"carrier_rejected"},"error":{"type":["string","null"],"description":"Diagnostic text describing the failure, for display only. Null when none was reported.","example":"Carrier rejected the message before delivery"},"failed_at":{"type":"string","minLength":1,"format":"date-time","description":"Time the failure was recorded.","example":"2026-07-24T12:00:05Z"}}}]},"EventVerifyAttemptUndelivered":{"type":"object","additionalProperties":false,"description":"A one-time passcode failed to deliver to the recipient.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["verify.attempt.undelivered"],"description":"Event type.","example":"verify.attempt.undelivered"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the failure was recorded.","example":"2026-07-24T12:00:05Z"},"data":{"$ref":"#/components/schemas/EventVerifyAttemptUndeliveredData"}}},"EventVerifyVerificationCreatedData":{"type":"object","description":"Payload of the verify.verification.created event.","allOf":[{"$ref":"#/components/schemas/EventVerifyBase"},{"type":"object","required":["channel","status","created_at"],"properties":{"channel":{"$ref":"#/components/schemas/VerificationChannel","description":"The first channel of the verification's resolved channel plan.","example":"sms"},"status":{"type":"string","minLength":1,"x-extensible-enum":["pending"],"description":"The verification's state at creation, always `pending`. Open enum for forward compatibility.","example":"pending"},"created_at":{"type":"string","minLength":1,"format":"date-time","description":"Time the verification session was created.","example":"2026-07-24T12:00:00Z"}}}]},"EventVerifyVerificationCreated":{"type":"object","additionalProperties":false,"description":"A verification session was created and its first one-time passcode is being sent.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["verify.verification.created"],"description":"Event type.","example":"verify.verification.created"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the verification session was created.","example":"2026-07-24T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventVerifyVerificationCreatedData"}}},"VerifyVerificationFailedEventType":{"type":"string","minLength":1,"enum":["verify.verification.failed"],"description":"Always `verify.verification.failed` for this event.","example":"verify.verification.failed"},"EventVerifyVerificationFailedData":{"type":"object","description":"Payload of the verify.verification.failed event.","allOf":[{"$ref":"#/components/schemas/EventVerifyBase"},{"type":"object","required":["status","reason","channel","last_attempt_reason","failed_at"],"properties":{"status":{"type":"string","minLength":1,"x-extensible-enum":["failed"],"description":"The verification's state, always `failed`. Open enum for forward compatibility.","example":"failed"},"reason":{"$ref":"#/components/schemas/VerificationTerminalReason","description":"Why the verification ended. Always `undeliverable` on this event: no planned channel delivered a passcode.","example":"undeliverable"},"channel":{"oneOf":[{"$ref":"#/components/schemas/VerificationChannel"},{"type":"null"}],"description":"The last channel the verification tried, the one whose failure ended it. Null when no channel was attributed.","example":"sms"},"last_attempt_reason":{"$ref":"#/components/schemas/VerificationAttemptFailureReason","description":"Why that last send did not deliver. This is the actionable half of the event: `not_billable` means the workspace balance could not cover the send, `workspace_suspended` means the workspace was suspended so no channel after that send is tried (contact Bird support to reactivate the workspace), and the delivery reasons point at the recipient or the channel. An earlier channel may still have been tried and refused for its own reason.","example":"not_billable"},"failed_at":{"type":"string","minLength":1,"format":"date-time","description":"Time the verification was resolved.","example":"2026-07-24T12:00:05Z"}}}]},"EventVerifyVerificationFailed":{"type":"object","additionalProperties":false,"description":"The verification ended without the recipient receiving a passcode: no channel Bird tried sent one, and Bird tries no further channel.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/VerifyVerificationFailedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the verification was resolved.","example":"2026-07-24T12:00:05Z"},"data":{"$ref":"#/components/schemas/EventVerifyVerificationFailedData"}}},"EventVerifyVerificationVerifiedData":{"type":"object","description":"Payload of the verify.verification.verified event.","allOf":[{"$ref":"#/components/schemas/EventVerifyBase"},{"type":"object","required":["status","channel","verified_at"],"properties":{"status":{"type":"string","minLength":1,"x-extensible-enum":["verified"],"description":"The verification's state, always `verified`. Open enum for forward compatibility.","example":"verified"},"channel":{"oneOf":[{"$ref":"#/components/schemas/VerificationChannel"},{"type":"null"}],"description":"The channel whose passcode the recipient confirmed, the channel that converted. Null when the verification was resolved without attributing a channel.","example":"sms"},"verified_at":{"type":"string","minLength":1,"format":"date-time","description":"Time the verification was verified.","example":"2026-07-24T12:01:00Z"}}}]},"EventVerifyVerificationVerified":{"type":"object","additionalProperties":false,"description":"The verification was successfully resolved: the recipient confirmed the correct code.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["verify.verification.verified"],"description":"Event type.","example":"verify.verification.verified"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the verification was verified.","example":"2026-07-24T12:01:00Z"},"data":{"$ref":"#/components/schemas/EventVerifyVerificationVerifiedData"}}},"VoiceCallID":{"type":"string","minLength":1,"pattern":"^vcl_[0-9a-hjkmnp-tv-z]{26}$","example":"vcl_01krdgeqcxet5s7t44vh8rt9mg"},"VoiceSessionID":{"type":"string","minLength":1,"pattern":"^vcs_[0-9a-hjkmnp-tv-z]{26}$","example":"vcs_01krdgeqcxet5s7t44vh8rt9mg"},"EventVoiceBase":{"type":"object","description":"Identity fields shared by every voice call lifecycle event payload.","required":["call_id","workspace_id","direction","from","to"],"properties":{"call_id":{"$ref":"#/components/schemas/VoiceCallID","description":"ID of the call record."},"session_id":{"oneOf":[{"$ref":"#/components/schemas/VoiceSessionID"},{"type":"null"}],"description":"Session identifier shared across all legs of a multi-party or transferred call. Use this to correlate related call records. Null when session correlation is not available for the call."},"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"ID of the workspace that owns this event."},"direction":{"$ref":"#/components/schemas/VoiceCallDirection"},"from":{"type":"string","minLength":1,"description":"The calling party: an E.164 number, a SIP extension on a trunk call, or the `usr_` ID of a browser caller to a workspace user or ring group. A withheld caller may be `anonymous`.","example":"+14155551234"},"to":{"type":"string","minLength":1,"description":"The dialled destination: an E.164 number, a SIP extension such as `1001` on a trunk call, or the `usr_`, `vrg_` or `vsq_` ID of the workspace user, ring group or sequence a browser called.","example":"+16505559876"}}},"EventVoiceCallAnsweredData":{"type":"object","description":"Payload of the voice_call.answered event.","allOf":[{"$ref":"#/components/schemas/EventVoiceBase"}]},"EventVoiceCallAnswered":{"type":"object","additionalProperties":false,"description":"The called party answered and media began flowing.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["voice_call.answered"],"description":"Event type.","example":"voice_call.answered"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the call was answered.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventVoiceCallAnsweredData"}}},"EventVoiceCallEndedData":{"type":"object","description":"Payload of the voice_call.ended event.","allOf":[{"$ref":"#/components/schemas/EventVoiceBase"},{"type":"object","required":["status","sip_response_code","duration_ms","billable_ms"],"properties":{"status":{"$ref":"#/components/schemas/VoiceCallStatus"},"sip_response_code":{"type":["integer","null"],"minimum":100,"description":"Final SIP response code for the leg, including a Bird refusal. Null when no SIP response was received, for example on timeout or DNS failure.","example":200},"duration_ms":{"type":"integer","minimum":0,"description":"Total call duration in milliseconds, measured from the first SIP `INVITE` to the `BYE` or final response.","example":65000},"billable_ms":{"type":"integer","minimum":0,"description":"Billable duration in milliseconds, measured from answer to call end. Zero for unanswered calls.","example":60000}}}]},"EventVoiceCallEnded":{"type":"object","additionalProperties":false,"description":"The call ended after either party hung up or call setup failed.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["voice_call.ended"],"description":"Event type.","example":"voice_call.ended"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time either party hung up or call setup failed.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventVoiceCallEndedData"}}},"EventVoiceCallInitiatedData":{"type":"object","description":"Payload of the voice_call.initiated event.","allOf":[{"$ref":"#/components/schemas/EventVoiceBase"}]},"EventVoiceCallInitiated":{"type":"object","additionalProperties":false,"description":"Call routing began.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["voice_call.initiated"],"description":"Event type.","example":"voice_call.initiated"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the call was initiated.","example":"2026-05-21T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventVoiceCallInitiatedData"}}},"EventWhatsAppBase":{"type":"object","description":"Fields shared by every outbound WhatsApp message event payload.","required":["whatsapp_id","workspace_id","direction","from","to","tags","metadata"],"properties":{"whatsapp_id":{"$ref":"#/components/schemas/WhatsAppMessageID","description":"ID of the WhatsApp message."},"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"ID of the workspace that owns this event."},"direction":{"type":"string","minLength":1,"enum":["outbound","inbound"],"description":"Whether the message was sent by the business (`outbound`) or received from the contact (`inbound`)."},"from":{"$ref":"#/components/schemas/WhatsAppAddress","description":"The business number the message was sent from."},"to":{"$ref":"#/components/schemas/WhatsAppAddress","description":"The WhatsApp contact or group the message was sent to."},"tags":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Tag"},"description":"Tags from the send request, echoed on every event for the message. Null when the message was not sent through Bird, or its request carried no tags.\n"},"metadata":{"type":["object","null"],"additionalProperties":true,"description":"The metadata object from the send request, echoed on every event for the message. Null when the message was not sent through Bird, or its request carried no metadata.\n","example":{"order_id":"ord_123"}},"reference":{"allOf":[{"$ref":"#/components/schemas/MessageReference"}],"description":"The `reference` from the send request, echoed on every event for the message. Absent when the send set none.\n"},"in_reply_to_message_id":{"allOf":[{"$ref":"#/components/schemas/WhatsAppMessageID"}],"description":"The message this one quoted: for a send request, its `in_reply_to_message_id`. Absent when the message quoted nothing, or quoted one we cannot match to a message we hold.\n"},"origin":{"allOf":[{"$ref":"#/components/schemas/WhatsAppMessageOrigin"}],"description":"Where the message came from when it did not come through Bird live, the same value `GET /v1/whatsapp/messages/{message_id}` returns. Absent when your workspace sent the message through Bird.\n"}}},"EventWhatsAppAcceptedData":{"type":"object","description":"Payload of the whatsapp.accepted event.","allOf":[{"$ref":"#/components/schemas/EventWhatsAppBase"}]},"EventWhatsAppAccepted":{"type":"object","additionalProperties":false,"description":"The API accepted and charged the send request.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["whatsapp.accepted"],"description":"Event type.","example":"whatsapp.accepted"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the API accepted and charged the send request.","example":"2026-07-16T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventWhatsAppAcceptedData"}}},"EventWhatsAppDeliveredData":{"type":"object","description":"Payload of the whatsapp.delivered event.","allOf":[{"$ref":"#/components/schemas/EventWhatsAppBase"},{"type":"object","properties":{"recipient":{"allOf":[{"$ref":"#/components/schemas/WhatsAppAddress"}],"description":"The participant delivery was confirmed to, on a group message. A group send raises this event once per participant, so this is what tells the deliveries apart. Absent on a one-to-one message, whose `to` already names its recipient.\n"}}}]},"EventWhatsAppDelivered":{"type":"object","additionalProperties":false,"description":"The message was delivered to the recipient's device.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["whatsapp.delivered"],"description":"Event type.","example":"whatsapp.delivered"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the message was delivered to the recipient's device.","example":"2026-07-16T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventWhatsAppDeliveredData"}}},"EventWhatsAppFailedData":{"type":"object","description":"Payload of the whatsapp.failed event.","allOf":[{"$ref":"#/components/schemas/EventWhatsAppBase"},{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/WhatsAppError","description":"Why the message terminally failed."}}}]},"EventWhatsAppFailed":{"type":"object","additionalProperties":false,"description":"Message delivery failed permanently.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["whatsapp.failed"],"description":"Event type.","example":"whatsapp.failed"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the failure was recorded.","example":"2026-07-16T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventWhatsAppFailedData"}}},"WhatsAppGroupJoinRequestCreatedEventType":{"type":"string","minLength":1,"enum":["whatsapp.group.join_request_created"],"description":"Always `whatsapp.group.join_request_created` for this event.","example":"whatsapp.group.join_request_created"},"WhatsAppGroupJoinRequestSummary":{"type":"object","additionalProperties":false,"description":"Someone who asked to be let into a group, as named by a join-request webhook event.","required":["id","bsuid","phone_number","username"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/WhatsAppGroupJoinRequestID"}],"description":"Unique identifier for the join request. Pass it to the batch-approve and batch-reject operations."},"bsuid":{"type":"string","minLength":1,"description":"Business-scoped user ID, Meta's identifier for this person against your business. The one identifier every request has, and the one that carries over to `participants` if you approve it.\n","example":"US.1566655121691972"},"phone_number":{"type":["string","null"],"minLength":1,"description":"Phone number in E.164 format. Null when WhatsApp withholds it, which it does for anyone who has not shared their number with your business.\n","example":"+16505551234"},"username":{"type":["string","null"],"minLength":1,"description":"The WhatsApp username this person chose. Null when they have none, and theirs to change, so it names them in a list rather than keying anything.\n","example":"john.doe"}}},"EventWhatsAppGroupJoinRequestData":{"type":"object","additionalProperties":false,"description":"Payload shared by the whatsapp.group.join_request_created and whatsapp.group.join_request_revoked events. Everything about the person who asked is nested under `join_request`; the sibling identifiers name the business side.\n","required":["group_id","whatsapp_number_id","workspace_id","join_request"],"properties":{"group_id":{"allOf":[{"$ref":"#/components/schemas/WhatsAppGroupID"}],"description":"The group the person asked to join.","example":"wag_01krdgeqcxet5s7t44vh8rt9mg"},"whatsapp_number_id":{"allOf":[{"$ref":"#/components/schemas/WhatsAppNumberID"}],"description":"The business number that created the group and administers it.","example":"wan_01krdgeqcxet5s7t44vh8rt9mg"},"workspace_id":{"allOf":[{"$ref":"#/components/schemas/WorkspaceID"}],"description":"The workspace that owns the group.","example":"ws_01krdgeqcxet5s7t44vh8rt9mg"},"join_request":{"$ref":"#/components/schemas/WhatsAppGroupJoinRequestSummary","description":"The request itself, and who made it."}}},"EventWhatsAppGroupJoinRequestCreated":{"type":"object","additionalProperties":false,"description":"Someone asked to join a group that requires approval.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/WhatsAppGroupJoinRequestCreatedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the person asked to join.","example":"2026-09-22T10:07:57Z"},"data":{"$ref":"#/components/schemas/EventWhatsAppGroupJoinRequestData"}}},"WhatsAppGroupJoinRequestRevokedEventType":{"type":"string","minLength":1,"enum":["whatsapp.group.join_request_revoked"],"description":"Always `whatsapp.group.join_request_revoked` for this event.","example":"whatsapp.group.join_request_revoked"},"EventWhatsAppGroupJoinRequestRevoked":{"type":"object","additionalProperties":false,"description":"Someone withdrew their request to join a group before it was decided.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/WhatsAppGroupJoinRequestRevokedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the person withdrew their request.","example":"2026-09-22T11:12:03Z"},"data":{"$ref":"#/components/schemas/EventWhatsAppGroupJoinRequestData"}}},"WhatsAppReactedEventType":{"type":"string","minLength":1,"enum":["whatsapp.reacted"],"description":"Always `whatsapp.reacted` for this event.","example":"whatsapp.reacted"},"EventWhatsAppReactedData":{"type":"object","additionalProperties":false,"description":"Payload of the whatsapp.reacted event. Names the message the contact reacted to, not the reaction, because a reaction is an annotation on a message rather than a message of its own.\n","required":["whatsapp_id","emoji","from","to","workspace_id"],"properties":{"whatsapp_id":{"$ref":"#/components/schemas/WhatsAppMessageID","description":"The message the contact reacted to. WhatsApp accepts a reaction on a message up to 30 days old, and we keep provider ids for 15, so a reaction placed on a message older than that cannot be matched to it and raises no event at all.\n"},"emoji":{"type":["string","null"],"description":"The emoji the contact placed, as WhatsApp sent it and not normalized. Null when they took their reaction back rather than placing one. Always present, so null is the removal itself rather than a value we are missing.\n","example":"👍"},"from":{"allOf":[{"$ref":"#/components/schemas/WhatsAppAddress"}],"description":"The contact who reacted, as WhatsApp identified them."},"to":{"allOf":[{"$ref":"#/components/schemas/WhatsAppAddress"}],"description":"Your WhatsApp number, the business side of the conversation."},"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"ID of the workspace that owns this event."}}},"EventWhatsAppReacted":{"type":"object","additionalProperties":false,"description":"A contact placed, changed or took back a reaction on a message.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/WhatsAppReactedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the contact reacted, as reported by WhatsApp. Meta reports this to the second, so a contact who changes or withdraws a reaction quickly can produce two events sharing one timestamp. Sorting reactions on one message by this field cannot order those, and neither can delivery order, which retries make unreliable. Act on the reaction each event carries, as the change it describes; do not reconstruct the sequence from the events or treat the last one to arrive as the message's standing reaction. Read the message back for the reactions that stand: `getWhatsAppMessage` (`GET /v1/whatsapp/messages/{message_id}`) returns one entry per sender in `reactions`, and `listWhatsAppMessageReactionEvents` has every change.\n","example":"2026-08-28T19:01:10Z"},"data":{"$ref":"#/components/schemas/EventWhatsAppReactedData"}}},"EventWhatsAppReadData":{"type":"object","description":"Payload of the whatsapp.read event.","allOf":[{"$ref":"#/components/schemas/EventWhatsAppBase"},{"type":"object","properties":{"recipient":{"allOf":[{"$ref":"#/components/schemas/WhatsAppAddress"}],"description":"The participant who opened the message, on a group message. A group send raises this event once per participant, so this is what tells the deliveries apart. Absent on a one-to-one message, whose `to` already names its recipient.\n"}}}]},"EventWhatsAppRead":{"type":"object","additionalProperties":false,"description":"The recipient read the message.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["whatsapp.read"],"description":"Event type.","example":"whatsapp.read"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the recipient read the message.","example":"2026-07-16T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventWhatsAppReadData"}}},"WhatsAppReceivedEventType":{"type":"string","minLength":1,"enum":["whatsapp.received"],"description":"Event type.","example":"whatsapp.received"},"EventWhatsAppReceivedData":{"type":"object","description":"Payload of the whatsapp.received event. Carries the message's content so a subscriber can act on it without reading the message back. `from` is the WhatsApp contact who sent the message, the participant who wrote it in a group; `to` is the business number that received it, with the group's `group_id` on a group message.\n","allOf":[{"type":"object","required":["whatsapp_id","workspace_id","direction","from","to"],"properties":{"whatsapp_id":{"$ref":"#/components/schemas/WhatsAppMessageID","description":"ID of the WhatsApp message."},"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"ID of the workspace that owns this event."},"direction":{"$ref":"#/components/schemas/MessageDirection","description":"Always `inbound`, for a message received from the contact."},"from":{"$ref":"#/components/schemas/WhatsAppAddress","description":"The WhatsApp contact who sent the message; in a group, the participant who wrote it."},"to":{"$ref":"#/components/schemas/WhatsAppAddress","description":"The business number that received the message, and the group it arrived through on a group message."},"in_reply_to_message_id":{"allOf":[{"$ref":"#/components/schemas/WhatsAppMessageID"}],"description":"The message this one answers, as WhatsApp reports the reply's target: a tap on a button or a list row, and equally a text or media message the contact sent as a quoted reply. Absent when the message answers nothing, and absent when we cannot match the target to a message we hold, which is the case for one sent before this workspace started recording them or one already past the 15-day window we keep provider ids for.\n"},"origin":{"allOf":[{"$ref":"#/components/schemas/WhatsAppMessageOrigin"}],"description":"Where the message came from when it did not come through Bird live, the same value `GET /v1/whatsapp/messages/{message_id}` returns. Absent when the contact sent the message to Bird.\n"},"text":{"allOf":[{"$ref":"#/components/schemas/WhatsAppText"}],"description":"Text the contact sent."},"image":{"allOf":[{"$ref":"#/components/schemas/WhatsAppImage"}],"description":"Image the contact sent."},"video":{"allOf":[{"$ref":"#/components/schemas/WhatsAppVideo"}],"description":"Video the contact sent."},"audio":{"allOf":[{"$ref":"#/components/schemas/WhatsAppAudio"}],"description":"Audio the contact sent."},"sticker":{"allOf":[{"$ref":"#/components/schemas/WhatsAppSticker"}],"description":"Sticker the contact sent."},"document":{"allOf":[{"$ref":"#/components/schemas/WhatsAppDocument"}],"description":"Document the contact sent."},"location":{"allOf":[{"$ref":"#/components/schemas/WhatsAppLocation"}],"description":"Location the contact sent."},"contact_cards":{"type":"array","description":"Contact cards the contact shared, either by tapping a button that asked for their number or by sending a card from their address book.\n","items":{"$ref":"#/components/schemas/WhatsAppContactCard"}},"interactive_reply":{"allOf":[{"$ref":"#/components/schemas/WhatsAppInteractiveReply"}],"description":"What the contact tapped, when the message answers an interactive message or a template's quick-reply button.\n"},"unsupported":{"allOf":[{"$ref":"#/components/schemas/WhatsAppUnsupported"}],"description":"Set when the contact sent content the API does not model, naming the WhatsApp content type.\n"}}}]},"EventWhatsAppReceived":{"type":"object","additionalProperties":false,"description":"A contact sent the business a WhatsApp message. Not raised while the Meta Business Agent holds the conversation; the message is still stored and returned by the message reads.\n","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/WhatsAppReceivedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the contact sent the message, as reported by WhatsApp.","example":"2026-07-16T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventWhatsAppReceivedData"}}},"EventWhatsAppRejectedData":{"type":"object","description":"Payload of the whatsapp.rejected event.","allOf":[{"$ref":"#/components/schemas/EventWhatsAppBase"},{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/WhatsAppError","description":"Why the message was rejected before sending."}}}]},"EventWhatsAppRejected":{"type":"object","additionalProperties":false,"description":"The API rejected the message before sending it to WhatsApp because the recipient is on the workspace suppression list, the wallet has insufficient balance, or the destination is unpriced. The message is not sent or charged.","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["whatsapp.rejected"],"description":"Event type.","example":"whatsapp.rejected"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the rejection was recorded.","example":"2026-07-23T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventWhatsAppRejectedData"}}},"EventWhatsAppSentData":{"type":"object","description":"Payload of the whatsapp.sent event.","allOf":[{"$ref":"#/components/schemas/EventWhatsAppBase"}]},"EventWhatsAppSent":{"type":"object","additionalProperties":false,"description":"The message was handed to Meta for delivery. Raised for a message your workspace sent through Bird, for one sent from the WhatsApp Business app on a number shared with it (`origin: business_app_echo`), and for one the Meta Business Agent sent on your number (`origin: business_agent_echo`).\n","required":["type","timestamp","data"],"properties":{"type":{"type":"string","minLength":1,"enum":["whatsapp.sent"],"description":"Event type.","example":"whatsapp.sent"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"Time the message was handed to Meta for delivery.","example":"2026-07-16T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventWhatsAppSentData"}}},"WhatsAppSuppressionCreatedEventType":{"type":"string","minLength":1,"enum":["whatsapp_suppression.created"],"description":"Always `whatsapp_suppression.created` for this event.","example":"whatsapp_suppression.created"},"EventWhatsAppSuppressionCreatedData":{"type":"object","additionalProperties":false,"description":"Payload of the whatsapp_suppression.created event.","required":["suppression_id","address","waba","reason","workspace_id"],"properties":{"suppression_id":{"$ref":"#/components/schemas/WhatsAppSuppressionID","description":"The suppression episode that was opened.","example":"was_01krdgeqcxet5s7t44vh8rt9mg"},"address":{"type":"string","minLength":1,"description":"The suppressed WhatsApp address. For a phone number this is canonical E.164 with a leading plus sign, such as `+5511977670804`.","example":"+5511977670804"},"waba":{"type":["string","null"],"description":"The WhatsApp Business Account the suppression is limited to, identified by its WhatsApp-issued account ID, or null when it covers the whole workspace.","example":null},"reason":{"$ref":"#/components/schemas/WhatsAppSuppressionReason"},"workspace_id":{"$ref":"#/components/schemas/WorkspaceID","description":"The workspace the suppression belongs to.","example":"ws_01krdgeqcxet5s7t44vh8rt9mg"}}},"EventWhatsAppSuppressionCreated":{"type":"object","additionalProperties":false,"description":"An address was added to the workspace's WhatsApp suppression ledger.","required":["type","timestamp","data"],"properties":{"type":{"$ref":"#/components/schemas/WhatsAppSuppressionCreatedEventType"},"timestamp":{"type":"string","minLength":1,"format":"date-time","description":"When the episode's opening statement took effect (`effective_at`).","example":"2026-08-12T12:00:00Z"},"data":{"$ref":"#/components/schemas/EventWhatsAppSuppressionCreatedData"}}},"WebhookTestClientCertificate":{"type":"string","enum":["presented","not_requested","rejected"],"description":"What your endpoint did with the client certificate that we present for your workspace. Omitted when your workspace presents no client certificate, or when the test failed before your endpoint answered.\n\n- `presented`: your endpoint asked for the certificate and accepted it.\n- `not_requested`: your endpoint did not ask for a certificate.\n- `rejected`: your endpoint rejected the certificate. If your workspace allows deliveries without the certificate, we sent the test again without it, and the other fields show the result of that second request.\n"},"WebhookTestResponse":{"type":"object","additionalProperties":false,"required":["status","response_status_code","response_duration_ms"],"properties":{"kind":{"$ref":"#/components/schemas/WebhookTestKind"},"status":{"type":"string","minLength":1,"enum":["delivered","failed"],"description":"Whether the test succeeded. For a `delivery`, `delivered` means your endpoint returned a `2xx` status to the test event. For a `probe`, `delivered` means the platform accepted the endpoint's fields, though no event was sent. `failed` means a non-`2xx` status or no answer at all (see `error` for the latter).\n"},"response_status_code":{"type":["integer","null"],"description":"HTTP status returned by your endpoint. Null when no response was received (timeout, connection error, DNS failure).","example":200},"response_body":{"type":"string","description":"Response body returned by your endpoint, truncated to the first 1024 bytes. Omitted when your endpoint returned no body or could not be reached.\n","example":"OK"},"response_duration_ms":{"type":"integer","minimum":0,"description":"Round-trip latency of the request the test sent, in milliseconds; `0` when it sent none.\n","example":142},"event_payload":{"description":"The full event body delivered to your endpoint. Test sends use a minimal synthetic body rather than a full event payload, so this field is omitted.\n","$ref":"#/components/schemas/WebhookEvent"},"error":{"type":"string","minLength":1,"description":"A short explanation of a failed test that got no HTTP answer: the endpoint or platform could not be reached, or the test stopped before sending anything, such as for a connector endpoint whose connection no longer exists (then `kind` is absent).\n","example":"connection refused"},"field":{"type":"string","minLength":1,"description":"For a connector endpoint, the request field that the platform's answer shows is wrong, such as `destination.connector.credentials.api_key`. Correct it with [Update a webhook endpoint](/docs/api/reference/update-webhook). Present only when `status` is `failed` and the connector maps that answer to a field.\n","example":"destination.connector.credentials.api_key"},"client_certificate":{"$ref":"#/components/schemas/WebhookTestClientCertificate"}}},"WebhookReplayRequest":{"type":"object","additionalProperties":false,"properties":{"since":{"type":"string","format":"date-time","minLength":1,"description":"Replay events whose delivery attempt failed at or after this timestamp. The bound is inclusive and applies to attempt time, not to when the event occurred, so a retry that trailed its event by a day falls in the window by the hour it was attempted. Defaults to 24 hours before the request when omitted. Attempts are retained for three days, so that is the oldest history a replay reaches: an earlier `since` widens the window without recovering anything older.\n","example":"2026-05-07T00:00:00Z"},"until":{"type":"string","format":"date-time","minLength":1,"description":"Replay events whose delivery attempt failed at or before this timestamp, on the same attempt-time bound as `since`. Omitted, it resolves to the time of the request.\n","example":"2026-05-07T23:59:59Z"}}},"WebhookEventID":{"type":"string","minLength":1,"pattern":"^whe_[0-9a-hjkmnp-tv-z]{26}$","example":"whe_01krdgeqcxet5s7t44vh8rt9mg"},"WebhookAttempt":{"type":"object","additionalProperties":false,"required":["id","event_type","status","url","response_status_code","response_duration_ms","attempted_at"],"properties":{"id":{"type":"string","readOnly":true,"minLength":1,"description":"Identifier of this individual delivery attempt. Each retry is a separate attempt with its own id; use `event_id` to group the attempts for one event.\n","example":"msgatt_3FdaB1NkOmM6m8AxhgEYTJgqHU3"},"event_id":{"description":"Bird's source event ID, stable across retries of the same event. Null only for older attempts recorded before event IDs were available.","oneOf":[{"$ref":"#/components/schemas/WebhookEventID"},{"type":"null"}]},"event_type":{"$ref":"#/components/schemas/WebhookEventType"},"status":{"type":"string","minLength":1,"enum":["delivered","pending","failed"],"description":"Outcome of this attempt.\n\n- `delivered`: your endpoint accepted it with a `2xx` response.\n- `pending`: the attempt is still in flight.\n- `failed`: it returned a non-`2xx` response or no response at all. Automatic\n  retries appear as further attempts with the same `event_id`, so a `failed`\n  attempt is final for the event only once the retry schedule is spent. A\n  replayed delivery takes a single attempt and is never retried.\n"},"url":{"type":"string","format":"uri","minLength":1,"description":"URL the request was sent to. For a webhook endpoint, its `url` at the time of the attempt, which can differ from the current configuration after an update. For an SMS callback, the callback URL resolved for the message's event.\n","example":"https://example.com/webhooks"},"failure_reason":{"type":"string","minLength":1,"description":"Why the attempt failed when no HTTP response explains it: a failure before any request was sent, such as a connector body that could not be rendered, or a TLS failure, such as an endpoint certificate that could not be verified. Absent for other attempts.\n","example":"The endpoint's connection changed after this delivery was queued."},"response_status_code":{"type":["integer","null"],"description":"HTTP status returned by the receiver. Null when no response was received (timeout, connection error, DNS failure).","example":200},"response_body":{"type":"string","description":"Response body your endpoint returned, which may be truncated. Omitted when no body was returned.\n","example":"{\"ok\":true}"},"response_duration_ms":{"type":"integer","minimum":0,"description":"Round-trip duration in milliseconds.","example":87},"attempted_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When this attempt was made. Attempts are listed newest first by this timestamp, and the list's `before`/`after` parameters bound it.\n","example":"2026-05-22T11:50:38.080Z"}}},"WebhookAttemptList":{"type":"object","additionalProperties":false,"required":["data","next_cursor","prev_cursor","refresh_cursor"],"properties":{"data":{"type":"array","description":"Delivery attempts, newest first.","items":{"$ref":"#/components/schemas/WebhookAttempt"}},"next_cursor":{"type":["string","null"],"description":"Cursor for the next page. Pass back as `starting_after` to advance forward. `null` when no next page exists.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"},"prev_cursor":{"type":["string","null"],"description":"Cursor for the previous page. Pass back as `ending_before` to step backward. `null` when no previous page exists.","example":null},"refresh_cursor":{"type":["string","null"],"description":"Refresh anchor, the first row of this response. Pass back as `ending_before` to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-`null` whenever `data` is non-empty; `null` only on an empty page. Distinct from `prev_cursor`.","example":"eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"}}},"MTLSState":{"type":"string","description":"Whether client certificates are off (`disabled`), checked while the previous behavior stays available (`evaluating`), or required (`enforced`).","enum":["disabled","evaluating","enforced"]},"MTLSCRLCheck":{"type":"string","minLength":1,"enum":["disabled","full_chain"],"description":"How a certificate chain is checked against the certificate revocation list (CRL) that each certificate names. With `full_chain`, the leaf certificate and each intermediate certificate below the trusted root are checked. A certificate that names no CRL is not checked."},"WebhookClientCertificateDetails":{"type":"object","readOnly":true,"description":"Public details of a webhook client certificate.","additionalProperties":false,"required":["subject","issuer","serial_number","fingerprint_sha256","not_before","not_after"],"properties":{"subject":{"type":"string","minLength":1,"description":"The distinguished name of the certificate.","example":"CN=bird-webhooks,O=Example Inc."},"issuer":{"type":"string","minLength":1,"description":"The distinguished name of the certificate authority that signed it.","example":"CN=Example Client CA,O=Example Inc."},"serial_number":{"type":"string","minLength":1,"pattern":"^[0-9a-f]+$","description":"The serial number, in lowercase hexadecimal.","example":"4f2a91c0d3"},"fingerprint_sha256":{"type":"string","minLength":1,"pattern":"^[0-9a-f]{64}$","description":"The SHA-256 fingerprint of the certificate, in lowercase hexadecimal.","example":"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"},"not_before":{"type":"string","minLength":1,"format":"date-time","description":"Start of the validity period."},"not_after":{"type":"string","minLength":1,"format":"date-time","description":"End of the validity period."}}},"WebhookClientCertificateSigningRequest":{"type":"object","readOnly":true,"description":"A certificate signing request (CSR) for a new key pair that we generated. The private key stays with us. Get the CSR signed by your certificate authority, then upload the certificate.\n","additionalProperties":false,"required":["csr","created_at"],"properties":{"csr":{"type":"string","minLength":1,"description":"The PEM-encoded PKCS #10 certificate signing request.","example":"-----BEGIN CERTIFICATE REQUEST-----\nMIIB...\n-----END CERTIFICATE REQUEST-----\n"},"created_at":{"type":"string","minLength":1,"format":"date-time","description":"When we created the signing request."}}},"WebhookClientCertificate":{"type":"object","readOnly":true,"description":"The client certificate that we present on webhook deliveries of your workspace. With `disabled`, we present no certificate. With `evaluating`, we present the certificate when the receiver asks for one. If the receiver does not ask, we deliver and report it. If the receiver rejects the certificate, we retry without it and report it. A failed check of the receiver's own certificate fails the attempt without a retry. With `enforced`, we present the certificate and fail the delivery attempt when the receiver does not ask for one or rejects it. `crl_check` applies to the server certificate chain of the receiver and is `disabled` by default. A failed CRL check fails the delivery attempt. When webhook mTLS is not enabled for this workspace, `state` and `crl_check` read `disabled` and deliveries obey them. Neither applies to `realtime.*` events, which Realtime delivers without the certificate, to connector endpoints, which call third-party APIs, or to MCP Events subscriptions, whose callback URL an OAuth authorization chooses.\n","additionalProperties":false,"required":["state","crl_check","certificate","signing_request","updated_at"],"properties":{"state":{"$ref":"#/components/schemas/MTLSState"},"crl_check":{"$ref":"#/components/schemas/MTLSCRLCheck"},"certificate":{"description":"The certificate in use. `null` until you upload one.","oneOf":[{"$ref":"#/components/schemas/WebhookClientCertificateDetails"},{"type":"null"}]},"signing_request":{"description":"The signing request that waits for a signed certificate. `null` when none waits.","oneOf":[{"$ref":"#/components/schemas/WebhookClientCertificateSigningRequest"},{"type":"null"}]},"updated_at":{"type":["string","null"],"minLength":1,"format":"date-time","description":"When the certificate or its state last changed. `null` until the first change."}}},"WebhookClientCertificateUpdate":{"type":"object","description":"Changes to the webhook client certificate. Omit a field to keep its value. `evaluating` and `enforced` require an uploaded certificate.\n","additionalProperties":false,"minProperties":1,"properties":{"state":{"$ref":"#/components/schemas/MTLSState"},"crl_check":{"$ref":"#/components/schemas/MTLSCRLCheck"}}},"WebhookClientCertificateUpload":{"type":"object","description":"The signed certificate for the waiting signing request. The certificate must match the key of the signing request, have the `clientAuth` extended key usage and be in its validity period. Each intermediate certificate must be a CA certificate in its validity period that signed the certificate before it. It replaces the certificate in use.\n","additionalProperties":false,"required":["certificate_chain"],"properties":{"certificate_chain":{"type":"string","minLength":1,"maxLength":65536,"description":"PEM-encoded certificates, the signed certificate first, then any intermediate certificates.","example":"-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----\n"}}},"WorkspaceMTLSSettings":{"type":"object","description":"Client certificate (mTLS) settings for API requests to your workspace. The mTLS endpoint is `mtls.<region>.platform.bird.com`. With `disabled`, the mTLS endpoint rejects requests. With `evaluating`, both endpoints accept requests, and the mTLS endpoint rejects a request without a valid client certificate. With `enforced`, only the mTLS endpoint accepts requests. Dashboard and OAuth requests are accepted on the standard endpoint in every state. `crl_check` is `disabled` by default.\n","additionalProperties":false,"required":["state","expected_san","crl_check"],"properties":{"state":{"$ref":"#/components/schemas/MTLSState"},"expected_san":{"type":["string","null"],"minLength":1,"maxLength":2048,"description":"A subject alternative name that every client certificate must contain, as a DNS name or a URI. `null` when any subject alternative name is accepted.","example":"spiffe://example.com/billing"},"crl_check":{"$ref":"#/components/schemas/MTLSCRLCheck"}}},"WorkspaceMTLSSettingsUpdate":{"type":"object","description":"Changes to the client certificate (mTLS) settings. Omit a field to keep its value. `evaluating` and `enforced` require at least one certificate authority.\n","additionalProperties":false,"minProperties":1,"properties":{"state":{"$ref":"#/components/schemas/MTLSState"},"expected_san":{"type":["string","null"],"minLength":1,"maxLength":2048,"description":"A subject alternative name that every client certificate must contain, as a DNS name or a URI. `null` accepts any subject alternative name.","example":"spiffe://example.com/billing"},"crl_check":{"$ref":"#/components/schemas/MTLSCRLCheck"}}},"MTLSCertificateAuthorityID":{"type":"string","minLength":1,"pattern":"^mtlsca_[0-9a-hjkmnp-tv-z]{26}$","example":"mtlsca_01krdgeqcxet5s7t44vh8rt9mg"},"MTLSCertificateAuthority":{"type":"object","readOnly":true,"description":"A certificate authority that issues the client certificates of your workspace.","additionalProperties":false,"required":["id","subject","fingerprint_sha256","not_before","not_after","created_at"],"properties":{"id":{"$ref":"#/components/schemas/MTLSCertificateAuthorityID"},"subject":{"type":"string","minLength":1,"description":"The distinguished name of the certificate authority.","example":"CN=Example Client CA,O=Example Inc."},"fingerprint_sha256":{"type":"string","minLength":1,"pattern":"^[0-9a-f]{64}$","description":"The SHA-256 fingerprint of the certificate, in lowercase hexadecimal.","example":"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"},"not_before":{"type":"string","minLength":1,"format":"date-time","description":"Start of the validity period of the certificate authority."},"not_after":{"type":"string","minLength":1,"format":"date-time","description":"End of the validity period of the certificate authority."},"created_at":{"type":"string","minLength":1,"format":"date-time","description":"When you added the certificate authority."}}},"MTLSCertificateAuthorityList":{"type":"object","description":"The certificate authorities of your workspace.","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","maxItems":2,"items":{"$ref":"#/components/schemas/MTLSCertificateAuthority"}}}},"MTLSCertificateAuthorityCreate":{"type":"object","description":"A certificate authority to add. The certificate must be an unexpired CA certificate that can sign certificates. A workspace has at most two certificate authorities.\n","additionalProperties":false,"required":["certificate"],"properties":{"certificate":{"type":"string","minLength":1,"maxLength":16384,"description":"One PEM-encoded X.509 certificate.","example":"-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----\n"}}},"VoicePartyEndpointType":{"type":"string","minLength":1,"x-extensible-enum":["pstn","sip","voicemail","bridge_pstn","bridge_sip","webhook"],"description":"The technical participant observed on one side of a call. Additional endpoint types may appear in retained observations.","example":"pstn"},"VoicePartySIPEndpoint":{"type":"object","readOnly":true,"additionalProperties":false,"required":["contact"],"properties":{"contact":{"type":"string","minLength":1,"description":"The address the user agent registered, as a `sip:` or `sips:` URI. It is where the endpoint asked to be reached, which is not always the address that was dialled.","example":"sip:ua@203.0.113.7:5060"}}},"VoiceInboundForwardAs":{"type":"string","minLength":1,"enum":["dialed_number","calling_number"],"description":"Which of a forwarded call's two numbers it shows as the caller.\n\n`dialed_number` presents the Bird number the caller dialed. Whoever answers\nsees which of your numbers was called. Older configurations without a stored\nchoice use this value. Carrier screening can still affect delivery.\n\n`calling_number` presents the caller's own number, so the phone rings as though\nthey had dialed it directly and the call can be returned from the call log. Because\nthe number is not one you own, some carriers (most often in the US and parts of\nEurope) mark such calls as unverified, replace the number, or screen them.\n","example":"dialed_number"},"VoicePartyBridgePSTNEndpoint":{"type":"object","readOnly":true,"additionalProperties":false,"required":["forward_to","forward_as"],"properties":{"forward_to":{"type":"string","minLength":3,"maxLength":16,"pattern":"^\\+[1-9][0-9]{1,14}$","description":"The number the platform placed the leg onward to, in E.164. The party's own `address` is the number that was dialled, so the two together are one hop of the call.","example":"+31612345678"},"forward_as":{"$ref":"#/components/schemas/VoiceInboundForwardAs","description":"Which number the forwarded leg presented to the far end."}}},"VoicePartyBridgeSIPEndpoint":{"type":"object","readOnly":true,"additionalProperties":false,"required":["trunk_id"],"properties":{"trunk_id":{"$ref":"#/components/schemas/SIPTrunkID","description":"The workspace trunk the leg was delivered onward to. It is distinct from the party's own `trunk_id`, which is the trunk this side itself sat behind."}}},"VoicePartyEndpoint":{"type":"object","readOnly":true,"additionalProperties":false,"required":["type"],"properties":{"type":{"$ref":"#/components/schemas/VoicePartyEndpointType","description":"What kind of participant sat on this side of a leg. It selects which payload below is present, and most kinds carry none because the party's `address` is already their coordinate."},"sip":{"$ref":"#/components/schemas/VoicePartySIPEndpoint","description":"The registered contact of a `sip` endpoint. Absent when the observation recorded none, and on every other kind of endpoint."},"bridge_pstn":{"$ref":"#/components/schemas/VoicePartyBridgePSTNEndpoint","description":"Where the platform placed the leg onward, on a `bridge_pstn` endpoint. Absent on every other kind of endpoint."},"bridge_sip":{"$ref":"#/components/schemas/VoicePartyBridgeSIPEndpoint","description":"The trunk the platform delivered the leg onward to, on a `bridge_sip` endpoint. Absent on every other kind of endpoint."}}},"VoiceParty":{"type":"object","additionalProperties":false,"properties":{"endpoint":{"readOnly":true,"oneOf":[{"$ref":"#/components/schemas/VoicePartyEndpoint"},{"type":"null"}],"description":"What kind of participant sat on this side of a leg, and the coordinate that kind carries: a telephone endpoint off the platform, a SIP or WebRTC endpoint, Bird answering, or the platform placing a leg onward. It does not name a person.\n\n`null` on an observation this API could not read. The entry stays, because the call counted it when it deduplicated, and dropping it here would report fewer participants than were observed.\n"},"address":{"readOnly":true,"type":["string","null"],"description":"This side's own address, in E.164 or as a `sip:` URI. `null` when the observation carried none, which does not say whether one was withheld, missing, or nonexistent.","example":"+14155551234"},"overdial_suffix":{"readOnly":true,"type":"string","minLength":1,"maxLength":16,"pattern":"^[0-9]+$","description":"Digits dialled after this party's number, including leading zeroes. Absent when no overdial was received."},"trunk_id":{"readOnly":true,"oneOf":[{"$ref":"#/components/schemas/SIPTrunkID"},{"type":"null"}],"description":"The workspace trunk on this side of the leg. `null` when this side sat behind no trunk."},"user_id":{"readOnly":true,"oneOf":[{"$ref":"#/components/schemas/UserID"},{"type":"null"}],"description":"The workspace user this side acted for, such as a user's browser, the ring group member whose side a recording captured, or the user who started a sequence call. `null` for every other participant, including an API key."}}},"VoiceCallTranscriptID":{"type":"string","minLength":1,"pattern":"^vct_[0-9a-hjkmnp-tv-z]{26}$","example":"vct_01krdgeqcxet5s7t44vh8rt9mg"},"VoiceCallMediaID":{"type":"string","minLength":1,"pattern":"^vcm_[0-9a-hjkmnp-tv-z]{26}$","example":"vcm_01krdgeqcxet5s7t44vh8rt9mg"},"VoiceLegTranscriptState":{"type":"string","minLength":1,"enum":["available","failed"],"description":"Whether the attempt produced a transcript. `failed` is an outcome, not evidence that a later attempt cannot succeed.","example":"available"},"VoiceLegChannel":{"type":"string","minLength":1,"enum":["rx","tx"],"description":"Which direction of the leg the stream carries: `rx` for what the platform received, `tx` for what it sent.","example":"rx"},"VoiceLegTranscriptCue":{"type":"object","additionalProperties":false,"readOnly":true,"required":["seq","text"],"properties":{"seq":{"type":"integer","description":"Position of this cue in the transcript."},"start_ms":{"type":["integer","null"],"description":"Offset of this cue from the start of its stream, in milliseconds. Set on `aligned` cues; `null` when nothing measured it, because a zero would be a claim about timing that was never made."},"end_ms":{"type":["integer","null"],"description":"Offset of the end of this cue from the start of its stream. `null` on the same terms as `start_ms`."},"text":{"type":"string","minLength":0,"description":"What was transcribed for this cue. Empty on the single cue of a stream where nothing was heard."}}},"VoiceSessionCredential":{"type":"object","description":"A short-lived SIP digest credential for a calling client. The `password` is returned once and cannot be recovered. Create a new credential if you lose it.\n","additionalProperties":false,"required":["username","password","realm","expires_at"],"properties":{"username":{"type":"string","minLength":1,"maxLength":64,"description":"SIP digest username. Always `bird`. The credential identifies the workspace through `realm`. The username does not identify the workspace.\n","example":"bird"},"password":{"type":"string","minLength":1,"maxLength":128,"x-sensitive":true,"description":"SIP digest password, returned once. Treat it as a bearer secret: until it expires it can place calls billed to this workspace.\n","example":"8Kx2mQ7pR4tYvB9nL3sW6dF1gH5jC0aZ"},"realm":{"type":"string","minLength":1,"maxLength":253,"description":"SIP digest realm to authenticate against. Workspace-scoped, so a credential minted for one workspace cannot authenticate against another.\n","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV.sip.bird.com"},"expires_at":{"type":"string","format":"date-time","minLength":1,"description":"When the credential stops authenticating, five minutes after creation. Existing calls may continue; use a fresh credential for later authentication.","example":"2026-07-30T12:05:00Z"},"handshake_token":{"type":"string","minLength":1,"maxLength":4096,"x-sensitive":true,"description":"Short-lived token required when upgrading the WebSocket connection. The token authorizes the connection only; each call still authenticates with `password`.\n","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3ODU0NDMwMzV9.fp1xWxROEmgCafwiJ-ZHbZg9cIdYC-wLGcH-5gIVbco"}}},"VoiceLegRejectionReason":{"type":"string","minLength":1,"x-extensible-enum":["source_not_allowed","caller_id_not_verified","routing_not_configured","no_route_found","destination_blocked","destination_not_enabled","insufficient_balance","daily_spend_exceeded","concurrent_calls_exceeded","calls_per_second_exceeded","call_not_permitted","number_ownership_not_verified","sequence_paused","sequence_archived","sequence_unpublished","emergency_number_inactive","emergency_country_mismatch","emergency_cap_exceeded","emergency_carrier_unavailable"],"description":"Why we rejected the leg. Use `rejection_reason` to identify the cause;\n`sip_response_code` alone cannot distinguish these reasons. Treat an\nunrecognized value as a reason added later.\n\nYou can resolve these issues:\n\n- `source_not_allowed`: The leg came from an IP address that is not in the\n  trunk's allowed-address list. Add the address your PBX sends from.\n- `caller_id_not_verified`: The number in the `From` header is not a verified\n  caller ID for this workspace. Verify it or use a verified caller ID.\n- `number_ownership_not_verified`: Calls are blocked on this purchased number\n  while ownership or activation checks are incomplete. Refused incoming legs\n  do not reach your PBX and have route type `reject`. Find the number under\n  **Numbers** and follow its current ownership or activation step.\n- `destination_not_enabled`: Calling to this destination country is disabled.\n  Enable it in your voice destination settings.\n- `insufficient_balance`: Your wallet balance was too low for the leg.\n  Top up or enable automatic top-ups.\n- `daily_spend_exceeded`: The leg would exceed your organization's daily\n  voice spend limit. Retry after the limit resets at the start of the next\n  UTC day.\n- `concurrent_calls_exceeded`: You already have as many legs in progress as\n  your account allows. Wait for one to end or ask support to raise the limit.\n- `calls_per_second_exceeded`: You placed legs faster than your account\n  allows. Reduce your dialing rate and retry.\n- `sequence_paused`: The sequence receiving this call is paused. Resume it\n  to receive calls.\n- `sequence_archived`: The sequence receiving this call is archived. Route\n  the number to an available sequence.\n- `sequence_unpublished`: The sequence receiving this call has no active\n  publication. Publish it to receive calls.\n\n- `emergency_number_inactive`: The trunk's emergency number is not active, or\n  the workspace has no active emergency site for a browser call. Set up an\n  emergency site if needed. If the service is pending, wait for activation.\n  If it needs changes, complete the filing. If it was rejected or canceled,\n  start a new service or choose another emergency number.\n- `emergency_country_mismatch`: The dialed emergency number is not recognised\n  in the configured emergency site's country. Dial an emergency number for\n  that country or use another line.\n- `emergency_cap_exceeded`: The trunk already carries 10 emergency calls.\n  The 11th is refused until one ends.\n\nFor all other reasons, contact support and provide the leg `id`:\n\n- `routing_not_configured`: This trunk has no dial plan, which can happen on\n  a new trunk. For a SIP user's call, the trunk has no outbound routing, or\n  the phone dialled a number without a country code on a trunk with no\n  `country`: set the trunk's country or dial in international format.\n- `no_route_found`: A dial plan is attached, but no rule in it covers this\n  destination.\n- `destination_blocked`: The destination is blocked by our routing\n  configuration.\n- `call_not_permitted`: The leg could not be priced for your account.\n- `emergency_carrier_unavailable`: No carrier we use accepts emergency calls\n  from the trunk's emergency number.\n","example":"destination_not_enabled"},"VoiceLegInboundRouteType":{"type":"string","minLength":1,"enum":["reject","trunk","forward","sequence","ring_group"],"description":"Which answer handled this incoming leg.\n\n- `reject`: the call was refused.\n- `trunk`: the call was delivered to one of your SIP trunks.\n- `forward`: the call was forwarded to one of your verified caller IDs.\n- `sequence`: the call was handled by one of your sequences.\n- `ring_group`: the call rang one of your ring groups.\n","example":"trunk"},"VoiceLegInboundRouteReject":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/VoiceLegInboundRouteType"}],"const":"reject","description":"The number turned the leg away, either because its own route is reject or because it has none and the workspace default inbound route is reject.\n"}}},"VoiceLegInboundRouteTrunk":{"type":"object","additionalProperties":false,"required":["type","trunk_id"],"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/VoiceLegInboundRouteType"}],"const":"trunk","description":"The leg was delivered to one of your SIP trunks."},"trunk_id":{"allOf":[{"$ref":"#/components/schemas/SIPTrunkID"}],"description":"The SIP trunk the leg was delivered to. Recorded as it was at the time, so it may name a trunk you have since changed or deleted.\n"}}},"VoiceLegInboundRouteForward":{"type":"object","additionalProperties":false,"required":["type","forward_to","forward_as"],"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/VoiceLegInboundRouteType"}],"const":"forward","description":"The leg was forwarded to another of your numbers."},"forward_to":{"type":"string","minLength":1,"description":"The number the leg was forwarded to, in E.164 format. Recorded as it was at the time, so it may name a number you have since stopped verifying.\n","example":"+14155551234"},"forward_as":{"allOf":[{"$ref":"#/components/schemas/VoiceInboundForwardAs"}],"description":"Which of the leg's two numbers the forwarded leg presented as its caller. The value that went on the wire, not the one the number is set to now.\n"}}},"VoiceSequenceID":{"type":"string","minLength":1,"pattern":"^vsq_[0-9a-hjkmnp-tv-z]{26}$","example":"vsq_01krdgeqcxet5s7t44vh8rt9mg"},"VoiceSequenceNodeID":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$","not":{"enum":["false","in","null","true"]},"description":"Stable identifier for a node within one sequence definition."},"VoiceLegInboundRouteSequence":{"type":"object","additionalProperties":false,"required":["type","sequence_id","entry_node_id"],"properties":{"type":{"$ref":"#/components/schemas/VoiceLegInboundRouteType","const":"sequence","description":"The selected route points to one of your sequences."},"sequence_id":{"allOf":[{"$ref":"#/components/schemas/VoiceSequenceID"}],"description":"The sequence selected for the leg. Recorded as it was at the time, so it may name a sequence you have since changed or deleted. A refused leg may have no sequence run.\n"},"entry_node_id":{"allOf":[{"$ref":"#/components/schemas/VoiceSequenceNodeID"}],"description":"The selected entry. Recorded as it was at the time, so it may name an entry the sequence no longer has; selection does not mean a run was admitted.\n"}}},"VoiceRingGroupID":{"type":"string","minLength":1,"pattern":"^vrg_[0-9a-hjkmnp-tv-z]{26}$","example":"vrg_01krdgeqcxet5s7t44vh8rt9mg"},"VoiceLegInboundRouteRingGroup":{"type":"object","additionalProperties":false,"required":["type","ring_group_id"],"properties":{"type":{"$ref":"#/components/schemas/VoiceLegInboundRouteType","const":"ring_group","description":"The leg rang one of your ring groups."},"ring_group_id":{"allOf":[{"$ref":"#/components/schemas/VoiceRingGroupID"}],"description":"The ring group the leg rang. Recorded as it was at the time, so it may name a group you have since deleted.\n"}}},"VoiceLegInboundRoute":{"description":"The routing choice recorded for an incoming leg. A recorded route does not\nguarantee that the leg connected. Check `status` for the outcome and\n`rejection_reason` for the cause when present.\n","oneOf":[{"$ref":"#/components/schemas/VoiceLegInboundRouteReject"},{"$ref":"#/components/schemas/VoiceLegInboundRouteTrunk"},{"$ref":"#/components/schemas/VoiceLegInboundRouteForward"},{"$ref":"#/components/schemas/VoiceLegInboundRouteSequence"},{"$ref":"#/components/schemas/VoiceLegInboundRouteRingGroup"}],"discriminator":{"propertyName":"type","mapping":{"reject":"#/components/schemas/VoiceLegInboundRouteReject","trunk":"#/components/schemas/VoiceLegInboundRouteTrunk","forward":"#/components/schemas/VoiceLegInboundRouteForward","sequence":"#/components/schemas/VoiceLegInboundRouteSequence","ring_group":"#/components/schemas/VoiceLegInboundRouteRingGroup"}}},"VoiceLegAnsweredByType":{"type":"string","minLength":1,"enum":["user"],"description":"Which kind of registration answered.\n\n- `user`: a workspace user's browser-phone registration.\n","example":"user"},"VoiceRegistrationID":{"type":"string","minLength":1,"pattern":"^vur_[0-9a-hjkmnp-tv-z]{26}$","example":"vur_01krdgeqcxet5s7t44vh8rt9mg"},"VoiceLegAnsweredByUser":{"type":"object","readOnly":true,"additionalProperties":false,"description":"A workspace user answered, on their browser-phone registration. The registration is deleted soon after its browser disconnects, so `registration_id` may no longer be listed.","required":["type","registration_id","user_id"],"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/VoiceLegAnsweredByType"}],"const":"user"},"registration_id":{"$ref":"#/components/schemas/VoiceRegistrationID","description":"The registration that answered."},"user_id":{"$ref":"#/components/schemas/UserID","description":"The workspace user who answered."}}},"VoiceLegAnsweredBy":{"description":"Who answered, by kind. `type` says which: today always `user`, a workspace user's browser-phone registration. More kinds may be added, so treat an unknown `type` as an answer whose details this client cannot show. Until a kind is listed here, an answer of that kind reads as `null`.","readOnly":true,"oneOf":[{"$ref":"#/components/schemas/VoiceLegAnsweredByUser"}],"discriminator":{"propertyName":"type","mapping":{"user":"#/components/schemas/VoiceLegAnsweredByUser"}}},"VoiceMediaQuality":{"type":"object","additionalProperties":false,"required":["mos","jitter_ms","packet_loss_pct","round_trip_time_ms"],"properties":{"mos":{"type":"number","minimum":1,"maximum":5,"readOnly":true,"description":"Mean opinion score, the single number for how the call sounded, from 1 (unintelligible) to 5 (as good as being in the same room). Anything at or above 4.0 is what most people would call a clear line, and below 3.5 is where callers start asking each other to repeat themselves. The three other fields are the impairments that move it.\n","example":4.32},"jitter_ms":{"type":"integer","minimum":0,"readOnly":true,"description":"Variation in the arrival time of the audio packets, in milliseconds. Audio arriving unevenly is heard as choppiness even when no packets are lost at all.","example":12},"packet_loss_pct":{"type":"number","minimum":0,"readOnly":true,"description":"Percentage of audio packets that never arrived. Heard as brief gaps or clipped words, and the impairment that degrades a call fastest.","example":1.5},"round_trip_time_ms":{"type":"integer","minimum":0,"readOnly":true,"description":"Round-trip time between the two ends, in milliseconds. It does not distort the audio. Above roughly 300 ms, the two parties start talking over each other.","example":42}}},"VoiceLegMediaEncryption":{"type":"string","minLength":1,"x-extensible-enum":["none","sdes","dtls"],"description":"How a leg's audio was encrypted between us and the party it connects us to.\n\n- `none`: plain RTP.\n- `sdes`: SRTP with keys exchanged in the SDP over TLS signalling (SDES, RFC 4568).\n- `dtls`: DTLS-SRTP, which every call placed from a browser uses.\n","example":"sdes"},"VoiceLegMediaPath":{"type":"object","readOnly":true,"additionalProperties":false,"required":["encryption"],"properties":{"encryption":{"allOf":[{"$ref":"#/components/schemas/VoiceLegMediaEncryption"}],"description":"How the audio between Bird and your SIP trunk equipment or browser was encrypted. For a leg without either, such as an incoming call answered by a Sequence, this describes the carrier's side. Use this field to check whether a call on a trunk with `preferred` media encryption was encrypted. Audio can be plain when the gateway does not use TLS or when encryption is unavailable through an exit.\n\n- `none`: plain RTP.\n- `sdes`: SRTP with keys exchanged in the SDP over TLS signalling (SDES, RFC 4568). The audio between us and the carrier stays plain RTP.\n- `dtls`: DTLS-SRTP, used for calls placed from a browser.\n\nAbsent when we did not record it: on a leg whose audio bypassed us, on an encrypted offer to a SIP trunk whose media encryption is `off`, on a leg placed without an SDP offer in its INVITE, on an incoming leg that was not answered, and on legs recorded before this field existed.\n"}}},"VoiceLegCost":{"type":"object","additionalProperties":false,"required":["amount","currency_code","outbound_amount","inbound_amount","call_handling_amount","recording_amount","transcription_amount"],"description":"The rated Voice charges for a leg, split into their components. For Flash calling (coming soon), this covers only network usage and excludes the verification attempt fee. A Flash leg that rang without an answer has a total of zero and a null `outbound_amount` because there was no connected usage to charge. The Verify attempt cost includes both charges.\n","properties":{"amount":{"type":"string","minLength":1,"readOnly":true,"description":"Sum of the Voice components below, as a decimal string. Net of tax, which applies to your wallet balance rather than to an individual charge. For Flash calling (coming soon), this excludes the verification attempt fee and can be `0.000000` for a rated, unanswered leg.\n","example":"0.013000"},"currency_code":{"readOnly":true,"$ref":"#/components/schemas/CurrencyCode","description":"ISO 4217 currency code. Every component is denominated in this currency.","example":"USD"},"outbound_amount":{"type":["string","null"],"readOnly":true,"description":"What we charged to carry the leg to the destination network, as a decimal string. `null` until this component is priced.\n","example":"0.013000"},"inbound_amount":{"type":["string","null"],"readOnly":true,"description":"What we charged to receive the leg from the originating network, as a decimal string. Only a leg that arrived at your number can carry it. `null` until this component is priced.\n","example":null},"call_handling_amount":{"type":["string","null"],"readOnly":true,"description":"What we charged for handling the call itself, as a decimal string. A call is charged for handling once, however many legs it has, so only one leg's record carries it. `null` until this component is priced.\n","example":null},"recording_amount":{"type":["string","null"],"readOnly":true,"description":"What we charged to record the leg, as a decimal string, billed per second over the same billable time as the rest of the leg. `null` until this component is priced.\n","example":null},"transcription_amount":{"type":["string","null"],"readOnly":true,"description":"What we charged to transcribe the leg's audio, as a decimal string, billed per second of recorded audio rather than for the length of the leg. A transcript is produced after the leg ends, so this can appear after the rest of the cost. `null` until this component is priced.\n","example":null}}},"VoiceLeg":{"type":"object","additionalProperties":false,"required":["id","workspace_id","direction","from","to","status","started_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/VoiceCallID","description":"Unique identifier for this leg record."},"call_id":{"readOnly":true,"oneOf":[{"$ref":"#/components/schemas/VoiceSessionID"},{"type":"null"}],"description":"Call identifier shared across all legs of a multi-party or transferred call. Use this to correlate related leg records. `null` when call correlation is not available for the leg."},"workspace_id":{"readOnly":true,"$ref":"#/components/schemas/WorkspaceID"},"direction":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/VoiceCallDirection"}]},"from":{"type":"string","minLength":1,"readOnly":true,"description":"The calling party: an E.164 number, a SIP extension on a trunk call, or the `usr_` ID of a browser caller to a workspace user or ring group. A withheld caller may be `anonymous`.","example":"+14155551234"},"to":{"type":"string","minLength":1,"readOnly":true,"description":"The dialled destination: an E.164 number, a SIP extension such as `1001` on a trunk call, or the `usr_`, `vrg_` or `vsq_` ID of the workspace user, ring group or sequence a browser called.","example":"+16505559876"},"overdial_suffix":{"type":"string","readOnly":true,"description":"Digits appended to this leg's destination number, preserving leading zeroes. Absent for a call without overdial.","minLength":1,"pattern":"^[0-9]+$","maxLength":16},"actor":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Actor"}],"description":"Who placed the leg: the API key whose credentials it used, the integration acting for the workspace, or the user who placed it from a browser or the CLI. Absent when the leg was admitted only by its source IP address, or when no actor was recorded."},"sip_trunk_id":{"readOnly":true,"oneOf":[{"$ref":"#/components/schemas/SIPTrunkID"},{"type":"null"}],"description":"Identifier of the SIP trunk that originated this leg. `null` when no trunk is associated."},"sip_call_id":{"type":"string","minLength":1,"readOnly":true,"description":"The SIP `Call-ID` of this leg's signalling. We relay it unchanged, so it matches what the carrier and your own equipment logged for the same leg: the carrier's value on an incoming leg, and your system's value on a leg you place through a SIP trunk. Use it to match this leg against a carrier's records or your PBX logs. Legs recorded before this field existed carry it only if they were answered.","example":"3f9a1c8e7b2d4a5f@sip.example.net"},"status":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/VoiceCallStatus"}]},"sip_response_code":{"readOnly":true,"type":["integer","null"],"minimum":100,"description":"Final SIP response code for the leg. `null` when no SIP response was received, for example on timeout or DNS failure.","example":200},"rejection_reason":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/VoiceLegRejectionReason"}],"description":"Why we rejected the leg. Sequence-state reasons require\n`voice_management:read`; the field is absent without that permission.\nAlso absent on connected legs and legs rejected\nby the carrier or recipient. For carrier or recipient rejections, see\n`sip_response_code`; a `6xx` decline gives the leg a `rejected` status.\n\nRead alongside `route` when present. A number's own configured rejection\nhas no rejection reason; the route records that configuration. An\nunavailable sequence has a reason identifying its state when you have\nthat permission.\n"},"route":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/VoiceLegInboundRoute"}],"description":"Which answer your number gave an incoming leg. Its `type` selects the shape, and each answer carries its own fields; the variants below are the full set you can receive. Recorded when the leg was handled, so changing the number's setup afterwards does not change what its past legs say. Absent on outbound legs, and on legs recorded before this field existed."},"tags":{"type":"array","maxItems":5,"readOnly":true,"items":{"$ref":"#/components/schemas/Tag"},"description":"Your own `{name, value}` labels for this leg, taken from the `X-Bird-Call-Tag` headers on the INVITE that placed it. Set them to organise legs by a dimension of your own (campaign, queue, agent, cost centre), then filter this list by them with `tag`. Read-only here: a leg is labelled when it is placed, and never afterwards. What is here may be less than what was sent, and the leg still goes through either way: a tag whose name or value breaks the rules below is dropped, anything past the first five is ignored, and a name sent more than once keeps its first value. Absent when the leg carried none, and on legs recorded before this field existed."},"started_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the leg was initiated."},"answered_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the leg was answered (`200` OK received). `null` for unanswered legs."},"answered_by":{"readOnly":true,"oneOf":[{"$ref":"#/components/schemas/VoiceLegAnsweredBy"},{"type":"null"}],"description":"Who answered when Bird rang your workspace users for this leg, through a ring group or a browser call to a user or a ring group. When a sequence rings more than once, it names who answered the latest ring. `null` when no workspace user answered, on legs recorded before this field existed, or when the API does not support the stored answerer kind. New kinds may be added; handle unknown `type` values as future answerer kinds."},"ended_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the leg ended (BYE or final non-2xx response). `null` for legs that ended abnormally without a recorded end event."},"duration_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"Total leg duration in milliseconds, measured from the first INVITE to the BYE or final response. `null` while the leg is still in progress and has no final duration yet.","example":65000},"pdd_ms":{"type":"integer","minimum":0,"readOnly":true,"description":"Post-dial delay in milliseconds: how long the caller heard nothing between dialing and the phone starting to ring at the other end. High values are what callers experience as the leg `not going through`. Absent when the leg never rang, either because it failed first or because the carrier answered it immediately.\n","example":850},"billable_ms":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"Billable duration in milliseconds, measured from answer to leg end. Zero for unanswered legs, and `null` while the leg is still in progress.","example":60000},"media_quality":{"$ref":"#/components/schemas/VoiceMediaQuality","readOnly":true,"description":"How the audio sounded, as opposed to whether the leg connected. Absent when the leg carried no audio, or when the far end reported nothing to measure from."},"media":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/VoiceLegMediaPath"}],"description":"How the leg's audio travelled between us and your side. Absent when we recorded nothing about it, including on legs recorded before this field existed."},"cost":{"$ref":"#/components/schemas/VoiceLegCost","readOnly":true,"description":"The rated Voice charges for this leg, net of tax, at full precision. Absent for an unrated or exempt leg, including a verification call Bird places and answers on your behalf. For Flash calling (coming soon), a leg that rang without an answer has a total of zero and a null `outbound_amount`; the verification attempt fee is excluded."}}},"WalletID":{"type":"string","minLength":1,"pattern":"^wal_[0-9a-hjkmnp-tv-z]{26}$","example":"wal_01krdgeqcxet5s7t44vh8rt9mg"},"WalletTransactionID":{"type":"string","minLength":1,"pattern":"^wtx_[0-9a-hjkmnp-tv-z]{26}$","example":"wtx_01krdgeqcxet5s7t44vh8rt9mg"},"BillingProductSlug":{"type":"string","minLength":1,"pattern":"^[a-z][a-z0-9]*(_[a-z0-9]+)*$","description":"URL-safe identifier for a billing product. Lowercase letters and digits, separated by underscores. Must start with a letter.","example":"email_sends"},"BillingInterval":{"type":"string","minLength":1,"enum":["day","month","year"],"description":"The recurring interval one subscription charge covers.","example":"month"},"BillingPricingInterval":{"type":"object","description":"A period: a unit and a count. A day is a fixed 24-hour UTC period. A larger `count` lengthens the period without multiplying the amount quoted for it.","additionalProperties":false,"required":["unit","count"],"properties":{"unit":{"$ref":"#/components/schemas/BillingInterval","description":"The calendar unit the period is counted in."},"count":{"type":"integer","minimum":1,"maximum":366,"description":"Number of units in the period.","example":3}}},"BillingPricingModel":{"type":"string","minLength":1,"enum":["plan","metered","rate_card","unit_subscription","custom","counter"],"description":"How this product is priced.\n\n- `plan`: it comes with the organization's subscribed plan, with usage tracked\n  against that plan's included allowance.\n- `metered`: it is billed per unit beyond any included allowance.\n- `rate_card`: the per-unit price varies by attributes of the usage, such as\n  destination, instead of being flat.\n- `unit_subscription`: it is a standalone add-on billed as its own recurring\n  subscription, independent of the plan.\n- `custom`: a pricing arrangement that does not fit the other models.\n- `counter`: usage is recorded without enforcing a spending cap or blocking\n  requests.\n","example":"rate_card"},"NumberType":{"type":"string","minLength":1,"x-extensible-enum":["mobile","local","national","short_code","short_code_fteu","toll_free"],"description":"Physical type of a phone number. New number types may be added over time, so treat unrecognized values as supported types rather than errors."},"NumberCapability":{"type":"string","minLength":1,"x-extensible-enum":["sms","mms","voice"],"description":"A capability supported by a phone number. New capabilities may be added over time, so treat unrecognized values as supported capabilities rather than errors."},"NumberOwnershipStatus":{"type":"string","minLength":1,"readOnly":true,"enum":["needs_input","under_review","approval_pending","approved","not_required","rejected","unknown"],"description":"Current ownership registration approval status. Operational activation is separate:\n`blocked_at` records the ownership block on number use, and `next` describes remaining work.\n\n- `needs_input` means ownership details or a submission correction are needed, including when Bird closed a submission but accepts corrected details.\n- `under_review` means your current answers are being reviewed. Until the submission is approved, you can still change any answer; a changed answer is reviewed again.\n- `approval_pending` means your paperwork is accepted but registration approval is still pending.\n- `approved` means ownership registration is approved. Number activation can still be pending while `blocked_at` is non-null.\n- `not_required` means no active ownership requirement applies, including after a requirement is withdrawn.\n- `rejected` means the submission was closed without accepting another one, or the verifier correction deadline passed. Corrections are no longer accepted for this submission. Contact support.\n- `unknown` means current approval status could not be determined. Read `blocked_at` for any recorded ownership block; if `unavailable_at` is present, contact support, otherwise retry the read.\n"},"NumberOwnership":{"type":"object","readOnly":true,"additionalProperties":false,"required":["satisfied","status","next"],"description":"Ownership paperwork and registration approval progress for this number. Reported when ownership requirements or a recorded ownership block or decision apply. If requirements or progress cannot be read, a recorded block or decision preserves this object; without either, the object is absent. Other sending requirements can apply even when ownership is approved.\n","properties":{"submission_id":{"allOf":[{"$ref":"#/components/schemas/ComplianceSubmissionID"}],"readOnly":true,"description":"The most recent ownership submission for this number, including after approval. Users with compliance read access can view the filed answers and their review status from the number's details in the dashboard. This may be a newer filing than the one that cleared the number for use. Absent when no submission was found or submission progress could not be read."},"satisfied":{"type":"boolean","description":"Whether the ownership paperwork is accepted or is no longer required. This can remain true while an external verifier asks for a correction or activation is pending. Read `status` and `next` for the current step, and `blocked_at` for the ownership block on outbound SMS and inbound and outbound voice.\n"},"status":{"$ref":"#/components/schemas/NumberOwnershipStatus"},"blocked_at":{"type":["string","null"],"format":"date-time","description":"When ownership requirements began blocking outbound SMS and inbound and outbound voice calls. Null when that block is clear. Accepted paperwork can still await activation with a block in place. A number bought before ownership requirements were introduced can have outstanding paperwork without a block.\n"},"unavailable_at":{"type":"string","format":"date-time","description":"When the number became unavailable. It cannot be activated; contact support. Absent while the number is available."},"registration_due_at":{"type":"string","format":"date-time","description":"The deadline for completing the number's ownership details. A number with incomplete or inaccurate details can be removed sooner. Absent when no deadline is known or while `unavailable_at` is set."},"next":{"type":"array","description":"Actions that advance ownership registration or activation, in order. Empty when neither needs further action. A `wait` step means no customer action is needed now, including while accepted paperwork awaits activation. Read this list again after each change.\n","items":{"$ref":"#/components/schemas/NextAction"}}}},"NumberPricing":{"type":"object","readOnly":true,"additionalProperties":false,"description":"What your organization pays for a number it holds, net of tax.","required":["recurring_price","recurring_period","intervals_per_charge","error"],"properties":{"recurring_price":{"description":"What your organization is charged for this number per `recurring_period`, net of tax, in the currency this number is charged in: your billing currency, unless this number's subscription predates a change of your billing currency, in which case its own currency is returned. `null` when no price applies.","oneOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"recurring_period":{"description":"The rate's interval, or a fixed price's whole renewal period. `null` when `recurring_price` is `null`.","oneOf":[{"$ref":"#/components/schemas/BillingPricingInterval"},{"type":"null"}],"example":{"unit":"month","count":1}},"intervals_per_charge":{"description":"How many `recurring_period`s one renewal charges. When `releases_at` is set no renewal follows, and the value still describes the subscription's cadence until the release. `1` for a fixed price. `null` when `recurring_price` is `null`.","type":["integer","null"],"minimum":1,"example":12},"error":{"example":null,"description":"A retryable failure to read the price. Retry a GET of the number; do not repeat a completed write. `null` when the price was read or no price applies.","oneOf":[{"$ref":"#/components/schemas/ErrorBody"},{"type":"null"}]}}},"Number":{"type":"object","readOnly":true,"additionalProperties":false,"required":["id","kind","number","name","reference","country_code","number_type","capabilities","status","allocated_at","releases_at","released_at","pricing"],"properties":{"name":{"type":["string","null"],"minLength":1,"maxLength":100,"description":"The name you gave this number in your workspace. Null when no name is set."},"reference":{"type":["string","null"],"minLength":1,"maxLength":100,"description":"Your own reference for this number in your workspace. Null when no reference is set."},"id":{"allOf":[{"$ref":"#/components/schemas/AllocatedNumberID"}],"description":"Identifier of this allocated number. Pass it as `number_id` to read this number, or to cancel or release it when kind is dedicated."},"kind":{"type":"string","minLength":1,"enum":["dedicated","shared"],"description":"How this number is allocated. `dedicated` belongs to your workspace and is billed as a subscription. `shared` is provided through Bird-managed shared infrastructure and is not owned or billed as a workspace subscription."},"number":{"type":"string","minLength":1,"description":"Phone number in E.164 format."},"country_code":{"allOf":[{"$ref":"#/components/schemas/CountryCode"}]},"number_type":{"allOf":[{"$ref":"#/components/schemas/NumberType"}],"description":"Physical type of this phone number."},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/NumberCapability"},"description":"Capabilities supported by this number."},"status":{"type":"string","minLength":1,"enum":["active","pending_ownership_registration","released"],"description":"The allocation and ownership-approval status of this number.\n\n- `active` means this number is allocated to your workspace and usable.\n- `pending_ownership_registration` means this number is allocated to your workspace and billed,\n  but outbound SMS and both inbound and outbound voice calls are blocked until ownership registration\n  is approved and activation completes, or the ownership requirement is withdrawn.\n  This ownership status does not gate inbound SMS or WhatsApp.\n  Read `ownership.status` and `ownership.next` for the current decision and remaining work.\n- `released` means this number is no longer allocated to your workspace.\n\nAn allocated number is not always enough to send from it: some destination\ncountries also require an approved registration for the sender.\n"},"allocated_at":{"type":"string","format":"date-time","minLength":1,"description":"When this number was allocated to your workspace."},"releases_at":{"type":["string","null"],"format":"date-time","description":"When a scheduled release of this number takes effect, at the end of its current billing period. The number stays allocated, with its current `status`, until then. `null` when no release is scheduled."},"released_at":{"type":["string","null"],"format":"date-time","description":"When this number was released. `null` while it is still allocated to your workspace."},"ownership":{"description":"Ownership paperwork and activation progress. `null` when no ownership requirements, recorded block, or recorded decision apply, or when requirements or progress cannot be read and no ownership block or decision has been recorded. A recorded block still returns an ownership object with `status: unknown` when progress cannot be read; retry the read. We manage the paperwork for shared short codes, so this field is always `null` for them. Other sending requirements can apply even when ownership registration is complete.\n","oneOf":[{"$ref":"#/components/schemas/NumberOwnership"},{"type":"null"}]},"pricing":{"description":"What your organization pays for this number. `null` for a `shared` number, and, when the price was read, for a number with no live subscription. Otherwise its prices are `null` when no price applies. When the price could not be read, every dedicated number carries this object with `error` set, whether or not it has a live subscription.","oneOf":[{"$ref":"#/components/schemas/NumberPricing"},{"type":"null"}]}}},"NumberList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Number"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"AvailableNumberPricing":{"type":"object","readOnly":true,"additionalProperties":false,"description":"What your organization pays for an available number, net of tax, in your billing currency.","required":["setup_price","recurring_price","recurring_period","intervals_per_charge"],"properties":{"setup_price":{"description":"One-off setup fee for your organization, net of tax, in your billing currency. Its `amount` is `\"0\"` when the published fee is zero. `null` when no setup fee applies to this country and number type, and whenever `recurring_price` is `null`.","oneOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"recurring_price":{"description":"What your organization is charged for this number per `recurring_period`, net of tax, in your billing currency, after your agreed prices are applied. `null` when the number cannot be priced for your organization, because its recurring price or a required setup fee has no price; it cannot be ordered then.","oneOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"recurring_period":{"description":"The period `recurring_price` covers. `null` when `recurring_price` is `null`.","oneOf":[{"$ref":"#/components/schemas/BillingPricingInterval"},{"type":"null"}],"example":{"unit":"month","count":1}},"intervals_per_charge":{"description":"How many `recurring_period`s one charge bills at once. Your organization is charged `recurring_price` multiplied by this at purchase and at each renewal. `null` when `recurring_price` is `null`.","type":["integer","null"],"minimum":1,"example":12}}},"AvailableNumber":{"type":"object","readOnly":true,"additionalProperties":false,"required":["number","country_code","number_type","capabilities","ownership_registration_required"],"properties":{"number":{"type":"string","minLength":1,"description":"Phone number in E.164 format."},"country_code":{"$ref":"#/components/schemas/CountryCode"},"number_type":{"allOf":[{"$ref":"#/components/schemas/NumberType"}],"description":"Physical type of this phone number."},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/NumberCapability"},"description":"Capabilities supported by this number."},"ownership_registration_required":{"type":"boolean","description":"Whether ownership paperwork must be approved before outbound SMS and voice use. Customer availability accounts for organization exemptions; admin supplier searches report the general country and number-type requirement. You can acquire the number, including Bird stock, and submit paperwork afterward. Any `pricing.setup_price` is charged at assignment for Bird stock and usually on delivery for a carrier number, plus any tax. The recurring charge, net of tax `pricing.recurring_price` multiplied by `pricing.intervals_per_charge`, is taken with any tax at assignment and at each renewal, even while approval is pending; assignment may follow completion of a pending supplier order."},"ownership_address_scope":{"type":"string","x-extensible-enum":["anywhere","country","number_area"],"description":"Where the carrier requires the business address on this number's ownership registration\nto be. Present only when the carrier itself registers the number before it carries\ntraffic, as `anywhere` when it restricts no address; omitted otherwise. An address that does not meet the rule\nis refused after purchase, and only an address that meets it can fix the registration.\nIf the paperwork is not approved by the registration deadline, the number is removed:\nany setup fee is credited back, and the first recurring charge is not refunded.\n\n- `anywhere`: any business address.\n- `country`: a business address in the number's country.\n- `number_area`: a business address inside the number's own area code, for example in\n  Amsterdam for an Amsterdam (020) number. `ownership_address_area_name` names the area\n  when it is known.\n"},"ownership_address_area_name":{"type":"string","minLength":1,"description":"Name of the area this local number belongs to, for example `Amsterdam`: the area a `number_area` `ownership_address_scope` refers to. Text for display; the address is not checked against it before purchase. Omitted when the number has no `number_area` rule or the area is not known."},"pricing":{"description":"What your organization pays for this number. Omitted on admin supplier searches, which have no organization to price for.","allOf":[{"$ref":"#/components/schemas/AvailableNumberPricing"}]}}},"AvailableNumberList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AvailableNumber"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"NumbersOrderStatus":{"type":"string","minLength":1,"x-extensible-enum":["charging","ordering","pending","completed","failed"],"description":"Lifecycle state of a number purchase order:\n\n- `charging`: Securing funds.\n- `ordering`: Placing the order with the carrier.\n- `pending`: The carrier accepted the order and is provisioning the number. A carrier number\n  is usually charged on delivery: keep funds available, because a delivered number that still cannot\n  be charged is released no sooner than 72 hours after the order was placed, and its order fails.\n- `completed`: Your workspace owns the number.\n- `failed`: The purchase did not complete.\n\nA number from a carrier is usually charged when the carrier delivers it. A setup fee\nalready charged, for an inventory number or a carrier number charged upfront, is not\nrefunded when its purchase fails, unless the deadline releases the delivered number.\nContact support about a failed order."},"NumbersOrderID":{"type":"string","minLength":1,"pattern":"^nor_[0-9a-hjkmnp-tv-z]{26}$","example":"nor_01krdgeqcxet5s7t44vh8rt9mg"},"NumbersOrder":{"type":"object","additionalProperties":false,"required":["id","number","country_code","number_type","status","created_at","updated_at"],"properties":{"id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/NumbersOrderID"}],"description":"Identifier of this number order."},"number":{"readOnly":true,"description":"The number being acquired, in E.164 format.","type":"string","minLength":1},"country_code":{"allOf":[{"$ref":"#/components/schemas/CountryCode"}],"readOnly":true},"number_type":{"allOf":[{"$ref":"#/components/schemas/NumberType"}],"readOnly":true,"description":"Physical type of the number being acquired."},"status":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/NumbersOrderStatus"}]},"number_id":{"readOnly":true,"description":"Identifier of the workspace allocation associated with this completed order. Multiple orders can refer to the same allocation. This historical association remains after release; `GET /v1/numbers/{number_id}` returns its current holding state and can return not found after release. `null` until the order completes.\n","oneOf":[{"$ref":"#/components/schemas/NumbersDedicatedAllocationID"},{"type":"null"}]},"failure_reason":{"type":["string","null"],"readOnly":true,"description":"Human-readable reason the purchase failed. `null` unless status is failed. An order can fail some time after it was created, so `updated_at` tells you when the failure was recorded rather than when the order was placed.\n"},"completed_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When this order completed (status completed). Completion records the associated allocation and does not establish its current holding state. `null` for orders still in progress or failed.\n"},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true},"updated_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true}}},"NumbersOrderList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NumbersOrder"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"NumbersOrderCompliance":{"type":"object","additionalProperties":false,"required":["answers"],"description":"Ownership paperwork for a number being ordered, where its country requires any. Optional always: the order completes and the number is yours either way, and supplying this only decides whether it can carry traffic sooner. Read `GET /v1/compliance/requirements` for the number to learn what is asked for, or file it after the order with `POST /v1/compliance/submissions`. Filing this cannot fail your order: if it is refused, the number is still yours and you can file again. The answers are a legal representation filed under the name of the business they describe. Sending this block uses the order's existing `numbers` scope at write level.\n","properties":{"answers":{"type":"array","minItems":1,"description":"Every answer at once, in the same shape `POST /v1/compliance/submissions` takes. There is no draft to fill in over several calls, so send a complete set.\n","example":[{"key":"business_registration_number","value":"90012768"}],"items":{"$ref":"#/components/schemas/ComplianceAnswer"}},"identity_id":{"allOf":[{"$ref":"#/components/schemas/ComplianceIdentityID"}],"description":"An existing party this number is held for. It fills in the business details you left out from what that party already holds, and each single-value answer you file about the party is written back onto it for next time, whatever the verdict. Documents and multi-value answers are asked fresh each time. An id belonging to another organization is rejected."}}},"NumbersOrderCreate":{"type":"object","additionalProperties":false,"properties":{"number":{"type":"string","minLength":1,"description":"The number to acquire, in E.164 format, as returned by `GET /v1/numbers/available`.","example":"+18005550100"},"reference":{"type":"string","minLength":1,"maxLength":100,"description":"Your own reference to set on the number when this purchase completes. Leading and trailing whitespace is removed. A pending order keeps the reference until the number is allocated.","example":"STORE-042"},"compliance":{"$ref":"#/components/schemas/NumbersOrderCompliance"}},"required":["number"]},"NumberUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":["string","null"],"minLength":1,"maxLength":100,"description":"A name for this number in your workspace, such as Support line. Send null to clear it, or omit it to keep the current name.","example":"Support line"},"reference":{"type":["string","null"],"minLength":1,"maxLength":100,"description":"Your own reference for this number, such as an identifier from your records. References need not be unique. Send null to clear it, or omit it to keep the current reference.","example":"STORE-042"}}},"AutomationPortKey":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$","description":"Stable named input or output declared by a node-type version.","example":"success"},"BillingResolvedPrice":{"type":"object","additionalProperties":false,"required":["is_priced","unit_price","tax_rate","tax_amount","gross_price","billing_unit_size","dimensions","name","pricing_model","included"],"properties":{"is_priced":{"type":"boolean","description":"Whether a published price matched. True includes an explicitly published zero price. False means no price matched and the zero amounts are placeholders, not a quote.","example":true},"unit_price":{"$ref":"#/components/schemas/Money","description":"The net unit price, before tax."},"tax_rate":{"type":"string","minLength":1,"description":"The tax rate applied to this price for your organization, as a decimal (for example `0.21` for 21%). `0` if your organization is tax-exempt or no tax applies.","example":"0.21"},"tax_amount":{"$ref":"#/components/schemas/Money","description":"The tax charged on one unit, computed from `unit_price` and `tax_rate`."},"gross_price":{"$ref":"#/components/schemas/Money","description":"The total your organization is charged per unit, that is, `unit_price` plus `tax_amount`."},"billing_unit_size":{"type":"integer","format":"int64","minimum":1,"description":"Number of units that form one chargeable block. Overage usage is ceiling-rounded to the nearest multiple of this value before the unit price is applied. A value of 1 charges per individual unit.","example":1000},"increment":{"type":["string","null"],"description":"The billing rounding window for time-based products, expressed as `{initial_seconds}/{continuation_seconds}`. For example, `60/60` means each unit covers 60 seconds. `null` for per-unit products.","example":"60/60"},"dimensions":{"type":"object","additionalProperties":{"type":"string"},"description":"Pricing dimensions that determined this price (for example, `country_code`, `sender_type`).","example":{"country_code":"US"}},"name":{"type":"string","minLength":1,"description":"Display name of the product this price was resolved for.","example":"10DLC Brand Registration"},"external_description":{"readOnly":true,"type":["string","null"],"description":"Customer-facing description of the product this price was resolved for, when set."},"pricing_model":{"$ref":"#/components/schemas/BillingPricingModel"},"included":{"type":"boolean","description":"Whether your organization's next unit of this `unit_subscription` product, with the requested `dimensions`, is free because a plan includes it. It reflects the organization's current active entitlements, whatever `plan_id` is requested, so it does not describe a candidate plan. A unit with dimensions that no included pattern matches is not free. `unit_price` and `gross_price` stay the published price a unit pays beyond the included units. Always `false` for other pricing models.","example":false},"billing_interval":{"deprecated":true,"$ref":"#/components/schemas/BillingInterval","readOnly":true,"description":"Compatibility alias for `pricing_interval.unit`. Only present when `pricing_model` is `unit_subscription`, or `plan` with configured recurring terms. Omitted for other pricing models and plans without configured terms."},"billing_interval_count":{"deprecated":true,"type":"integer","minimum":1,"readOnly":true,"description":"Compatibility alias for `intervals_per_charge`. Only present when `pricing_model` is `unit_subscription`, or `plan` with configured recurring terms. Omitted for other pricing models and plans without configured terms.","example":1},"pricing_interval":{"$ref":"#/components/schemas/BillingPricingInterval","description":"Period covered by the resolved recurring rate. Present for `unit_subscription` products and plans with configured recurring terms. Omitted for other pricing models and plans without configured terms."},"intervals_per_charge":{"type":"integer","minimum":1,"description":"Number of complete pricing intervals bought by each recurring charge. Renewal duration is `pricing_interval.count` multiplied by this value. Present alongside `pricing_interval` for `unit_subscription` products and plans with configured recurring terms; omitted otherwise.","example":1}}},"BillingWalletCollectionStatus":{"type":"string","minLength":1,"description":"Automatic collection state:\n- `none`: No retained collection run.\n- `in_progress`: Collection is active, though payment may still require customer action.\n- `exhausted`: Automatic retries have stopped and customer action is needed.","enum":["none","in_progress","exhausted"]},"BillingWallet":{"type":"object","readOnly":true,"additionalProperties":false,"required":["id","currency_code","balance","settled_balance","renewal_reserved","renewal_required","collection_status","collection_renewal","collection_required","collection_usage_buffer","collection_deficit","credit_limit","provisional","created_at","updated_at"],"properties":{"id":{"$ref":"#/components/schemas/WalletID"},"currency_code":{"$ref":"#/components/schemas/CurrencyCode","description":"ISO 4217 currency code.","example":"USD"},"balance":{"type":"string","minLength":1,"description":"Balance you can spend, in currency units. Usage is charged as it happens, so this drops within seconds of sending and can be lower than the balance the wallet transactions add up to, which only reflects charges that have settled. Funds held for upcoming renewals are also excluded. Credit headroom is reported separately in `credit_limit`, and postpaid accounts can keep spending past a zero balance up to that limit.","example":"118.00"},"settled_balance":{"type":"string","minLength":1,"description":"Settled wallet balance in currency units, before active reservations are deducted.","example":"150.00"},"renewal_reserved":{"type":"string","minLength":1,"description":"Amount currently held for prepared subscription renewals and scheduled plan changes, in currency units.","example":"25.00"},"renewal_required":{"type":"string","minLength":1,"description":"Total amount required for prepared subscription renewals and scheduled plan changes, including tax, in currency units.","example":"30.00"},"collection_status":{"$ref":"#/components/schemas/BillingWalletCollectionStatus"},"collection_renewal":{"type":"string","minLength":1,"description":"Part of collection_required needed for unfunded renewal fees, in exact currency units.","example":"30.004"},"collection_required":{"type":"string","minLength":1,"description":"Total wallet funding still required by the current automatic collection run, in exact currency units.","example":"42.00"},"collection_usage_buffer":{"type":"string","minLength":1,"description":"Part of collection_required needed for the configured auto-topup amount, in currency units.","example":"10.00"},"collection_deficit":{"type":"string","minLength":1,"description":"Part of collection_required needed to cover the wallet shortfall after reservations and approved credit, in currency units.","example":"2.00"},"credit_limit":{"type":"string","minLength":1,"description":"Credit limit in currency units. `0.00` for prepaid wallets.","example":"0.00"},"provisional":{"type":"boolean","description":"When `true`, the wallet currency has not yet been committed and can be changed once. When `false`, the currency is permanent."},"created_at":{"type":"string","minLength":1,"format":"date-time"},"updated_at":{"type":"string","minLength":1,"format":"date-time"}}},"BillingWalletList":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BillingWallet"}}}},"VoiceTrunkSortField":{"type":"string","enum":["created_at"],"default":"created_at","description":"Field used to sort the list."},"SIPTrunkACLID":{"type":"string","minLength":1,"pattern":"^sta_[0-9a-hjkmnp-tv-z]{26}$","example":"sta_01krdgeqcxet5s7t44vh8rt9mg"},"VoiceTrunkIPACL":{"type":"object","additionalProperties":false,"required":["id","trunk_id","cidr","created_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/SIPTrunkACLID","description":"Unique identifier for this IP ACL entry."},"trunk_id":{"readOnly":true,"$ref":"#/components/schemas/SIPTrunkID"},"cidr":{"type":"string","minLength":7,"readOnly":true,"description":"IPv4 or IPv6 CIDR block that is allowed to send SIP traffic to this trunk.","example":"203.0.113.0/24"},"description":{"type":["string","null"],"minLength":1,"description":"Optional human-readable label for this ACL entry.","example":"Office network"},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true}}},"VoiceSIPDigestAlgorithm":{"type":"string","enum":["SHA-256","MD5"],"description":"A hash algorithm for SIP Digest authentication, spelled as it appears in the `algorithm=` parameter on the wire. `SHA-256` is the stronger option and is offered first; `MD5` is the algorithm most PBX and ITSP equipment implements.\n","example":"SHA-256"},"VoiceTrunkCore":{"type":"object","description":"A SIP trunk's identity and access-control settings.","required":["id","workspace_id","name","domain","sip_trunking_enabled","did_delivery_enabled","workspace_users_enabled","outbound_enabled","inbound_enabled","media_bypass","ip_acls","allowed_api_key_ids","ineligible_api_key_ids","digest_algorithms","session_credentials_enabled"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/SIPTrunkID","description":"Unique identifier for this SIP trunk."},"workspace_id":{"readOnly":true,"$ref":"#/components/schemas/WorkspaceID"},"name":{"type":"string","minLength":1,"description":"A human-readable label for this SIP trunk. Mutable, and distinct from the generated wire domain.","example":"Production PBX trunk"},"domain":{"type":"string","minLength":1,"readOnly":true,"description":"Full SIP address for this trunk, generated as `{trunk-id}.trunk.{region}.sip.bird.com`. This is the trunk's identity, so configure your PBX or SIP client to send calls to this address. It is derived from the trunk id and cannot be chosen or changed.\n","example":"01kxp5bb9qf878642atrf0xy5r.trunk.eu1.sip.bird.com"},"sip_trunking_enabled":{"type":"boolean","readOnly":true,"description":"Whether your PBX may place calls through this trunk, admitted by `ip_acls` or `allowed_api_key_ids`. Off on a new trunk. While it is off, the allow lists admit no call. Set `sip_trunking_enabled` when you create the trunk or through the trunk update operation.\n"},"did_delivery_enabled":{"type":"boolean","readOnly":true,"description":"Whether this trunk may receive calls: we dial the addresses you declared, for the numbers this trunk answers. Off on a new trunk. Turning it off resets number routes that use this trunk to reject incoming calls. Turning it back on does not restore those routes. Set `did_delivery_enabled` when you create the trunk or through the trunk update operation.\n"},"workspace_users_enabled":{"type":"boolean","readOnly":true,"description":"Whether people in this workspace may place calls through this trunk with a session credential, from the dashboard phone, the CLI or MCP. Off on a new trunk. It grants nothing on its own: a call still has to present a credential issued to this workspace, and each one expires within minutes. Set `workspace_users_enabled` when you create the trunk or through the trunk update operation.\n"},"outbound_enabled":{"type":"boolean","readOnly":true,"deprecated":true,"description":"Deprecated: read `sip_trunking_enabled` and `workspace_users_enabled` instead. `true` while any caller may place calls through this trunk.\n"},"inbound_enabled":{"type":"boolean","readOnly":true,"deprecated":true,"description":"Deprecated: read `did_delivery_enabled`, which has the same value."},"media_bypass":{"type":"boolean","readOnly":true,"description":"Whether we take ourselves out of the audio path for calls we forward to this trunk: your equipment and the originating carrier exchange audio directly, and only the call signalling passes through us. Off by default. It applies to inbound calls alone (calls this trunk places are always carried through us, whatever this says). While it is on we cannot record those calls, report their audio quality, or end one because its audio stopped. Your equipment must be reachable for audio from the public internet. Set `media_bypass` through the trunk update operation.\n"},"ip_acls":{"type":"array","readOnly":true,"description":"The trunk's IP allow list. IP filtering is active whenever this has at least one entry: calls admitted through the allow lists must come from those CIDR ranges. This restriction does not apply to session credentials when `workspace_users_enabled` is true. An empty list means no IP restriction. Replace the whole `ip_acls` list through the trunk update operation.\n","items":{"$ref":"#/components/schemas/VoiceTrunkIPACL"}},"allowed_api_key_ids":{"type":"array","readOnly":true,"description":"The API keys allowed to authenticate this trunk over SIP Digest. A key must hold `voice` at write level and be neither revoked nor expired to authenticate. `ineligible_api_key_ids` names the entries that currently cannot. A nonempty list enables API-key authentication, limited to its eligible keys. An empty list means no API-key authentication. A trunk with empty `ip_acls` and `allowed_api_key_ids` lists accepts no call from your PBX. Replace the whole `allowed_api_key_ids` list through the trunk update operation.\n","items":{"$ref":"#/components/schemas/APIKeyID"}},"ineligible_api_key_ids":{"type":"array","readOnly":true,"description":"The entries in `allowed_api_key_ids` that cannot authenticate this trunk right now because the key lacks `voice` at write level, has expired, or was revoked. The bindings remain until you remove them from the trunk. Restoring `voice` at write level makes a key eligible again if it is still unexpired and unrevoked, without changing its secret or trunk binding. Empty when every allowed key can authenticate.\n","items":{"$ref":"#/components/schemas/APIKeyID"}},"digest_algorithms":{"type":"array","readOnly":true,"minItems":1,"description":"The Digest hash algorithms this trunk offers, in the order they are offered. We send one challenge line per algorithm and your PBX answers with the first it supports, so the order decides what most equipment picks. Always populated: a trunk with no explicit setting reports the default, `[\"SHA-256\", \"MD5\"]`. The list governs clients that authenticate with an API key: their answer with an algorithm that is not on it is rejected, so narrowing the list also narrows what the trunk accepts from them. Session credentials, which the dashboard phone uses and `POST /v1/voice/session-credentials` creates, are the exception: with `workspace_users_enabled`, the challenge always ends with an MD5 line, after the list in its own order, and a valid session credential is accepted with MD5 or SHA-256. An API-key answer with that extra MD5 is still rejected. Replace `digest_algorithms` through the trunk update operation.\n","items":{"$ref":"#/components/schemas/VoiceSIPDigestAlgorithm"},"example":["SHA-256","MD5"]},"session_credentials_enabled":{"type":"boolean","readOnly":true,"deprecated":true,"description":"Deprecated: read `workspace_users_enabled`, which has the same value."}}},"VoiceTrunkMediaEncryption":{"type":"string","minLength":1,"enum":["off","preferred","required"],"description":"Controls SRTP encryption between your equipment and Bird. SRTP keys use SDES\n(`a=crypto`) over TLS signalling. Audio between Bird and the carrier uses\nplain RTP.\n\nWith `preferred`, a call you place is encrypted when your equipment offers\n`RTP/SAVP` or `RTP/SAVPF` with an `AES_CM_128_HMAC_SHA1_80` or `_32` key over\nTLS. A plain RTP offer stays plain. Calls delivered to a TLS gateway (`sips:`\nor `;transport=tls`) use encryption when available. Calls delivered through a\ngateway without TLS or with `media_bypass` use plain audio.\n\nWith `required`, a plain call is refused with `488 Not Acceptable Here`.\nDelivered calls require encrypted media, so your gateways must use TLS.\nYou cannot combine `required` with `media_bypass` because bypassed audio\ndoes not pass through the relay that encrypts it.\n\nWith `preferred` or `required`, an SDES offer over plain SIP (UDP or TCP), an\noffer without a usable key, and DTLS-SRTP are refused with `488` and a\n`Warning` header naming the reason.\n\nWith `off`, Bird does not encrypt audio and relays an SRTP offer unchanged.\nBrowser calls use DTLS-SRTP regardless of this setting.\n","example":"preferred"},"VoiceTrunkMediaSite":{"type":"string","minLength":1,"enum":["ap1","eu1","us1"],"description":"A Bird media site."},"VoiceTrunkMedia":{"type":"object","additionalProperties":false,"required":["encryption","sites"],"description":"How the trunk carries call audio. Set it through the trunk update operation.","properties":{"encryption":{"$ref":"#/components/schemas/VoiceTrunkMediaEncryption"},"sites":{"type":"array","minItems":1,"uniqueItems":true,"example":["ap1","eu1","us1"],"items":{"$ref":"#/components/schemas/VoiceTrunkMediaSite"},"description":"The sites the trunk-facing leg may use for call audio. The trunk's home site is always included. Carrier availability can further limit those sites; a separate carrier-facing leg may use another site. A trunk whose media sites aren't set reports its home site; until they're saved, Bird may also anchor audio at an exit gateway's or a bridged call's site.\n"}}},"VoiceTrunk":{"allOf":[{"$ref":"#/components/schemas/VoiceTrunkCore"},{"type":"object","required":["media"],"properties":{"media":{"readOnly":true,"$ref":"#/components/schemas/VoiceTrunkMedia"}}},{"$ref":"#/components/schemas/Timestamps"}]},"VoiceTrunkList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VoiceTrunk"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"VoiceTrunkMediaCreate":{"type":"object","additionalProperties":false,"description":"How the new trunk carries call audio. An omitted member takes its default.","properties":{"encryption":{"allOf":[{"$ref":"#/components/schemas/VoiceTrunkMediaEncryption"}],"default":"preferred","description":"Omit it for `preferred`, which encrypts whenever your equipment and gateways allow and otherwise carries calls as before.\n"},"sites":{"type":"array","minItems":1,"uniqueItems":true,"example":["ap1","eu1","us1"],"items":{"$ref":"#/components/schemas/VoiceTrunkMediaSite"},"description":"The sites this trunk may use for call audio, including its home site. Omit this field to allow every media site.\n"}}},"VoiceTrunkCreate":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"description":"A human-readable label for this SIP trunk. Mutable, and distinct from the generated wire domain.","example":"Production PBX trunk"},"sip_trunking_enabled":{"type":"boolean","default":false,"description":"Whether your PBX may place calls through the new trunk. Omit it to create a trunk that carries no calls yet, and turn on what you need once you know what the trunk is for.\n","example":true},"did_delivery_enabled":{"type":"boolean","default":false,"description":"Whether the new trunk may receive calls. A trunk receives no calls until it also has at least one gateway and at least one number, both added after create.\n","example":true},"workspace_users_enabled":{"type":"boolean","default":false,"description":"Whether people in this workspace may place calls through the new trunk with a session credential, from the dashboard phone, the CLI or MCP. Omit it for a trunk reached only by a PBX.\n","example":true},"outbound_enabled":{"type":"boolean","deprecated":true,"description":"Deprecated: use `sip_trunking_enabled`. `true` turns on `sip_trunking_enabled`; a request that also sends `sip_trunking_enabled: false` is rejected.\n"},"inbound_enabled":{"type":"boolean","deprecated":true,"description":"Deprecated: use `did_delivery_enabled`. A request that sends both with different values is rejected.\n"},"media_bypass":{"type":"boolean","default":false,"description":"Whether we take ourselves out of the audio path for calls we forward to this trunk. Omit it to create the trunk with this off, which is what suits equipment behind NAT and any account that wants call recording. It is an inbound setting, so `true` is accepted only alongside `did_delivery_enabled: true`; `false` is always accepted. It can be changed later.\n","example":true},"media":{"$ref":"#/components/schemas/VoiceTrunkMediaCreate"},"digest_algorithms":{"type":"array","minItems":1,"description":"The Digest hash algorithms to offer, in the order they should be offered. Omit this to use the default of `[\"SHA-256\", \"MD5\"]`, which suits most equipment. Send `[\"MD5\"]` for a PBX that only implements MD5 and rejects or ignores a challenge offering SHA-256 first. This governs clients that authenticate with an API key. Session credentials, including the dashboard phone's, are always offered MD5 as well and accepted with MD5 or SHA-256. It applies to calls the trunk places, so send it alongside `sip_trunking_enabled` or `workspace_users_enabled` set to `true`. This can be changed later without re-issuing credentials.\n","items":{"$ref":"#/components/schemas/VoiceSIPDigestAlgorithm"},"example":["MD5"]},"session_credentials_enabled":{"type":"boolean","deprecated":true,"description":"Deprecated: use `workspace_users_enabled`. A request that sends both with different values is rejected.\n"}}},"VoiceTrunkMediaUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"description":"A change to how the trunk carries call audio.","properties":{"encryption":{"$ref":"#/components/schemas/VoiceTrunkMediaEncryption"},"sites":{"type":"array","minItems":1,"uniqueItems":true,"example":["ap1","eu1","us1"],"items":{"$ref":"#/components/schemas/VoiceTrunkMediaSite"},"description":"Replace the permitted media sites. The list must include the trunk's home site. Omit this field to keep the current sites.\n"}}},"VoiceTrunkIPACLCreate":{"type":"object","additionalProperties":false,"required":["cidr"],"properties":{"cidr":{"type":"string","minLength":7,"description":"IPv4 or IPv6 CIDR block to allow. Use /32 for a single IPv4 address or /128 for a single IPv6 address.","example":"203.0.113.0/24"},"description":{"type":"string","minLength":1,"description":"Optional human-readable label for this ACL entry.","example":"Office network"}}},"VoiceTrunkUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"description":"A change to the trunk's caller switches, name, access control, and Digest\nalgorithm offer. Every field is optional. An omitted field is left unchanged. The\n`ip_acls`, `allowed_api_key_ids`, and `digest_algorithms` fields each replace\ntheir whole list when present. Send an empty array to clear one. This lets you\ncommit the trunk's entire access configuration in one update.\n\nThe access control and Digest settings need a switch that places calls, and\n`media_bypass` needs `did_delivery_enabled`. One update can do both: turn the\nswitch on and send its configuration together.\n","properties":{"name":{"type":"string","minLength":1,"description":"A human-readable label for this SIP trunk. Mutable, and distinct from the generated wire domain.","example":"Production PBX trunk"},"sip_trunking_enabled":{"type":"boolean","description":"Whether your PBX may place calls through this trunk. Turning it off stops the allow lists admitting calls at the next call setup and leaves them stored, so turning it back on restores a working trunk. Omit the field to leave it unchanged.\n","example":true},"did_delivery_enabled":{"type":"boolean","description":"Whether this trunk may receive calls. Turning it off resets number routes that use this trunk to reject incoming calls. Turning it back on does not restore those routes. Clear an attached emergency number in the dashboard before turning it off. The gateways remain configured. Omit the field to leave it unchanged.\n","example":true},"workspace_users_enabled":{"type":"boolean","description":"Whether people in this workspace may place calls through this trunk with a session credential, from the dashboard phone, the CLI or MCP. Turning it off stops those calls at the next call setup without re-issuing anything. Omit the field to leave it unchanged.\n","example":true},"outbound_enabled":{"type":"boolean","deprecated":true,"description":"Deprecated: use `sip_trunking_enabled` and `workspace_users_enabled`. `true` turns on `sip_trunking_enabled`. `false` stops every caller placing calls through this trunk. A request that also turns one of those switches the other way is rejected.\n"},"inbound_enabled":{"type":"boolean","deprecated":true,"description":"Deprecated: use `did_delivery_enabled`. A request that sends both with different values is rejected.\n"},"media_bypass":{"type":"boolean","description":"Whether we take ourselves out of the audio path for calls we forward to this trunk. Turning it on takes effect at the next call setup and leaves calls already up untouched. It is an inbound setting, so the trunk must have `did_delivery_enabled` on; one update can do both. While it is on we cannot record those calls, report their audio quality, or end one because its audio stopped, and your equipment must be reachable for audio from the public internet. Turning it off puts us back in the path at the next call setup. Omit the field to leave it unchanged.\n","example":true},"media":{"$ref":"#/components/schemas/VoiceTrunkMediaUpdate"},"ip_acls":{"type":"array","description":"Replaces the trunk's entire IP allow list. When present, the allow list is set to exactly these CIDR blocks: ranges not listed are removed and new ones are added. Send an empty array to clear the list, turning IP filtering off. Omit the field to leave the allow list unchanged.\n","items":{"$ref":"#/components/schemas/VoiceTrunkIPACLCreate"}},"allowed_api_key_ids":{"type":"array","description":"Replaces the trunk's entire set of allowed API keys. When present, exactly these keys may authenticate the trunk over SIP Digest. Each key you ADD must belong to this workspace and hold `voice` at write level; a key that does not is refused and the whole update is rolled back. A key already on the list that has since lost the permission or expired does not block the update, so you can keep editing the trunk while you put its permission back. A non-empty list turns API-key authentication on; send an empty array to turn it off. Omit the field to leave the allowed keys unchanged.\n","items":{"$ref":"#/components/schemas/APIKeyID"}},"digest_algorithms":{"type":"array","description":"Replaces the Digest hash algorithms this trunk offers, in the order they should be offered. Send `[\"MD5\"]` for a PBX that only implements MD5 and rejects or ignores a challenge offering SHA-256 first. Send an empty array to return to the default of `[\"SHA-256\", \"MD5\"]`. The offer is never empty, because a trunk that offered nothing could not be authenticated at all. The list governs clients that authenticate with an API key, and narrowing it also narrows what the trunk accepts from them: an answer using an algorithm no longer offered is rejected. Session credentials, including the dashboard phone's, are always offered MD5 as well and accepted with MD5 or SHA-256. Takes effect on the next call setup; no credential is re-issued. Omit the field to leave the offer unchanged.\n","items":{"$ref":"#/components/schemas/VoiceSIPDigestAlgorithm"},"example":["MD5"]},"session_credentials_enabled":{"type":"boolean","deprecated":true,"description":"Deprecated: use `workspace_users_enabled`. A request that sends both with different values is rejected.\n"}}},"VoiceTrunkGatewayID":{"type":"string","minLength":1,"pattern":"^vtg_[0-9a-hjkmnp-tv-z]{26}$","example":"vtg_01krdgeqcxet5s7t44vh8rt9mg"},"VoiceTrunkGateway":{"description":"One address an inbound call to this trunk is forwarded to, and how that peer wants the call's two numbers spelled. A trunk can have several, and its **All gateways (automatic)** hunt group tries them in priority order until one answers.\n","allOf":[{"type":"object","required":["id","trunk_id","sip_uri","priority","origination_format","destination_format"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/VoiceTrunkGatewayID","description":"Unique identifier for this gateway."},"trunk_id":{"readOnly":true,"$ref":"#/components/schemas/SIPTrunkID"},"sip_uri":{"type":"string","minLength":1,"maxLength":512,"description":"SIP URI an inbound call to this trunk is forwarded to. The host only: which number is dialed at that host comes from `destination_format`, because it changes with every call.\n","example":"sip:pbx.example.com:5060"},"priority":{"type":"integer","minimum":0,"description":"The gateway's place in the trunk's **All gateways (automatic)** hunt group, which tries the lowest priority first. Gateways sharing a priority take an equal share of calls, and any of them may be tried first on a given call. Hunt groups you build in the trunk's inbound routing in the dashboard set their own order.\n","example":0},"origination_format":{"type":"string","minLength":1,"maxLength":64,"description":"How the calling number is spelled to this gateway, as a template whose\n`{number}` stands for the number without its leading `+`. It is stated\nin the `P-Asserted-Identity` header of the delivered call.\n\nA gateway that has not asked for anything else reports `+{number}`,\nwhich is E.164. A format with no `{number}` states that same identity on\nevery call, whoever called.\n","example":"+{number}"},"destination_format":{"type":"string","minLength":1,"maxLength":64,"description":"How this gateway formats the dialed number. In the template,\n`{number}` represents the number without its leading `+`. The result\nis placed before the `sip_uri` host. For example, `1234#{number}`\nformats `+31201234567` as\n`sip:1234#31201234567@pbx.example.com:5060`.\n\nA gateway that has not asked for anything else reports `+{number}`,\nwhich is E.164. A format with no `{number}` is dialed as it stands, so\nevery number the trunk answers reaches that one number.\n","example":"+{number}"}}},{"$ref":"#/components/schemas/Timestamps"}]},"VoiceTrunkGatewayList":{"type":"object","additionalProperties":false,"required":["data"],"description":"The trunk's gateways. Not paginated: a trunk holds a small, hand-managed set of dial targets, and the order across the whole set is what decides hunt order, so a partial page would misrepresent it.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VoiceTrunkGateway"},"description":"The trunk's gateways, in priority order."}}},"VoiceTrunkGatewayCreate":{"type":"object","additionalProperties":false,"required":["sip_uri","priority"],"properties":{"sip_uri":{"type":"string","minLength":1,"maxLength":512,"description":"SIP URI an inbound call to this trunk should be forwarded to. Give the host only, with an optional port: which number is dialed there comes from `destination_format`, so a URI carrying a user part is rejected.\n","example":"sip:pbx.example.com:5060"},"priority":{"type":"integer","minimum":0,"maximum":2147483647,"description":"The gateway's place in the trunk's **All gateways (automatic)** hunt group, which tries the lowest priority first. Give two gateways the same priority to share calls between them evenly. Hunt groups you build in the trunk's inbound routing in the dashboard set their own order.\n","example":0},"origination_format":{"type":"string","maxLength":64,"description":"How this gateway wants the calling number spelled. Write a template whose\n`{number}` stands for the number without its leading `+`; the result is\nstated in the `P-Asserted-Identity` header of the delivered call.\n\nOmit it for E.164, which is `+{number}`. The template may add digits,\nletters and the characters `-_.!~*'()&=+$,;?/%#` around `{number}`, which\nmay appear at most once, and anything else in braces is rejected so a\nmisspelled placeholder cannot reach a call.\n\nA format with no `{number}` at all states the same identity on every call,\nwhich is what a peer that only accepts one authorized number wants. The\ncall then carries nothing about who really called.\n","example":"+{number}"},"destination_format":{"type":"string","maxLength":64,"description":"How this gateway formats the dialed number. In the template, `{number}`\nrepresents the number without its leading `+`. The result is placed before\nthe `sip_uri` host. For example, `1234#{number}` formats `+31201234567` as\n`sip:1234#31201234567@pbx.example.com:5060`.\n\nOmit it for E.164, which is `+{number}`. A format with no `{number}` at all\nsends every number this trunk answers to one fixed number, so\n`777000447973` reaches `sip:777000447973@pbx.example.com:5060` whatever was\ndialed. The same rules as `origination_format` apply to what the template\nmay contain.\n","example":"1234#{number}"}}},"VoiceTrunkGatewayUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"description":"A change to the gateway's address, its place in the order, or how it wants numbers spelled. Every field is optional; an omitted field is left unchanged.\n","properties":{"sip_uri":{"type":"string","minLength":1,"maxLength":512,"description":"SIP URI an inbound call to this trunk should be forwarded to. Give the host only, with an optional port: which number is dialed there comes from `destination_format`, so a URI carrying a user part is rejected.\n","example":"sip:pbx.example.com:5060"},"priority":{"type":"integer","minimum":0,"maximum":2147483647,"description":"The gateway's place in the trunk's **All gateways (automatic)** hunt group, which tries the lowest priority first. Give two gateways the same priority to share calls between them evenly. Hunt groups you build in the trunk's inbound routing in the dashboard set their own order.\n","example":0},"origination_format":{"type":"string","maxLength":64,"description":"How this gateway wants the calling number spelled, as a template whose\n`{number}` stands for the number without its leading `+`. The result is\nstated in the `P-Asserted-Identity` header of the delivered call.\n\nSend an empty string to go back to E.164, which is `+{number}`. The template\nmay add digits, letters and the characters `-_.!~*'()&=+$,;?/%#` around\n`{number}`, which may appear at most once, and anything else in braces is\nrejected so a misspelled placeholder cannot reach a call.\n\nA format with no `{number}` at all states the same identity on every call,\nwhich is what a peer that only accepts one authorized number wants. The\ncall then carries nothing about who really called.\n","example":"+{number}"},"destination_format":{"type":"string","maxLength":64,"description":"How this gateway formats the dialed number. In the template, `{number}`\nrepresents the number without its leading `+`. The result is placed before\nthe `sip_uri` host. For example, `1234#{number}` formats `+31201234567` as\n`sip:1234#31201234567@pbx.example.com:5060`.\n\nSend an empty string to go back to E.164, which is `+{number}`. A format\nwith no `{number}` at all sends every number this trunk answers to one fixed\nnumber, so `777000447973` reaches `sip:777000447973@pbx.example.com:5060`\nwhatever was dialed. The same rules as `origination_format` apply to what\nthe template may contain.\n","example":"1234#{number}"}}},"VoiceNumberProviderType":{"type":"string","minLength":1,"enum":["allocation","verified_number"],"description":"Where a number came from. `allocation` is a number we allocated to your workspace, and the only kind whose calls reach us. `verified_number` is a number from another carrier that you registered and proved you control, so it can be presented on a call you place.\n","example":"allocation"},"VoiceCallRouteType":{"type":"string","minLength":1,"enum":["reject","trunk","forward","sequence","ring_group"],"description":"Which answer a number carries.\n\n- `reject`: refuses the call.\n- `trunk`: delivers the call to one of your SIP trunks.\n- `forward`: places a call to one of your verified caller IDs and connects the two.\n- `sequence`: runs the configured sequence from its selected voice-call entry.\n- `ring_group`: rings the group's online members.\n\nIt selects the answer's own shape, so a new way to answer a call arrives as a\nnew value alongside a new set of fields.\n","example":"reject"},"VoiceNumberSortField":{"type":"string","enum":["phone_number"],"default":"phone_number","description":"Field used to sort the list."},"VoiceNumberProviderAllocation":{"type":"object","additionalProperties":false,"required":["type","number_id"],"properties":{"type":{"$ref":"#/components/schemas/VoiceNumberProviderType","const":"allocation","description":"A number we allocated to your workspace."},"number_id":{"oneOf":[{"$ref":"#/components/schemas/AllocatedNumberID"},{"type":"null"}],"readOnly":true,"description":"Identifier of this number's allocation, to pass to the numbers operations. Null when the allocation behind this number cannot be resolved.\n"}}},"VoiceVerifiedNumberStatus":{"type":"string","minLength":1,"x-extensible-enum":["pending","verified","failed"],"description":"Verification state of the verified number.\n\n- `pending`: the number is registered but ownership has not yet been proven.\n- `verified`: the workspace proved ownership of the number. Check the\n  resource's activation or direction fields for outbound availability.\n- `failed`: terminal because the verification challenge expired or the attempt limit was exhausted.\n  Delete the verified number and register it again to retry.\n\nOpen enum: additional states may be added over time, so treat an unrecognized\nvalue as a future state rather than an error.\n","example":"pending"},"VoiceNumberProviderVerifiedNumber":{"type":"object","additionalProperties":false,"required":["type","status","verified_at"],"properties":{"type":{"$ref":"#/components/schemas/VoiceNumberProviderType","const":"verified_number","description":"A number from another carrier that you registered here. That carrier decides where calls to it go; we only present it on calls you place.\n"},"status":{"$ref":"#/components/schemas/VoiceVerifiedNumberStatus","readOnly":true,"description":"How far proving control of this number has got."},"verified_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When control of this number was last proven. Null until it is."}}},"VoiceNumberProvider":{"description":"Where this number came from, and the facts that belong to that answer. The type selects the shape. `allocation` is a number we allocated to your workspace, and it carries that allocation's identifier. `verified_number` is a number from another carrier, and it carries how far proving control of it has got.\n","oneOf":[{"$ref":"#/components/schemas/VoiceNumberProviderAllocation"},{"$ref":"#/components/schemas/VoiceNumberProviderVerifiedNumber"}],"discriminator":{"propertyName":"type","mapping":{"allocation":"#/components/schemas/VoiceNumberProviderAllocation","verified_number":"#/components/schemas/VoiceNumberProviderVerifiedNumber"}}},"VoiceNumberDirections":{"type":"object","additionalProperties":false,"required":["inbound","outbound"],"properties":{"inbound":{"type":"boolean","readOnly":true,"description":"Whether calls to this number arrive here. False for a number from another carrier, whose calls that carrier routes, and for one allocated to you that cannot carry calls.\n"},"outbound":{"type":"boolean","readOnly":true,"description":"Whether this number can be presented on a call you place. Buying a number does not grant this on its own: proving control of it does.\n"}}},"VoiceCallRouteReject":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"$ref":"#/components/schemas/VoiceCallRouteType","const":"reject","description":"Refuses the call. Setting it is how you stop a number answering without giving it up. It is also the default inbound route of a new workspace.\n"}}},"VoiceCallRouteTrunk":{"type":"object","additionalProperties":false,"required":["type","trunk_id"],"properties":{"type":{"$ref":"#/components/schemas/VoiceCallRouteType","const":"trunk","description":"Delivers the call to one of your SIP trunks."},"trunk_id":{"$ref":"#/components/schemas/SIPTrunkID","description":"The SIP trunk that answers these calls. It must be one of yours and must have inbound calling enabled. Turning that trunk's inbound calling off, or deleting it, removes this route: a number returns to your workspace's default inbound route, and a workspace default becomes \"reject\".\n"}}},"VoiceCallRouteForward":{"type":"object","additionalProperties":false,"required":["type","forward_to","forward_as"],"properties":{"type":{"$ref":"#/components/schemas/VoiceCallRouteType","const":"forward","description":"Places a call to another of your numbers and connects the two."},"forward_to":{"type":"string","minLength":1,"description":"The number calls are forwarded to, in E.164 format. It has to be one of your verified caller IDs. That is checked when you set it and again on every call it forwards, so a caller ID you later remove stops forwarding rather than carrying on.\n","example":"+14155551234"},"forward_as":{"$ref":"#/components/schemas/VoiceInboundForwardAs","description":"Which number the forwarded leg presents as its caller. Include the choice\non every write. Reads return the effective choice; older configurations\nwithout a stored choice return `dialed_number`.\n"}}},"VoiceCallRouteSequence":{"type":"object","additionalProperties":false,"required":["type","sequence_id","entry_node_id"],"properties":{"type":{"$ref":"#/components/schemas/VoiceCallRouteType","const":"sequence","description":"Runs the named sequence's active publication from the selected voice-call entry."},"sequence_id":{"$ref":"#/components/schemas/VoiceSequenceID","description":"Named sequence whose active publication handles the call."},"entry_node_id":{"$ref":"#/components/schemas/VoiceSequenceNodeID","description":"Voice-call entry in the sequence's active publication."}}},"VoiceCallRouteRingGroup":{"type":"object","additionalProperties":false,"required":["type","ring_group_id"],"properties":{"type":{"$ref":"#/components/schemas/VoiceCallRouteType","const":"ring_group","description":"Rings the ring group's members who are online in the browser phone, and answers the call when one of them answers. Nobody answering refuses the call as busy or unavailable.\n"},"ring_group_id":{"allOf":[{"$ref":"#/components/schemas/VoiceRingGroupID"}],"description":"The ring group that rings. It must be one of this workspace's ring groups, or its default group of everyone online.\n"}}},"VoiceCallRoute":{"description":"What happens to a call arriving for this number, as it is configured now. Its `type` selects the shape, and each answer carries its own fields. Setting a route is a separate shape, and it does not offer every variant reported here.\n","oneOf":[{"$ref":"#/components/schemas/VoiceCallRouteReject"},{"$ref":"#/components/schemas/VoiceCallRouteTrunk"},{"$ref":"#/components/schemas/VoiceCallRouteForward"},{"$ref":"#/components/schemas/VoiceCallRouteSequence"},{"$ref":"#/components/schemas/VoiceCallRouteRingGroup"}],"discriminator":{"propertyName":"type","mapping":{"reject":"#/components/schemas/VoiceCallRouteReject","trunk":"#/components/schemas/VoiceCallRouteTrunk","forward":"#/components/schemas/VoiceCallRouteForward","sequence":"#/components/schemas/VoiceCallRouteSequence","ring_group":"#/components/schemas/VoiceCallRouteRingGroup"}}},"VoiceInboundConfigurationError":{"type":"string","minLength":1,"enum":["unsupported_route_type"]},"VoiceInboundConfiguration":{"type":"object","additionalProperties":false,"required":["route"],"properties":{"route":{"oneOf":[{"$ref":"#/components/schemas/VoiceCallRoute"},{"type":"null"}],"description":"Null when the number has no route of its own and follows your workspace's default inbound route from the voice settings. Also null when the stored route type is unsupported, in which case configuration_error says so; inspect it before changing the route.\n"},"configuration_error":{"$ref":"#/components/schemas/VoiceInboundConfigurationError","readOnly":true},"forward_as_options":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/VoiceInboundForwardAs"},"description":"Caller identities available when configuring a forward. Use these values to populate the choice in your editor. The current choices are `dialed_number` and `calling_number`.\n","example":["dialed_number","calling_number"]}},"if":{"properties":{"route":{"not":{"type":"null"}}},"required":["route"]},"then":{"properties":{"configuration_error":{"not":{}}}}},"VoiceNumber":{"type":"object","additionalProperties":false,"required":["id","phone_number","country_code","name","provider","directions","inbound_configuration","created_at"],"properties":{"id":{"$ref":"#/components/schemas/VoiceNumberID","readOnly":true,"description":"Identifier of this number, to pass to the operations that read and change it. A number you registered as a caller ID carries the same identifier there, with the caller-ID prefix.\n"},"phone_number":{"type":"string","minLength":1,"readOnly":true,"description":"The phone number in E.164 format.","example":"+14155551234"},"country_code":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}],"readOnly":true,"description":"Country the number belongs to. Null when the number is not geographic or its country cannot be determined.\n"},"name":{"type":["string","null"],"minLength":1,"maxLength":100,"readOnly":true,"description":"Your own label for this number, to tell several apart. Null when it has none. Only you see it, so it never affects what a caller sees.\n","example":"Support line"},"provider":{"$ref":"#/components/schemas/VoiceNumberProvider","readOnly":true},"directions":{"$ref":"#/components/schemas/VoiceNumberDirections","readOnly":true,"description":"Which directions this number can carry. Both follow from the number itself, so neither is yours to change. On a SIP trunk each direction is a setting you turn on; here it is a fact about the number.\n"},"inbound_configuration":{"$ref":"#/components/schemas/VoiceInboundConfiguration","readOnly":true,"description":"What happens to a call arriving for this number."},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When this number became usable for voice: when it was allocated to you, or when you first registered it, whichever this number is.\n"}}},"VoiceNumberList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VoiceNumber"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"VoiceCallRouteWritable":{"description":"What happens to a call arriving for this number. Its `type` selects the shape, and each answer carries its own fields; the variants below are the full set you can set.\n","oneOf":[{"$ref":"#/components/schemas/VoiceCallRouteReject"},{"$ref":"#/components/schemas/VoiceCallRouteTrunk"},{"$ref":"#/components/schemas/VoiceCallRouteForward"},{"$ref":"#/components/schemas/VoiceCallRouteRingGroup"}],"discriminator":{"propertyName":"type","mapping":{"reject":"#/components/schemas/VoiceCallRouteReject","trunk":"#/components/schemas/VoiceCallRouteTrunk","forward":"#/components/schemas/VoiceCallRouteForward","ring_group":"#/components/schemas/VoiceCallRouteRingGroup"}}},"VoiceInboundConfigurationPut":{"type":"object","additionalProperties":false,"required":["route"],"properties":{"route":{"oneOf":[{"$ref":"#/components/schemas/VoiceCallRouteWritable"},{"type":"null"}],"description":"The number's own route, or null to have it follow your workspace's default inbound route from the voice settings.\n"}}},"VoiceNumberUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":["string","null"],"minLength":1,"maxLength":100,"description":"Your own label for this number. Send null to remove the one it has. Omit the field to leave it alone.\n","example":"Support line"},"inbound_configuration":{"$ref":"#/components/schemas/VoiceInboundConfigurationPut","description":"What should happen to calls arriving for this number. The route replaces\nwhatever was set before, because a number has exactly one answer at a time.\nType \"reject\" stops it answering, and a null route returns it to your\nworkspace's default inbound route. Omit the field to leave the answer alone.\n\nOnly a number that can receive calls carries a route, so it is refused on\none whose directions do not include inbound.\n"}}},"VoiceSettingsInboundConfiguration":{"type":"object","additionalProperties":false,"description":"What happens to a call arriving for any of your Bird numbers that has no inbound route of its own.\n","required":["route"],"properties":{"route":{"$ref":"#/components/schemas/VoiceCallRoute","description":"The workspace's default inbound route. Defaults to \"reject\"."}}},"VoiceDailySpendLimit":{"type":"object","additionalProperties":false,"required":["currency_code","limit","used","remaining","resets_at","default_limit","max_limit","workspace_limit"],"properties":{"currency_code":{"$ref":"#/components/schemas/CurrencyCode","description":"The organization's wallet currency, which every amount here is in.","example":"EUR"},"limit":{"oneOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The daily limit calls are admitted against: the workspace limit when one is set, otherwise the default, and never more than `max_limit`. Null when there is no limit.\n"},"used":{"oneOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Used toward today's limit, including calls in progress. A call counts its expected cost when it starts; the part it did not use returns when it is billed. Null when today's usage cannot be read right now; the limit is still enforced.\n"},"remaining":{"oneOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"What is left of the limit today, never below zero. Null when there is no limit or today's usage cannot be read."},"resets_at":{"type":"string","format":"date-time","minLength":1,"description":"When usage resets to zero, at midnight UTC."},"default_limit":{"oneOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The daily limit a workspace has until it sets its own. Null when there is no default limit."},"max_limit":{"oneOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The highest daily limit this workspace can set. Null when there is no maximum."},"workspace_limit":{"oneOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The daily limit this workspace set for itself. Null when it uses the default."}}},"VoiceSettings":{"type":"object","additionalProperties":false,"description":"The voice settings your workspace controls. Every field carries its effective value, whether or not the workspace has ever changed it.\n","required":["inbound_configuration","daily_spend_limit"],"properties":{"inbound_configuration":{"$ref":"#/components/schemas/VoiceSettingsInboundConfiguration"},"daily_spend_limit":{"oneOf":[{"$ref":"#/components/schemas/VoiceDailySpendLimit"},{"type":"null"}],"description":"The workspace's daily Voice spend limit and today's usage toward it. Null until your organization has a wallet, since amounts are in its currency.\n"}}},"VoiceSettingsInboundConfigurationPut":{"type":"object","additionalProperties":false,"description":"The route for calls arriving on any of your Bird numbers that has no inbound route of its own; verified caller IDs receive no calls. It takes effect on the next call to each of those numbers. Numbers with their own route keep it.\n","required":["route"],"properties":{"route":{"$ref":"#/components/schemas/VoiceCallRouteWritable"}}},"VoiceDailySpendLimitUpdate":{"type":"object","additionalProperties":false,"required":["workspace_limit"],"properties":{"workspace_limit":{"oneOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The workspace's own daily limit, in the organization's wallet currency from zero up to `max_limit`, with at most six decimal places; a negative or more precise amount is refused with 422. It can be above or below the default. Null removes it, so the default applies.\n"}}},"VoiceSettingsUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"description":"Changes to your workspace's voice settings. Omit a field to leave it as it is.\n","properties":{"inbound_configuration":{"$ref":"#/components/schemas/VoiceSettingsInboundConfigurationPut"},"daily_spend_limit":{"$ref":"#/components/schemas/VoiceDailySpendLimitUpdate"}}},"VoiceVerifiedNumberSortField":{"type":"string","enum":["created_at"],"default":"created_at","description":"Field used to sort the list."},"VoiceVerifiedNumberID":{"type":"string","minLength":1,"pattern":"^vvn_[0-9a-hjkmnp-tv-z]{26}$","example":"vvn_01krdgeqcxet5s7t44vh8rt9mg"},"VoiceVerifiedNumber":{"readOnly":true,"allOf":[{"type":"object","required":["id","workspace_id","phone_number","name","status","outbound_enabled","verified_at"],"properties":{"id":{"$ref":"#/components/schemas/VoiceVerifiedNumberID","description":"Unique identifier for this verified number."},"workspace_id":{"$ref":"#/components/schemas/WorkspaceID"},"phone_number":{"type":"string","minLength":1,"description":"The phone number in E.164 format registered as an outbound caller ID.","example":"+14155551234"},"name":{"type":["string","null"],"minLength":1,"maxLength":100,"description":"Your label for this verified number, to tell several registered numbers apart. `null` when the verified number has no label. It is yours to choose and appears nowhere on a call, so changing it never affects what the person you are calling sees. Set it with the verified number update operation.\n","example":"Support line"},"status":{"$ref":"#/components/schemas/VoiceVerifiedNumberStatus"},"outbound_enabled":{"type":"boolean","description":"Whether outbound caller ID activation has completed. A verified number can remain inactive until activation requirements are met. Outbound calls remain subject to routing and number ownership requirements."},"verified_at":{"type":["string","null"],"format":"date-time","description":"When the verified number was verified. `null` when its status is `pending` or `failed`."}}},{"$ref":"#/components/schemas/Timestamps"}]},"VoiceVerifiedNumberList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VoiceVerifiedNumber"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"VoiceVerifiedNumberCreate":{"type":"object","additionalProperties":false,"required":["phone_number"],"properties":{"phone_number":{"type":"string","minLength":1,"description":"The phone number to register as an outbound caller ID, in E.164 format (a leading `+` followed by the country code and national number). Must be unique within the workspace. Creating the verified number starts verification: a verification call is placed to this number.\n","example":"+14155551234"},"name":{"type":"string","minLength":1,"maxLength":100,"description":"Your label for this verified number, to tell several registered numbers apart. Omit it to register the number without one and add it later. It is yours to choose and appears nowhere on a call, so it never affects what the person you are calling sees.\n","example":"Support line"}}},"VoiceVerifiedNumberUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"required":["name"],"description":"A replacement for the verified number's label.\n","properties":{"name":{"type":["string","null"],"minLength":1,"maxLength":100,"description":"Your new label for this verified number. Send `null` to clear it and go back to identifying the verified number by its number alone. It is yours to choose and appears nowhere on a call, so renaming never affects what the person you are calling sees, and it leaves the number and its verification untouched.\n","example":"Support line"}}},"VoiceVerifiedNumberVerifyRequest":{"type":"object","additionalProperties":false,"properties":{"code":{"type":"string","pattern":"^\\d{6}$","minLength":6,"maxLength":6,"x-sensitive":true,"description":"The 6-digit verification code read out by the verification call. Required until ownership is verified. Omit it when retrying activation of an already verified number.","example":"123456"}}},"VoiceRingGroup":{"type":"object","additionalProperties":false,"description":"A set of workspace users that an inbound call rings in the browser phone. Every workspace also has a default group, which rings the workspace's online users and cannot be changed.\n","required":["id","name","is_default","online_member_count","created_at","updated_at"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/VoiceRingGroupID","description":"Unique identifier for this ring group. The default group's ID is `vrg_` followed by the workspace ID's suffix.\n"},"name":{"type":"string","minLength":1,"maxLength":100,"description":"The ring group's name.","example":"Support"},"is_default":{"type":"boolean","readOnly":true,"description":"Whether this is the workspace's default group, which rings the users who are online in the browser phone.\n","example":false},"online_member_count":{"type":"integer","minimum":0,"description":"How many of the group's members are connected to the browser phone and accepting calls, read live. A member on a call counts, though a call to the group skips them until it ends. For the default group, the count includes every connected user who accepts calls.","example":3},"created_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the ring group was created. Null for the default group.","example":"2026-10-01T12:00:00Z"},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the ring group's name or members last changed. Null for the default group.","example":"2026-10-01T12:00:00Z"}}},"VoiceRingGroupList":{"type":"object","additionalProperties":false,"required":["data"],"description":"The workspace's ring groups. Not paginated: a workspace holds at most 50 ring groups besides its default group.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VoiceRingGroup"},"description":"The default group first, then the other ring groups, oldest first."}}},"VoiceRingGroupCreate":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The ring group's name.","example":"Support"}}},"VoiceRingGroupUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"required":["name"],"description":"A change to the ring group's name.","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The ring group's new name.","example":"Tier 2 support"}}},"VoiceRingGroupMember":{"type":"object","additionalProperties":false,"description":"A user added to a ring group. A member who later leaves the workspace stays listed until removed, but the group never rings them.","required":["user_id","created_at"],"properties":{"user_id":{"readOnly":true,"$ref":"#/components/schemas/UserID","description":"The member's user ID."},"created_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the user joined the ring group. Null for the default group, whose members are the users online now.","example":"2026-10-01T12:00:00Z"}}},"VoiceRingGroupMemberList":{"type":"object","additionalProperties":false,"required":["data"],"description":"The ring group's members. Not paginated: a ring group holds at most 200 members, and the default group's members are the workspace's online users.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VoiceRingGroupMember"},"description":"The members, in the order they joined; the default group's online users, by user ID."}}},"VoiceRingGroupMemberCreate":{"type":"object","additionalProperties":false,"required":["user_id"],"properties":{"user_id":{"$ref":"#/components/schemas/UserID","description":"The workspace user to add. `bird members list` and the `members_list` MCP tool list workspace members in pages, each with its `user.id`; follow `next_cursor` until the user appears. Both need the `members` scope at read level."}}},"EsimZoneID":{"type":"string","minLength":1,"pattern":"^ezn_[0-9a-hjkmnp-tv-z]{26}$","example":"ezn_01krdgeqcxet5s7t44vh8rt9mg"},"EsimSchemaRevision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$","description":"Revision identifying the returned identification schema. A changed revision means the requirements or guidance changed. It does not indicate an expiry time or purchase authorization."},"EsimIdentificationSchema":{"type":"object","additionalProperties":true,"description":"Complete JSON Schema draft 2020-12 document for customer-side identification validation. It declares $schema, type, title, description, properties, required, and additionalProperties. Property definitions use string or object types, standard format, pattern, minLength, maxLength, enum, and nested object keywords. Enable format assertions in your validator for email addresses and dates. Every country requires first_name, last_name, and email. Other customer-owned properties are allowed, so one details object can satisfy several countries. Bird does not receive or verify the values. Document references are opaque identifiers in customer-managed storage, not Bird upload IDs or required URLs.\n"},"EsimZoneType":{"type":"string","minLength":1,"enum":["local","regional","global"],"description":"Zone breadth: a single country, a multi-country region, or worldwide."},"EsimSpeed":{"type":"string","minLength":1,"enum":["full","reduced"],"description":"Speed class. full: data flows at full network speed until the allowance is used; reduced: speed is limited, typically after the full-speed allowance. Full-speed and reduced-speed packages cannot be combined on one eSIM.\n"},"EsimOfferStatus":{"type":"string","minLength":1,"enum":["draft","active","retired"],"description":"Availability of an offer.\n\n- `draft`: being curated; never returned on the customer surface and not purchasable.\n- `active`: purchasable.\n- `retired`: no longer purchasable; packages already sold are unaffected.\n"},"EsimZone":{"type":"object","additionalProperties":false,"description":"A group of countries covered by an offer. Use `countries` to check a destination rather than inferring coverage from the zone name. Purchased packages retain their coverage details from the time of purchase.","required":["id","name","revision","type","countries","created_at"],"properties":{"id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimZoneID"}]},"name":{"type":"string","minLength":1,"readOnly":true,"description":"Human-readable zone name.","example":"Europe"},"revision":{"type":"integer","minimum":1,"readOnly":true,"description":"Increments whenever the country list changes."},"type":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimZoneType"}]},"countries":{"type":"array","minItems":1,"readOnly":true,"items":{"$ref":"#/components/schemas/CountryCode"},"description":"Countries covered by the zone, as ISO 3166-1 alpha-2 codes."},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true}}},"EsimStatus":{"type":"string","minLength":1,"enum":["provisioning","ready","activating","active","suspending","suspended","resuming","releasing","released","expired","failed"],"description":"Lifecycle state of an eSIM. A pending state always settles: to its target on\nsuccess, or back to the prior status when the network definitively rejects\nthe change, reported by the `esim.operation_failed` event.\n\n- `provisioning`: the initial data package is being applied; install credentials may already be available.\n- `ready`: installable and usable, waiting for first network use; allows top-up orders and release. Activate before `ready_until`, when known, to stay within the guaranteed activation window.\n- `activating`: an activation is being applied.\n- `active`: in service; the service period ends at `active_until`. Allows top-up orders, suspend, resync, and release.\n- `suspending`: a suspension was requested and is being applied.\n- `suspended`: data service is paused; allows resume and release.\n- `resuming`: a resume was requested and is being applied.\n- `releasing`: a permanent release is in progress.\n- `released`: permanently released; terminal.\n- `expired`: dormant. No data package has been live (each one depleted, expired, removed, or failed) for the expiry window. Not terminal: a completed top-up returns the eSIM to `active`, and release remains available. Balances and the installed profile are untouched.\n- `failed`: provisioning failed; any charge on the owning order is credited back automatically, reported by that order. Terminal.\n"},"EsimMode":{"type":"string","minLength":1,"enum":["live","test"],"description":"Whether a purchase or eSIM is live or simulated. The mode is fixed when the order is created; the resulting eSIM retains it.\n\n- `live`: purchases service for use on a device and charges the wallet.\n- `test`: simulates a purchase without a charge or usable mobile service.\n\nList responses can include both modes. Filter by `mode` when separating test activity from live purchases.\n"},"EsimSubscriberID":{"type":"string","minLength":1,"pattern":"^esub_[0-9a-hjkmnp-tv-z]{26}$","example":"esub_01krdgeqcxet5s7t44vh8rt9mg"},"EsimServiceCapability":{"type":"string","minLength":2,"readOnly":true,"enum":["yes","no","unknown"],"description":"Whether a service is supported. `yes` confirms support, `no` confirms it is not supported, and `unknown` means support has not been established.\n","example":"yes"},"EsimServiceCapabilities":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Supported services for the eSIM. These values describe capabilities; package balances and current eSIM status determine whether service can be used now. Optional phone service can remain `unknown` until a number is assigned. Data packages do not establish call or SMS allowances.","required":["data","sms_inbound","sms_outbound","voice_inbound","voice_outbound"],"properties":{"data":{"$ref":"#/components/schemas/EsimServiceCapability"},"sms_inbound":{"$ref":"#/components/schemas/EsimServiceCapability"},"sms_outbound":{"$ref":"#/components/schemas/EsimServiceCapability"},"voice_inbound":{"$ref":"#/components/schemas/EsimServiceCapability"},"voice_outbound":{"$ref":"#/components/schemas/EsimServiceCapability"}}},"EsimInstallation":{"type":"object","additionalProperties":false,"description":"Device-side installation state of the eSIM profile.","required":["state"],"properties":{"state":{"type":"string","minLength":1,"readOnly":true,"x-extensible-enum":["pending","downloaded","installed","removed","error"],"description":"pending: not yet downloaded by a device; downloaded: downloaded but not installed; installed: installed on the device; removed: deleted from the device; whether the profile can be installed again depends on the carrier profile, so treat removal as final; error: download or installation failed, see error_reason. Open enum: installation state is reported by the device, so additional states may be added over time. Treat an unrecognized value as a future state, not an error.\n"},"updated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the installation state last changed. Null before the first device interaction."},"error_reason":{"type":["string","null"],"readOnly":true,"description":"Human-readable reason installation failed, for example an ineligible device or an exhausted download limit. Null unless state is error.\n"}}},"EsimPackageStatus":{"type":"string","minLength":1,"enum":["provisioning","pending_first_use","active","depleted","expired","removing","removed","failed"],"description":"Lifecycle state of a data package.\n\n- `provisioning`: being applied to the eSIM.\n- `pending_first_use`: confirmed; activates on first use in its coverage zone.\n- `active`: consuming data; validity is running.\n- `depleted`: balance fully used.\n- `expired`: validity ended; unused balance is gone.\n- `removing`: a removal was requested and is being applied. On definitive rejection the package returns to its prior status, reported by `esim.operation_failed`.\n- `removed`: taken off the eSIM at your request; remaining balance forfeited.\n- `failed`: could not be applied; any charge is credited back automatically through the owning order, which reports this through its `failed` status and the `esim.order.failed` event.\n"},"EsimPackageBalance":{"type":"object","additionalProperties":false,"description":"Package allowance and reported consumption. `total_bytes` is the purchased allowance. `used_bytes`, `remaining_bytes`, and `used_percent` are null until usage is reported. Reports can lag device usage; use `as_of` to show when the balance was updated.","required":["total_bytes","used_bytes","remaining_bytes","used_percent","as_of","observed_at"],"properties":{"total_bytes":{"type":"integer","minimum":0,"readOnly":true,"description":"Total data in bytes, as purchased. Known from the order, so never null."},"used_bytes":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"Data used in bytes, or null while no network has reported on this package."},"remaining_bytes":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"Data remaining in bytes, or null while no network has reported on this package."},"used_percent":{"type":["number","null"],"minimum":0,"maximum":100,"readOnly":true,"description":"Share of the total data already used, as a percentage. Null while no network has reported on this package."},"as_of":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the balance was last established. Before consumption is reported, this is the package delivery time. Check whether the consumption fields are null before treating this timestamp as a usage update."},"observed_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"Measurement time supplied by the mobile network. Null when no measurement or measurement time is available. Use `as_of` for the balance update time."}}},"EsimPackage":{"type":"object","additionalProperties":false,"description":"One data package held by an eSIM: a single purchase with its own balance, validity, and coverage zone. Every order that completes creates exactly one package, so a package is always traceable to the order that bought it. An eSIM can hold several packages per zone; the right one is consumed automatically based on the device's location, and zone_balances on the eSIM carries the combined remainder per zone.\n","required":["id","order_id","offer_id","zone_id","zone_name","countries","status","speed","balance","price","created_at"],"properties":{"id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimPackageID"}]},"order_id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimOrderID"}],"description":"The order that purchased this package."},"offer_id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimOfferID"}],"description":"Offer this package was purchased from."},"zone_id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimZoneID"}],"description":"Coverage zone the package draws on. The name and countries below are captured at purchase time; the zone resource carries the live footprint."},"zone_name":{"type":"string","minLength":1,"readOnly":true,"description":"Coverage zone name, from the offer.","example":"Europe"},"countries":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/CountryCode"},"description":"Countries the package's zone covers, captured at purchase time so the package is meaningful without fetching the offer.\n"},"status":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimPackageStatus"}]},"speed":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimSpeed"}],"description":"Speed class, from the offer."},"balance":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimPackageBalance"}]},"activated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the package started consuming data (first use in its zone). Null until then."},"expires_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the package's validity ends and unused balance expires. Already capped by the eSIM's service period, so this is always the effective expiry. Null until the package activates.\n"},"price":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"What your workspace was billed for this package."},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true}}},"EsimZoneBalance":{"type":"object","additionalProperties":false,"description":"Reported balance across packages in one coverage zone. Zones can overlap; check each package’s countries before using these totals to estimate allowance for a destination. The mobile network selects which eligible package serves a connection.","required":["zone_id","total_bytes","used_bytes","remaining_bytes","as_of","observed_at"],"properties":{"zone_id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimZoneID"}]},"total_bytes":{"type":"integer","minimum":0,"readOnly":true,"description":"Total purchased data for the zone, in bytes. Known from the orders, so never null."},"used_bytes":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"Reported data used in this zone, in bytes. Null if any contributing package lacks a usage report. Read individual package balances for available measurements."},"remaining_bytes":{"type":["integer","null"],"minimum":0,"readOnly":true,"description":"Data remaining, in bytes. Null under the same condition as `used_bytes`."},"as_of":{"type":"string","minLength":1,"format":"date-time","readOnly":true,"description":"Freshness of this combined figure - the oldest balance read among the zone's contributing packages. Each package's own balance.as_of can be newer."},"observed_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"Oldest network measurement time among the contributing packages. Null if any package lacks a report or a measurement time. Use `as_of` for the balance update time."}}},"EsimActionName":{"type":"string","minLength":1,"x-extensible-enum":["suspend","resume","release","install","top_up","assign"],"description":"An operation you can attempt on an eSIM.\n\n- `suspend`: pause data service, keeping packages and their validity running.\n- `resume`: restore service to a suspended eSIM.\n- `release`: permanently retire the eSIM.\n- `install`: read the install credentials for a device.\n- `top_up`: order another data package onto this eSIM.\n- `assign`: assign an unassigned profile to a person, or read back the same assignment.\n\nTolerate a value you do not recognize: we report on more actions over time.\n"},"EsimActionUnavailableReason":{"type":"string","minLength":1,"x-extensible-enum":["permission_denied","network_unsupported","network_unconfirmed","esim_state","operation_in_progress","package_limit_reached","identification_required"],"description":"Reason an action is unavailable.\n\n- `permission_denied`: your credentials lack the required permission. Update permissions and check availability again; another restriction may still apply.\n- `network_unsupported`: the serving mobile network does not support the action for this eSIM.\n- `network_unconfirmed`: support for the action has not been confirmed. Contact support if you need it.\n- `esim_state`: the profile is not in a state that permits the action. Check the eSIM status.\n- `operation_in_progress`: an existing order must finish before this action can proceed.\n- `package_limit_reached`: the eSIM has reached its concurrent package limit. A depleted package still occupies a slot until it expires or is removed.\n- `identification_required`: retained for compatibility; subscriber assignment no longer returns this reason.\n\nTreat an unrecognized reason as unavailable and avoid automatically retrying the action.\n"},"EsimAvailableAction":{"type":"object","additionalProperties":false,"description":"One action, and whether this eSIM permits it for you right now.\n","required":["action","operation","available","reason"],"properties":{"action":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimActionName"}]},"operation":{"type":"string","minLength":1,"readOnly":true,"description":"Operation to call for this action. Consult that operation’s reference for its request and response.","example":"suspendEsim"},"available":{"type":"boolean","readOnly":true,"description":"Whether the action is available given your permissions and the current eSIM state. The action checks these again when submitted; a later request can be refused if conditions change."},"reason":{"readOnly":true,"description":"Why the action is unavailable. Null while `available` is true.","oneOf":[{"$ref":"#/components/schemas/EsimActionUnavailableReason"},{"type":"null"}]},"requires":{"type":"array","readOnly":true,"items":{"type":"string","minLength":1},"description":"Additional parameters required by the current state, such as `acknowledge_balance_forfeit` when releasing an eSIM with remaining data. Absent when no additional parameters apply or when permissions, network support, or profile state prevent the action.","example":["acknowledge_balance_forfeit"]}}},"EsimBalanceReporting":{"type":"string","minLength":1,"readOnly":true,"enum":["available","unavailable"],"description":"Whether package consumption can be reported for this eSIM.\n\n- `available`: consumption reporting has not been ruled out. A null package balance means no measurement is available yet.\n- `unavailable`: ongoing consumption reporting is unavailable. Display the purchased `total_bytes` as allowance; do not present it as measured remaining data.\n\nThis field is separate from daily usage history. Reporting availability can change as network support is confirmed.\n"},"EsimNetworkAttachment":{"type":"object","additionalProperties":false,"description":"The most recent mobile network the device attached to.","required":["country_code","attached_at"],"properties":{"country_code":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/CountryCode"}],"description":"Country of the network."},"country_name":{"type":["string","null"],"readOnly":true,"description":"English name of the country, or null when not known."},"network_name":{"type":["string","null"],"readOnly":true,"description":"Name of the mobile network, or null when not known."},"attached_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the device attached."}}},"Esim":{"unevaluatedProperties":false,"allOf":[{"type":"object","required":["id","subscriber_id","status","mode","iccid","phone_number","installation","packages","zone_balances","package_limit","usage_available","balance_reporting","order_id"],"properties":{"subscriber_id":{"readOnly":true,"oneOf":[{"$ref":"#/components/schemas/EsimSubscriberID"},{"type":"null"}],"description":"The assigned service user, or null when the eSIM has no person assignment."},"id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimID"}]},"status":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimStatus"}]},"mode":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimMode"}]},"iccid":{"type":["string","null"],"readOnly":true,"description":"ICCID of the eSIM profile. Null while no profile is allocated yet, for example when provisioning failed before allocation.","example":"8944500212345678912"},"phone_number":{"type":["string","null"],"readOnly":true,"description":"Phone number attached to this eSIM, in E.164 format, as the supplier reports it. Null while none is on record: a data-only plan comes with no number, and a plan that includes one reports it after provisioning.\n","example":"+31612345678"},"capabilities":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimServiceCapabilities"}]},"order_id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimOrderID"}],"description":"The order that created this eSIM."},"display_name":{"type":["string","null"],"maxLength":120,"description":"Free-text label for your own reference, for example a traveler or order reference.","example":"Amsterdam trip, order 8812"},"installation":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimInstallation"}]},"packages":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/EsimPackage"},"description":"Current data packages, one per purchase."},"zone_balances":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/EsimZoneBalance"},"description":"Remaining data per coverage zone, combined across the zone's packages. Derived; the packages are the source of truth."},"available_actions":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/EsimAvailableAction"},"description":"Actions currently available to you on this eSIM, with reasons for unavailable actions. Returned by the individual eSIM read. Use this to display controls and explain restrictions. Each action rechecks permissions and state when submitted, so availability is not a guarantee of success."},"package_limit":{"type":"integer","minimum":1,"readOnly":true,"example":3,"description":"Maximum number of concurrent data packages this eSIM can hold, counted across all zones; several packages may share one zone. Enforced when packages are added.\n"},"usage_available":{"type":"boolean","readOnly":true,"example":true,"description":"Whether daily usage history is supported for this eSIM. The daily usage endpoint is currently unavailable; read package balances for reported consumption."},"balance_reporting":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimBalanceReporting"}],"description":"Whether ongoing package consumption reporting is available. Separate from daily usage history. Null package consumption values mean no measurement is available."},"ready_until":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"Guaranteed deadline for first network use, derived from the initial purchase's accepted activation window. The activation window is separate from package validity. Null when the window is unconfirmed, first use has been reported, or the eSIM has been released. Top-ups do not restart this deadline."},"activated_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the eSIM first used a mobile network. Null until then."},"active_until":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the eSIM's service period ends. The period starts at activation and data packages cannot outlive it. Null until activated.\n"},"last_attachment":{"readOnly":true,"description":"Most recent network attachment, or null before first attach.","oneOf":[{"$ref":"#/components/schemas/EsimNetworkAttachment"},{"type":"null"}]},"tags":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/Tag"},"description":"Tags for routing, filtering, and stats grouping, echoed on webhook events for the eSIM."},"metadata":{"type":"object","additionalProperties":true,"description":"Your own key-value data, echoed on webhook events for the eSIM. Maximum 2 KB serialized."}}},{"$ref":"#/components/schemas/Timestamps"}]},"EsimOrderStatus":{"type":"string","minLength":1,"enum":["scheduled","charging","provisioning","pending","completed","failed","canceled"],"description":"Order state.\n\n- `scheduled`: reserved for a future scheduled purchase; no charge has been made.\n- `charging`: payment is being obtained. If funds are insufficient, inspect `funding` and your wallet balance. One-time orders retry automatically; an initial recurring purchase requires an explicit retry after adding funds.\n- `provisioning`: the package is being provisioned during the request.\n- `pending`: the purchase continues after the request returns. Read the order again to check its outcome.\n- `completed`: delivery completed and the eSIM and package IDs are available. This does not confirm device installation. Terminal.\n- `failed`: delivery failed. Any charge is credited automatically; `refund_transaction_id` identifies an issued credit. Terminal.\n- `canceled`: reserved for a scheduled purchase withdrawn before execution. Canceling an unfunded order currently returns `failed` with `failure_code: canceled`.\n"},"EsimDelivery":{"type":"object","x-sensitive":true,"additionalProperties":false,"description":"Where and how install credentials reach the traveler. The recipient is a raw address, so delivery works for travelers who are not stored anywhere: an email address for email, an E.164 phone number for sms.\n","required":["to","channel"],"properties":{"to":{"type":"string","minLength":3,"description":"Recipient address. An email address for the email channel, an E.164 phone number for the sms channel.","example":"traveler@example.com"},"channel":{"$ref":"#/components/schemas/EsimDeliveryChannel"},"locale":{"allOf":[{"$ref":"#/components/schemas/LanguageTag"}],"description":"Language for the message. Falls back to the closest available language, then English."}}},"EsimOrderFunding":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Funding needed for an order in `charging`. Add funds to the wallet and retry the existing order. One-time orders also retry automatically. A funded order proceeds to delivery; a failed order receives an automatic credit for any charge.","required":["required_amount","lapses_at"],"properties":{"required_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"Total wallet balance required for the charge, including tax. This is the required balance rather than the amount to add. Compare it with your current wallet balance."},"lapses_at":{"type":"string","minLength":1,"format":"date-time","example":"2026-09-08T14:51:01Z","description":"Earliest time a further insufficient-funds attempt can fail the order. Adding funds after this time can still complete the purchase before that attempt. Check the order status to determine whether it remains payable."}}},"EsimOrder":{"unevaluatedProperties":false,"allOf":[{"$ref":"#/components/schemas/Timestamps"},{"type":"object","description":"One purchase: a new eSIM with its first package, or an additional package on an existing eSIM. The order locks the quote at creation (the offer revision and the exact price) and is the durable record of the purchase: poll it until a terminal status when it does not complete inline. Orders that can be served immediately complete within the request.\n","required":["id","status","mode","offer_id","offer_revision","zone_id","esim_id","subscriber_id","package_id","price","wallet_transaction_id","refund_transaction_id","funding","failure_code","failure_reason","completed_at"],"properties":{"id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimOrderID"}]},"status":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimOrderStatus"}]},"mode":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimMode"}]},"offer_id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimOfferID"}],"description":"Offer purchased."},"offer_revision":{"type":"integer","minimum":1,"readOnly":true,"description":"Revision of the offer this order locked at creation. The quoted price stays that of this revision even if the offer changes later. The produced package snapshots its coverage at purchase; the zone's live country list governs new sales only."},"zone_id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimZoneID"}],"description":"Coverage zone of the purchased offer, captured at creation."},"esim_id":{"readOnly":true,"description":"The eSIM the package lands on. Set at creation when adding to an existing eSIM; set when provisioning starts for a new-eSIM order; null before that.","oneOf":[{"$ref":"#/components/schemas/EsimID"},{"type":"null"}]},"subscriber_id":{"readOnly":true,"description":"Subscriber to assign when the new eSIM is delivered. Null when none was requested, including top-up orders, which retain the existing assignment.","oneOf":[{"$ref":"#/components/schemas/EsimSubscriberID"},{"type":"null"}]},"recurring_subscription_id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimRecurringSubscriptionID"}],"description":"The recurring service associated with this purchase. Absent for one-time orders."},"package_id":{"readOnly":true,"description":"The purchased data package, set when the order completes; null before that.","oneOf":[{"$ref":"#/components/schemas/EsimPackageID"},{"type":"null"}]},"price":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"The quoted price, locked at creation in your billing currency. A `mode: test` order quotes this price and is never charged it, so its `wallet_transaction_id` stays null."},"wallet_transaction_id":{"readOnly":true,"description":"The wallet transaction that paid for this order, for reconciling against your billing transactions. Null until the charge lands, and always null for a `mode: test` order, which is never charged.","oneOf":[{"$ref":"#/components/schemas/WalletTransactionID"},{"type":"null"}]},"refund_transaction_id":{"readOnly":true,"description":"The wallet transaction that credited the charge back after a failure. Null unless the order failed after charging.","oneOf":[{"$ref":"#/components/schemas/WalletTransactionID"},{"type":"null"}]},"delivery":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimDelivery"}],"description":"Where install credentials are delivered once available. Present when requested at creation."},"awaiting_funds":{"type":"boolean","readOnly":true,"description":"Whether this order is in `charging` after an insufficient wallet balance refusal. The required balance is in `funding` when available. False does not confirm payment; check `status` and `wallet_transaction_id`. When absent, `funding` indicates a refusal if present; otherwise the funding state is unknown."},"funding":{"readOnly":true,"description":"Details of an insufficient-funds attempt while the order is in `charging`. May be null even while the order is awaiting funds; a null value does not confirm payment. Check `awaiting_funds` to identify an outstanding insufficient-balance refusal.","oneOf":[{"$ref":"#/components/schemas/EsimOrderFunding"},{"type":"null"}]},"failure_code":{"type":["string","null"],"readOnly":true,"x-extensible-enum":["insufficient_balance","carrier_error","capacity_exhausted","offer_unavailable","internal_error","canceled","resolved_by_support","esim_released","mode_mismatch"],"description":"Reason the order failed. Null unless `status` is `failed`. Handle unrecognized codes without assuming the purchase succeeded.\n\n- `canceled`: canceled while awaiting funds.\n- `resolved_by_support`: support closed an unresolved order as failed.\n- `esim_released`: the target profile became unavailable before delivery.\n- `mode_mismatch`: the purchase could not be fulfilled in its original live or test mode.\n\nAny charge is credited automatically. Check `refund_transaction_id` to confirm an issued credit.\n"},"failure_reason":{"type":["string","null"],"readOnly":true,"description":"Why the order failed, in plain terms. Null unless status is failed."},"completed_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the order reached completed. Null before that."}}}]},"VoiceLegList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VoiceLeg"}}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"VoiceLegMediaState":{"type":"string","enum":["open","available","failed","purged"],"description":"What became of this stored audio.\n\n`open` while capture is still running. `available` once the bytes are\nstored. `failed` when capture did not produce any. `purged` is reserved for\nfuture use. Recordings are removed from the response after their retention\nperiod.\n","example":"available"},"VoiceLegRecordingMedia":{"type":"object","additionalProperties":false,"readOnly":true,"required":["id","leg_id","codec","state","started_at","ended_at","offset_ms","audio_ms"],"properties":{"id":{"$ref":"#/components/schemas/VoiceCallMediaID","description":"Unique identifier for this stream."},"leg_id":{"$ref":"#/components/schemas/VoiceCallID","description":"The leg this stream was captured from."},"call_id":{"oneOf":[{"$ref":"#/components/schemas/VoiceSessionID"},{"type":"null"}],"description":"`null` on a stream captured before calls existed, which only its leg addresses."},"codec":{"type":"string","minLength":1,"description":"Codec of the stored payload.","example":"PCMU"},"state":{"allOf":[{"$ref":"#/components/schemas/VoiceLegMediaState"}]},"offset_ms":{"type":"integer","description":"Length of the announcement that played before capture started. Zero when nothing was announced. It is not a position on a call clock."},"audio_ms":{"type":"integer","description":"Length of the payload itself. This runs shorter than `ended_at - started_at` by the silence before the first packet, so use it for anything about the sound and the window for anything about the leg."},"source_party":{"oneOf":[{"$ref":"#/components/schemas/VoiceParty"},{"type":"null"}],"description":"The party this audio was captured from, which is what says whose voice it\ncarries. `channel` only says which direction of the leg the stream came\nfrom. A recording view's `number` identifies a number associated with\nthat view, which can be an outbound destination.\n\n`null` on a stream stored before the platform recorded a party for it.\n"},"started_at":{"type":"string","minLength":1,"format":"date-time","description":"When capture started, which is after any announcement rather than at the answer."},"ended_at":{"type":["string","null"],"minLength":1,"format":"date-time","description":"When capture ended, or null while capture is open or its end is unknown."}}},"VoiceCallRecordingID":{"type":"string","minLength":1,"pattern":"^vrc_[0-9a-hjkmnp-tv-z]{26}$","example":"vrc_01krdgeqcxet5s7t44vh8rt9mg"},"VoiceLegRecording":{"type":"object","additionalProperties":false,"readOnly":true,"required":["id","leg_id","channel","media_id","media_started_at","started_at","ended_at"],"properties":{"id":{"$ref":"#/components/schemas/VoiceCallRecordingID","description":"Unique identifier for this view."},"leg_id":{"$ref":"#/components/schemas/VoiceCallID","description":"The leg this view belongs to."},"call_id":{"oneOf":[{"$ref":"#/components/schemas/VoiceSessionID"},{"type":"null"}],"description":"`null` on a recording captured before calls existed."},"number":{"type":"string","minLength":1,"description":"The number associated with this recording view, when one was recorded. It can be an outbound destination. Omitted for numberless calls."},"channel":{"allOf":[{"$ref":"#/components/schemas/VoiceLegChannel"}],"description":"It does not say whose voice it is."},"media_id":{"$ref":"#/components/schemas/VoiceCallMediaID","description":"The stream this view refers to. A stream captured on another leg or omitted by retention or truncation may be absent from `media` in this response."},"media_started_at":{"type":"string","minLength":1,"format":"date-time","description":"When the referenced stream started, which a view captured from the far leg does not share with its own `started_at`."},"started_at":{"type":"string","minLength":1,"format":"date-time"},"ended_at":{"type":["string","null"],"minLength":1,"format":"date-time","description":"When capture ended, or null while capture is open or its end is unknown."}}},"VoiceLegTranscriptSource":{"type":"string","x-extensible-enum":["whole","aligned","live"],"description":"What the times in `cues` are worth: `whole` for a pass that times nothing, `aligned` for offline forced alignment, `live` for a streaming producer.","example":"whole"},"VoiceLegTranscript":{"type":"object","additionalProperties":false,"readOnly":true,"required":["id","leg_id","media_id","media_started_at","state","source","channel","cues","created_at"],"properties":{"id":{"$ref":"#/components/schemas/VoiceCallTranscriptID","description":"Unique identifier for this attempt."},"leg_id":{"$ref":"#/components/schemas/VoiceCallID","description":"The leg the transcribed stream was captured from."},"call_id":{"oneOf":[{"$ref":"#/components/schemas/VoiceSessionID"},{"type":"null"}],"description":"`null` on a transcript of a stream captured before calls existed."},"media_id":{"$ref":"#/components/schemas/VoiceCallMediaID","description":"The stream this attempt describes."},"media_started_at":{"type":"string","minLength":1,"format":"date-time","description":"When that stream started. A transcript is retained with the stream it describes rather than on its own transcription lag."},"state":{"allOf":[{"$ref":"#/components/schemas/VoiceLegTranscriptState"}]},"source":{"allOf":[{"$ref":"#/components/schemas/VoiceLegTranscriptSource"}]},"model":{"type":"string","description":"The model that produced it."},"channel":{"allOf":[{"$ref":"#/components/schemas/VoiceLegChannel"}],"description":"The direction of the transcribed stream."},"cues":{"type":"array","description":"The transcript, in order. Concatenating cues across streams reads as prose nobody spoke, and a reader matching over it can match the wrong party's words.","items":{"$ref":"#/components/schemas/VoiceLegTranscriptCue"}},"source_party":{"oneOf":[{"$ref":"#/components/schemas/VoiceParty"},{"type":"null"}],"description":"The party this audio was captured from, which is what says whose voice it\ncarries. `channel` only says which direction of the leg the stream came\nfrom. A recording view's `number` identifies a number associated with\nthat view, which can be an outbound destination.\n\n`null` on a stream stored before the platform recorded a party for it.\n"},"created_at":{"type":"string","minLength":1,"format":"date-time"}}},"VoiceLegRecordings":{"type":"object","additionalProperties":false,"readOnly":true,"required":["media","recordings","transcripts","truncated","evaluated_at"],"properties":{"media":{"type":"array","description":"The stored audio this read covers, each stream once.","items":{"$ref":"#/components/schemas/VoiceLegRecordingMedia"}},"recordings":{"type":"array","description":"Each leg's view of that audio.","items":{"$ref":"#/components/schemas/VoiceLegRecording"}},"transcripts":{"type":"array","description":"Every transcription attempt over that audio, including failed ones.","items":{"$ref":"#/components/schemas/VoiceLegTranscript"}},"truncated":{"type":"boolean","description":"Whether a collection above was cut at this read's per-collection limit of\n500. When `true`, there is more than is shown here and this response is not\nthe whole set.\n\n`false` means no collection hit that limit, and a collection that could\nnot be read in full fails the request rather than returning a short\nanswer. What `false` does not establish is that every recording made has\narrived: delivery into this store is asynchronous, so a recording made\nmoments ago can be absent from a complete read.\n"},"evaluated_at":{"type":"string","minLength":1,"format":"date-time","description":"The instant each collection's retention was decided at. Nothing here stays true because you are still holding the response. A recording can expire after it."}}},"VoiceRecordingDisposition":{"type":"string","enum":["inline","attachment"],"default":"inline","description":"Whether a signed audio URL plays the recording or saves it. The signature carries this, so it cannot be changed after the URL is minted.\n","example":"inline"},"VoiceSequenceExpressionEnvironment":{"type":"string","minLength":1,"enum":["bird.cel.v1"],"description":"Expression language used by explicitly marked values in a voice sequence definition."},"VoiceSequenceDefinitionNode":{"type":"object","additionalProperties":true,"description":"An authored node object. Drafts retain incomplete configuration, input and connections for later validation. Connections map output port names to objects with explicit node_id and port fields; validation reports incomplete or invalid targets. Omitted connections or an empty map leaves every output unconnected, with behavior determined by the node contract."},"VoiceSequencePortSample":{"type":"object","additionalProperties":false,"required":["node_id","port","output"],"properties":{"node_id":{"$ref":"#/components/schemas/VoiceSequenceNodeID"},"port":{"$ref":"#/components/schemas/AutomationPortKey"},"output":{"type":"object","additionalProperties":true,"x-go-type-skip-optional-pointer":true,"description":"Original hypothetical output matching the resolved port schema, limited to 128 KiB. A webhook sample must also fit its 16 KiB native outcome envelope; business ports use the configured object schema and failure uses a fixed technical error code. Gather digits and reason must match collection constraints and the selected port. Private gather results are checked before removal from returned steps."}}},"VoiceSequenceCompletionSample":{"type":"object","additionalProperties":false,"required":["node_id","completion"],"properties":{"node_id":{"$ref":"#/components/schemas/VoiceSequenceNodeID"},"completion":{"type":"string","minLength":9,"maxLength":9,"const":"completed","description":"Hypothetical completion of a managed builtin transfer. No media effects run during preview."}}},"VoiceSequencePreviewSample":{"oneOf":[{"$ref":"#/components/schemas/VoiceSequencePortSample"},{"$ref":"#/components/schemas/VoiceSequenceCompletionSample"}],"description":"A hypothetical node outcome. Managed builtin transfers use explicit completion; nodes with output ports use a port and its output. These forms cannot be combined."},"VoiceSequenceSavedExecutionEndpoint":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"type":"string","minLength":1,"maxLength":128}}},"VoiceSequenceSavedExecutionParty":{"type":["object","null"],"additionalProperties":false,"required":["endpoint"],"description":"Saved hypothetical party, or null for an absent observation. Strings may be stale; explicit preview and evaluation validate endpoint types and telephone addresses.","properties":{"endpoint":{"$ref":"#/components/schemas/VoiceSequenceSavedExecutionEndpoint"},"address":{"type":"string","minLength":1,"maxLength":128},"overdial_suffix":{"type":"string","description":"Digits appended to the destination number; leading zeroes are preserved. Only the destination party supplies this fact; a value on the origin is ignored.","minLength":1,"maxLength":16,"pattern":"^[0-9]+$"}}},"VoiceSequenceSavedExecutionCallSample":{"type":"object","additionalProperties":false,"required":["id","session_id","orig","dest"],"description":"Saved hypothetical root call identities. Strings may be stale; explicit preview and evaluation require valid typed identifiers.","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"session_id":{"type":"string","minLength":1,"maxLength":128},"orig":{"$ref":"#/components/schemas/VoiceSequenceSavedExecutionParty"},"dest":{"$ref":"#/components/schemas/VoiceSequenceSavedExecutionParty"}}},"VoiceSequenceSavedExecutionSample":{"type":"object","additionalProperties":false,"required":["id","started_at","call"],"description":"Saved hypothetical values, which may be stale or incomplete in meaning. Each string is nonempty and limited to 128 bytes. Explicit preview and evaluation require valid typed identifiers and a timestamp.","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"started_at":{"type":"string","minLength":1,"maxLength":128},"call":{"$ref":"#/components/schemas/VoiceSequenceSavedExecutionCallSample"}}},"VoiceSequenceSavedPreview":{"type":"object","additionalProperties":false,"x-sensitive":true,"required":["trigger_node_id","trigger_data"],"description":"Saved authoring scenario. Values are checked against node contracts only when explicitly submitted to preview or evaluation.","properties":{"trigger_node_id":{"$ref":"#/components/schemas/VoiceSequenceNodeID"},"trigger_data":{"type":"object","additionalProperties":true},"node_samples":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/VoiceSequencePreviewSample"}},"execution_sample":{"$ref":"#/components/schemas/VoiceSequenceSavedExecutionSample"}}},"VoiceSequencePresentation":{"type":"object","additionalProperties":true,"properties":{"preview":{"$ref":"#/components/schemas/VoiceSequenceSavedPreview","description":"Saved hypothetical authoring samples. Save checks their shape; preview and evaluation check their meaning only when explicitly submitted. These values never supply live call context or results. They remain part of retained drafts, versions and frozen definitions, including when a gather is private."}},"description":"Optional editor layout, labels and saved authoring samples. These fields do not drive execution. Their bytes still count toward definition and execution size limits."},"VoiceSequenceDefinition":{"type":"object","additionalProperties":false,"x-go-type-skip-optional-pointer":true,"required":["schema_version","expression_environment","nodes"],"properties":{"schema_version":{"type":"integer","enum":[1],"description":"Version of the voice graph definition envelope.","example":1},"expression_environment":{"$ref":"#/components/schemas/VoiceSequenceExpressionEnvironment"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/VoiceSequenceDefinitionNode"},"description":"Nodes keyed by stable IDs. Incomplete node objects may be saved in a draft. Array order has no execution meaning."},"settings":{"type":"object","additionalProperties":true,"description":"Sequence policies being authored. Omission leaves the definition without explicit settings."},"presentation":{"$ref":"#/components/schemas/VoiceSequencePresentation"}}},"VoiceSequenceRunID":{"type":"string","minLength":1,"pattern":"^vsr_[0-9a-hjkmnp-tv-z]{26}$","example":"vsr_01krdgeqcxet5s7t44vh8rt9mg"},"VoiceCallSequence":{"type":"object","additionalProperties":false,"required":["id","run_id"],"properties":{"id":{"readOnly":true,"oneOf":[{"$ref":"#/components/schemas/VoiceSequenceID"},{"type":"null"}],"description":"Voice sequence selected for this call. Null for a call that ran an inline definition."},"run_id":{"readOnly":true,"$ref":"#/components/schemas/VoiceSequenceRunID","description":"Run created from the sequence's frozen publication or the call's inline definition."}}},"VoiceCall":{"type":"object","additionalProperties":false,"description":"A call summary. Call reads report observed state. Call creation returns an immutable acceptance snapshot: `started_at` and `ended_at` are `null`, the boolean observation fields are `false`, and `parties` is empty. Replays return that same snapshot after the call progresses.","required":["id","workspace_id","initial_leg_id","direction","started_at","live","has_recording","has_transcript","parties"],"properties":{"id":{"readOnly":true,"$ref":"#/components/schemas/VoiceSessionID","description":"Unique identifier for this call, shared by every leg that belongs to it."},"workspace_id":{"readOnly":true,"$ref":"#/components/schemas/WorkspaceID"},"initial_leg_id":{"readOnly":true,"$ref":"#/components/schemas/VoiceCallID","description":"The initial leg identity. For an accepted outbound call, this identity is reserved before the leg starts."},"direction":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/VoiceCallDirection"}],"description":"Direction of the initial leg."},"started_at":{"readOnly":true,"type":["string","null"],"minLength":1,"format":"date-time","description":"When the initial leg started. `null` in the acceptance snapshot returned by call creation.","example":"2026-05-21T12:00:00Z"},"ended_at":{"readOnly":true,"type":["string","null"],"format":"date-time","description":"When the call's last leg ended. `null` while any leg is still in progress. Recordings and transcripts can still arrive after this instant, so it does not mean the call is finished being written."},"live":{"readOnly":true,"type":"boolean","description":"Whether any leg in the call is still held live. A leg stays live until its end is recorded or, when no end is observed, until its liveness window expires, so this can remain `true` briefly after a disconnect. `false` covers the interval between a leg ending and its settlement being confirmed, and says nothing about whether transcription has finished.","example":false},"has_recording":{"readOnly":true,"type":"boolean","description":"Whether the call ever produced a recording. It stays `true` for the life of the call, so it records that a recording was made rather than promising one can still be fetched.","example":false},"has_transcript":{"readOnly":true,"type":"boolean","description":"Whether the call ever produced a transcript. A failed transcription attempt does not set it, and a later failure does not clear it.","example":false},"parties":{"readOnly":true,"type":"array","description":"The distinct participant observations the call's legs recorded, for display beside the call. The length is not a count of people and not a reconstruction of the leg graph.","items":{"$ref":"#/components/schemas/VoiceParty"}},"sequence":{"readOnly":true,"$ref":"#/components/schemas/VoiceCallSequence","description":"Sequence and run accepted for this outbound call. Present in the immutable acceptance snapshot returned by call creation. Current call detail and list reads omit this property, including for calls created from a sequence."}}},"VoiceSequencePhoneNumber":{"type":"string","minLength":5,"maxLength":16,"pattern":"^\\+[1-9][0-9]{3,14}$","description":"Canonical E.164 phone number, with a leading plus sign and four to fifteen digits."},"CreateVoiceCallSequenceRequest":{"type":"object","additionalProperties":false,"description":"Supply exactly one of `id`, to run a saved sequence's active publication, or `definition`, to run a sequence once without saving it.","required":["entry_node_id","trigger_data"],"properties":{"id":{"$ref":"#/components/schemas/VoiceSequenceID","description":"Published voice sequence to run after the recipient answers."},"definition":{"allOf":[{"$ref":"#/components/schemas/VoiceSequenceDefinition"}],"x-go-type-skip-optional-pointer":false,"description":"Complete sequence definition to run once after the recipient answers. It must pass the same checks as publishing a sequence, is frozen when the call is accepted, and creates no saved sequence."},"entry_node_id":{"$ref":"#/components/schemas/VoiceSequenceNodeID","description":"Voice call entry node to start."},"trigger_data":{"type":"object","additionalProperties":true,"description":"Data matching the selected entry's configured schema, limited to 16 KiB before and after normalization. Use an empty object when the entry needs no data. Fields remain application data and cannot provide trusted call identity or routing authority."}},"oneOf":[{"required":["id"]},{"required":["definition"]}]},"CreateVoiceCallRequest":{"type":"object","additionalProperties":false,"x-sensitive":true,"required":["from","to","sequence"],"properties":{"from":{"$ref":"#/components/schemas/VoiceSequencePhoneNumber","description":"Calling number that this workspace is permitted to present."},"to":{"$ref":"#/components/schemas/VoiceSequencePhoneNumber","description":"Recipient number in canonical E.164 form."},"ringing_timeout_seconds":{"type":"integer","minimum":5,"maximum":120,"default":30,"description":"Maximum ringing time for the original dialing attempt, shared across routing candidates."},"sequence":{"$ref":"#/components/schemas/CreateVoiceCallSequenceRequest"}}},"VoiceCallTranscriptCue":{"type":"object","additionalProperties":false,"readOnly":true,"required":["party","start_at","end_at","text"],"properties":{"party":{"type":["integer","null"],"minimum":0,"description":"Index into the transcript's `parties` of the party who spoke this cue,\nthe party its stream was captured from. `null` on a stream with no recorded\nparty.\n"},"start_at":{"type":["string","null"],"format":"date-time","description":"When this cue began, measured on its stream. `null` on a transcript that timed nothing, whose cues are placed at their stream's start."},"end_at":{"type":["string","null"],"format":"date-time","description":"When this cue ended. `null` on the same terms as `start_at`."},"text":{"type":"string","minLength":1,"description":"What was transcribed for this cue."}}},"VoiceCallTranscript":{"type":"object","additionalProperties":false,"readOnly":true,"required":["call_id","parties","cues","complete","evaluated_at"],"properties":{"call_id":{"$ref":"#/components/schemas/VoiceSessionID"},"parties":{"type":"array","description":"Each distinct stored party heard in `cues`, once. A stream with no recorded party adds nothing here; its cues carry a `null` party.","items":{"$ref":"#/components/schemas/VoiceParty"}},"cues":{"type":"array","description":"Every cue of the call in spoken order. A cue without times sits at the start of its stream.","items":{"$ref":"#/components/schemas/VoiceCallTranscriptCue"}},"complete":{"type":"boolean","description":"`false` when a stream's every transcription failed, or the read was cut\nat its limit. `true` does not mean every stream has cues: a stream where\nnothing was heard, one never transcribed, or one whose transcript has not\narrived yet contributes none and leaves this `true`.\n"},"evaluated_at":{"type":"string","minLength":1,"format":"date-time","description":"The instant retention was decided at. A transcript can expire after it."}}},"VoiceDestinationDailySpendLimit":{"type":"object","additionalProperties":false,"required":["limit","used","remaining","resets_at"],"properties":{"limit":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"The most your workspace can spend on calls to this country each day, in your organization's wallet currency. Calls are also held to the workspace's own daily limit, and whichever is reached first refuses the call.\n"},"used":{"oneOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Used toward today's limit for this country, including calls in progress. A call counts its expected cost when it starts; the part it did not use returns when it is billed. Null when today's usage cannot be read right now; the limit is still enforced.\n"},"remaining":{"oneOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"What is left of this country's limit today, never below zero. Null when today's usage cannot be read."},"resets_at":{"type":"string","format":"date-time","minLength":1,"description":"When usage resets to zero, at midnight UTC.","example":"2026-10-09T00:00:00Z"}}},"VoiceDestination":{"type":"object","additionalProperties":false,"required":["country_code","country_name","enabled","status","high_risk_destination","daily_spend_limit"],"properties":{"country_code":{"allOf":[{"$ref":"#/components/schemas/CountryCode"}],"readOnly":true},"country_name":{"type":"string","minLength":1,"description":"Full English country name.","example":"Netherlands","readOnly":true},"dial_code":{"type":"string","description":"International dialling prefix, without the leading plus. Absent for countries that have none.","example":"31","readOnly":true},"region":{"allOf":[{"$ref":"#/components/schemas/DestinationRegion"}],"readOnly":true},"super_region":{"allOf":[{"$ref":"#/components/schemas/DestinationSuperRegion"}],"readOnly":true},"enabled":{"type":"boolean","description":"Whether your workspace has enabled calling to this country."},"status":{"type":"string","minLength":1,"x-extensible-enum":["available","not_supported"],"description":"This country's Voice callability at the destination level, independent of your enabled setting. `available` means we place calls there; `not_supported` means we do not.\n","readOnly":true},"high_risk_destination":{"type":"boolean","description":"Whether we treat this country as a high-risk calling destination.","readOnly":true},"daily_spend_limit":{"oneOf":[{"$ref":"#/components/schemas/VoiceDestinationDailySpendLimit"},{"type":"null"}],"description":"Your workspace's daily spend limit for calls to this country and today's usage toward it. It applies whether or not the country is enabled, including to verification calls. Null when you have not set one, before your organization has a wallet, or while your wallet currency cannot be read; a limit you set is still enforced then.\n","readOnly":true}}},"VoiceDestinationList":{"type":"object","additionalProperties":false,"required":["data","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VoiceDestination"},"description":"The Voice destination countries, each annotated with your workspace's enabled setting."},"total":{"type":"integer","format":"int64","description":"Total number of destination countries."}}},"VoiceDestinationDailySpendLimitUpdate":{"type":"object","description":"Sets or removes this country's daily spend limit; omit it to leave the limit unchanged. Once today's spend reaches the limit, new calls to the country are refused, verification calls included, whether or not it is enabled; a call already in progress is not cut off, so spend can pass the limit by what that call costs.\n","additionalProperties":false,"required":["limit"],"properties":{"limit":{"oneOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The daily spend limit for calls to this country, in your organization's wallet currency, from zero up to the workspace's `max_limit` in Voice settings, with at most six decimal places. Setting an amount needs an organization wallet; removing one does not. Null removes it, so only the workspace's daily limit applies.\n"}}},"DestinationSetting":{"type":"object","additionalProperties":false,"required":["country_code"],"properties":{"country_code":{"$ref":"#/components/schemas/CountryCode"},"enabled":{"type":"boolean","description":"Whether to enable (`true`) or disable (`false`) this destination country. Omit it to leave the country's enabled setting unchanged.\n","example":true},"daily_spend_limit":{"$ref":"#/components/schemas/VoiceDestinationDailySpendLimitUpdate"}}},"VoiceDestinationsUpdate":{"type":"object","additionalProperties":false,"required":["destinations"],"properties":{"destinations":{"type":"array","items":{"$ref":"#/components/schemas/DestinationSetting"},"description":"The destination countries to change. Only the countries listed here change, and only the fields you send; anything else keeps its current setting. A country listed more than once takes its last `enabled`, but may set or remove `daily_spend_limit` only once. A limit can be set only on a country the Voice service supports; removing one accepts any country code. Otherwise the request is rejected and nothing changes.\n","example":[{"country_code":"NL","enabled":true},{"country_code":"GB","enabled":false,"daily_spend_limit":{"limit":{"amount":"25.00","currency_code":"EUR"}}}]}}},"EsimZoneSortField":{"type":"string","enum":["created_at"],"default":"created_at","description":"Field to sort zones by. Only `created_at` is supported."},"EsimZoneList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EsimZone"},"description":"Zones, newest first."}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"EsimOfferSortField":{"type":"string","enum":["created_at"],"default":"created_at","description":"Field to sort offers by. Only `created_at` is supported."},"EsimOfferPhoneInclusion":{"type":"string","minLength":1,"enum":["always","on_request"],"description":"How the plan provides a phone number.\n\n- `always`: a phone number is included with each eSIM purchased from the offer.\n- `on_request`: reserved for offers with an optional phone number; currently unavailable.\n","example":"always"},"EsimOfferPhone":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Phone service included with the plan. Every eSIM sold from the offer gets its own phone number; each flag states one direction of service on that number. A false flag means the plan does not include that service.\n","required":["included","voice_inbound","voice_outbound","sms_inbound","sms_outbound"],"properties":{"included":{"$ref":"#/components/schemas/EsimOfferPhoneInclusion"},"voice_inbound":{"type":"boolean","description":"The eSIM can receive calls on its phone number.","example":false},"voice_outbound":{"type":"boolean","description":"The eSIM can place calls.","example":false},"sms_inbound":{"type":"boolean","description":"The eSIM can receive text messages on its phone number.","example":true},"sms_outbound":{"type":"boolean","description":"The eSIM can send text messages.","example":false}},"example":{"included":"always","voice_inbound":false,"voice_outbound":false,"sms_inbound":true,"sms_outbound":false}},"EsimOfferData":{"type":"object","additionalProperties":false,"description":"Data allowance of a bundle.","required":["amount_bytes"],"properties":{"amount_bytes":{"type":"integer","minimum":1,"readOnly":true,"description":"Total data allowance in bytes.","example":10737418240},"throttled_after_bytes":{"type":["integer","null"],"minimum":1,"readOnly":true,"description":"Data amount in bytes after which speed is reduced instead of cut off. Null when the allowance is a hard cap.\n"}}},"EsimOfferValidityType":{"type":"string","minLength":1,"enum":["one_time","recurring"],"description":"How the validity period behaves. one_time runs once and expires; recurring renews for a further period each time it lapses."},"EsimOfferValidityUnit":{"type":"string","minLength":1,"enum":["day","month"],"description":"Unit of the validity period."},"EsimOfferValidity":{"type":"object","additionalProperties":false,"description":"How long a package from this offer stays usable. one_time offers run once for the given period after activation; recurring offers renew for a further period each time it lapses. Match on type and treat an unrecognized value as an offer your integration cannot order.\n","required":["type","unit","value"],"properties":{"type":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimOfferValidityType"}]},"unit":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimOfferValidityUnit"}]},"value":{"type":"integer","minimum":1,"readOnly":true,"description":"Number of units per period.","example":30},"minimum_periods":{"type":["integer","null"],"minimum":1,"readOnly":true,"description":"For recurring offers, the minimum number of periods committed. Null when there is no minimum, and for one_time offers."}}},"EsimOfferBundlePricing":{"type":"object","additionalProperties":false,"description":"Fixed-allowance terms: a data allowance with a validity period, charged once per provisioned package.\n","required":["type","data","validity","price"],"properties":{"type":{"type":"string","minLength":1,"const":"bundle","readOnly":true,"description":"Pricing type."},"data":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimOfferData"}]},"validity":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimOfferValidity"}],"description":"Validity of packages created from this offer. The period starts at activation, which happens on first use in the coverage zone. The effective validity is capped by the eSIM's service period: see the package's expires_at for the real expiry.\n"},"price":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"What your workspace is billed per package provisioned from this offer."}}},"EsimOfferSummary":{"type":"object","additionalProperties":false,"description":"Compact offer row for lists: the full offer minus the embedded zone. Fetch the offer or its zone for the country list.\n","required":["activation_window_days","id","name","revision","zone_id","speed","stackable","phone","pricing","product","status","created_at"],"properties":{"activation_window_days":{"type":["integer","null"],"minimum":1,"maximum":3650,"readOnly":true,"description":"Guaranteed days from purchase (order acceptance) to first network use for a new eSIM. The activation window is separate from package validity. Null means the activation window is unconfirmed, not unlimited. This window does not restart when topping up an existing eSIM.\n"},"id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimOfferID"}]},"name":{"type":"string","minLength":1,"readOnly":true,"description":"Display name of the offer.","example":"Europe 10 GB / 30 days"},"revision":{"type":"integer","minimum":1,"readOnly":true,"description":"Increments whenever the offer's terms change. Orders lock the revision they were quoted at."},"zone_id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimZoneID"}],"description":"Coverage zone the offer sells. Offers for the same footprint share one zone."},"speed":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimSpeed"}],"description":"Speed class. For reduced-speed offers, the bundle's data.throttled_after_bytes carries the full-speed allowance."},"stackable":{"type":"boolean","readOnly":true,"description":"Whether packages from this offer can be held alongside packages from other zones on the same eSIM, subject to the eSIM's package_limit."},"phone":{"readOnly":true,"description":"Phone service that comes with the plan, or null when the plan includes no phone number. When present, `included` says how the number is provided and the flags state which call and text directions work.\n","oneOf":[{"$ref":"#/components/schemas/EsimOfferPhone"},{"type":"null"}]},"pricing":{"readOnly":true,"description":"Commercial terms of the offer. Every offer in the current catalog is a bundle: a fixed allowance with a validity period for a fixed price. Match on the pricing type; treat an unrecognized type as an offer your integration cannot order yet.\n","oneOf":[{"$ref":"#/components/schemas/EsimOfferBundlePricing"}]},"product":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/BillingProductSlug"}],"description":"Billing product the offer's charges post under, as it appears on your invoice line items."},"status":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimOfferStatus"}]},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true}}},"EsimOfferList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EsimOfferSummary"},"description":"Offers, newest first."}}},{"$ref":"#/components/schemas/_ListEnvelopeWithTotal"}]},"EsimOffer":{"type":"object","additionalProperties":false,"description":"A purchasable offer from the curated catalog: the commercial terms for prepaid data in one coverage zone, priced as your workspace is billed. The coverage itself lives on the referenced zone, shared by every offer selling the same footprint.\n","required":["activation_window_days","id","name","revision","zone_id","zone","speed","stackable","phone","pricing","product","status","created_at"],"properties":{"activation_window_days":{"type":["integer","null"],"minimum":1,"maximum":3650,"readOnly":true,"description":"Guaranteed days from purchase (order acceptance) to first network use for a new eSIM. The activation window is separate from package validity. Null means the activation window is unconfirmed, not unlimited. This window does not restart when topping up an existing eSIM.\n"},"id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimOfferID"}]},"name":{"type":"string","minLength":1,"readOnly":true,"description":"Display name of the offer.","example":"Europe 10 GB / 30 days"},"revision":{"type":"integer","minimum":1,"readOnly":true,"description":"Increments whenever the offer's terms change. Orders lock the revision they were quoted at."},"zone_id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimZoneID"}],"description":"Coverage zone the offer sells. Offers for the same footprint share one zone."},"zone":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimZone"}],"description":"The offer's coverage zone, embedded so one read answers \"where does this work\". The zone resource is authoritative."},"speed":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimSpeed"}],"description":"Speed class. For reduced-speed offers, the bundle's data.throttled_after_bytes carries the full-speed allowance."},"stackable":{"type":"boolean","readOnly":true,"description":"Whether packages from this offer can be held alongside packages from other zones on the same eSIM, subject to the eSIM's package_limit."},"phone":{"readOnly":true,"description":"Phone service that comes with the plan, or null when the plan includes no phone number. When present, `included` says how the number is provided and the flags state which call and text directions work.\n","oneOf":[{"$ref":"#/components/schemas/EsimOfferPhone"},{"type":"null"}]},"pricing":{"readOnly":true,"description":"Commercial terms of the offer. Every offer in the current catalog is a bundle: a fixed allowance with a validity period for a fixed price. Match on the pricing type; treat an unrecognized type as an offer your integration cannot order yet.\n","oneOf":[{"$ref":"#/components/schemas/EsimOfferBundlePricing"}]},"product":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/BillingProductSlug"}],"description":"Billing product the offer's charges post under, as it appears on your invoice line items."},"status":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimOfferStatus"}]},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true}}},"EsimCountryRequirements":{"type":"object","additionalProperties":false,"required":["country_code","schema_revision","schema"],"properties":{"country_code":{"$ref":"#/components/schemas/CountryCode"},"schema_revision":{"$ref":"#/components/schemas/EsimSchemaRevision"},"schema":{"$ref":"#/components/schemas/EsimIdentificationSchema"}},"description":"Complete identification schema for one covered country. A country without maintained extra requirements returns the baseline schema requiring first_name, last_name, and email. Customers handle collection, validation, and compliance; Bird does not receive or verify these values."},"EsimOfferRequirements":{"type":"object","additionalProperties":false,"required":["countries"],"properties":{"countries":{"type":"array","items":{"$ref":"#/components/schemas/EsimCountryRequirements"}}},"description":"Identification guidance for the countries covered by the offer. You collect and validate the information; this response does not verify a person or authorize a purchase."},"EsimOrderList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EsimOrder"},"description":"Orders, newest first."}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"EsimOrderRecurrence":{"type":"object","additionalProperties":false,"description":"Buy the first package and enable automatic renewal in one purchase. Requires subscriber_id, offer_revision and Idempotency-Key. Omit esim_id and expected_price.\n","required":["recurrence_revision","accepted_price"],"properties":{"recurrence_revision":{"type":"integer","minimum":1,"description":"The accepted recurring configuration revision."},"accepted_price":{"$ref":"#/components/schemas/Money"}}},"EsimOrderCreate":{"type":"object","additionalProperties":false,"description":"Request to purchase a data package. Without esim_id, a new eSIM is provisioned carrying the package. With esim_id, the package is added to that eSIM: a new coverage zone stacks alongside existing packages, the same zone adds a further package for it, subject to the eSIM's package_limit and speed class.\n","not":{"required":["esim_id","subscriber_id"],"properties":{"esim_id":{},"subscriber_id":{}}},"required":["offer_id"],"properties":{"offer_id":{"allOf":[{"$ref":"#/components/schemas/EsimOfferID"}],"description":"Offer to purchase."},"esim_id":{"allOf":[{"$ref":"#/components/schemas/EsimID"}],"description":"Existing eSIM to add the package to. Omit to provision a new eSIM."},"subscriber_id":{"allOf":[{"$ref":"#/components/schemas/EsimSubscriberID"}],"description":"Person to assign the new eSIM to when delivery completes. Must be a subscriber in this workspace. Omit to leave it unassigned. Supplying it with esim_id returns 422; top-ups retain the existing assignment. An unknown subscriber or one outside this workspace returns 404 before charging. Identification guidance does not gate purchase."},"offer_revision":{"type":"integer","minimum":1,"description":"The offer revision you are quoting from. When set and the offer has since moved to a newer revision, the order is refused with a conflict instead of charging a price you did not see. Omitted, the current revision is used."},"recurrence":{"$ref":"#/components/schemas/EsimOrderRecurrence"},"expected_price":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"The price you displayed to the buyer. When set and the workspace's current resolved price differs, the order is refused with a conflict instead of charging a different amount. Catches billing-rate changes, which move independently of the offer revision."},"display_name":{"type":"string","maxLength":120,"description":"Free-text label for the new eSIM, for your own reference. Ignored when esim_id is set.","example":"Amsterdam trip, order 8812"},"tags":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/Tag"},"description":"Tags for the new eSIM, echoed on its lifecycle webhook events. Ignored when esim_id is set."},"metadata":{"type":"object","additionalProperties":true,"description":"Your own key-value data for the new eSIM, echoed on its lifecycle webhook events. Maximum 2 KB serialized. Ignored when esim_id is set."},"acknowledge_shortened_validity":{"type":"boolean","description":"Set to true to accept a validity cut short by the eSIM's service period. Without it, an order whose package would expire early is refused with a conflict that states the effective validity."}},"oneOf":[{"not":{"required":["recurrence"],"properties":{"recurrence":{}}}},{"required":["recurrence","subscriber_id","offer_revision"],"not":{"anyOf":[{"required":["esim_id"],"properties":{"esim_id":{}}},{"required":["expected_price"],"properties":{"expected_price":{}}}]}}]},"EsimRecurrenceDeliveryMode":{"type":"string","minLength":1,"description":"Relationship between the paid period and package delivery.\n\n- `exact_period`: the package covers the accepted paid interval.\n- `recurring_top_up`: each funded period purchases a standard package. Activation, expiry, and accumulation follow that package’s terms.\n","enum":["exact_period","recurring_top_up"]},"EsimRecurrenceModel":{"type":"string","minLength":1,"description":"Billing cadence for recurring packages.\n\n- `calendar_month`: periods follow calendar months from the billing anchor.\n- `fixed_days`: each period lasts the stated number of 24-hour days.\n","enum":["calendar_month","fixed_days"]},"EsimCheckoutFunding":{"type":"object","additionalProperties":false,"description":"Current funding needed for this purchase, including tax and approved credit. The quoted price excludes tax; `total` includes tax for this purchase. This read reserves no funds; payment checks funding again. Test purchases have zero tax and total and are always covered.","required":["tax_amount","total","covered","shortfall"],"properties":{"tax_amount":{"$ref":"#/components/schemas/Money","description":"Tax included in the purchase total."},"total":{"$ref":"#/components/schemas/Money","description":"Total wallet charge for this purchase, including tax."},"covered":{"type":"boolean","description":"Whether the wallet can currently cover this purchase after reservations and approved credit."},"shortfall":{"oneOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Additional funds needed to cover this purchase, or null without organization billing read permission. Zero when covered is true."}}},"EsimCheckoutOneTime":{"type":"object","additionalProperties":false,"description":"Published one-time price and current funding requirement. The `price` excludes tax; `funding.total` includes tax.","required":["offer_revision","price","funding"],"properties":{"funding":{"$ref":"#/components/schemas/EsimCheckoutFunding"},"offer_revision":{"type":"integer","minimum":1,"description":"The offer revision to accept when purchasing."},"price":{"$ref":"#/components/schemas/Money","description":"Price before tax to accept when creating the order."}}},"EsimCheckoutRecurringQuote":{"type":"object","additionalProperties":false,"description":"Published recurring terms and current funding requirement. The `price` excludes tax; `funding.total` includes tax for the first period. The first period starts when payment is funded, and cancellation stops future renewal while preserving paid packages.","required":["delivery_mode","offer_revision","recurrence_revision","price","model","interval_count","funding"],"properties":{"funding":{"$ref":"#/components/schemas/EsimCheckoutFunding"},"delivery_mode":{"$ref":"#/components/schemas/EsimRecurrenceDeliveryMode"},"offer_revision":{"type":"integer","minimum":1,"description":"The offer revision to accept when purchasing."},"recurrence_revision":{"type":"integer","minimum":1,"description":"The recurring configuration revision to accept when purchasing."},"price":{"$ref":"#/components/schemas/Money","description":"Price before tax for the first period and each renewal."},"model":{"$ref":"#/components/schemas/EsimRecurrenceModel"},"interval_count":{"type":"integer","minimum":1,"maximum":366,"description":"The number of calendar months or fixed 24-hour days per period."}}},"EsimCheckoutUnavailableReason":{"type":"string","enum":["not_configured","price_unavailable","no_eligible_route"],"description":"Renewal is not configured, has no published price, or has no eligible mobile network. A failed lookup returns an error instead."},"EsimCheckoutRecurrence":{"type":"object","additionalProperties":false,"description":"When available is true, quote contains the recurring terms and unavailable_reason is null. Otherwise quote is null and unavailable_reason explains why renewal is unavailable.","required":["available","quote","unavailable_reason"],"properties":{"available":{"type":"boolean","description":"Whether automatic renewal is currently available for a new eSIM."},"quote":{"oneOf":[{"$ref":"#/components/schemas/EsimCheckoutRecurringQuote"},{"type":"null"}]},"unavailable_reason":{"oneOf":[{"$ref":"#/components/schemas/EsimCheckoutUnavailableReason"},{"type":"null"}]}},"oneOf":[{"properties":{"available":{"enum":[true]},"quote":{"$ref":"#/components/schemas/EsimCheckoutRecurringQuote"},"unavailable_reason":{"not":{"type":"string"}}}},{"properties":{"available":{"enum":[false]},"quote":{"not":{"type":"object"}},"unavailable_reason":{"$ref":"#/components/schemas/EsimCheckoutUnavailableReason"}}}]},"EsimCheckoutOptions":{"type":"object","additionalProperties":false,"description":"Published purchase terms. Renewal availability is a preview and does not reserve stock.","required":["offer_id","one_time","recurrence"],"properties":{"offer_id":{"$ref":"#/components/schemas/EsimOfferID"},"one_time":{"$ref":"#/components/schemas/EsimCheckoutOneTime"},"recurrence":{"$ref":"#/components/schemas/EsimCheckoutRecurrence"}}},"EsimRecurringOffer":{"type":"object","additionalProperties":false,"description":"The published recurring package price and cadence. Calendar months follow the billing anchor; fixed days use the stated number of 24-hour days.","required":["delivery_mode","offer_id","model","interval_count","revision","price"],"properties":{"delivery_mode":{"$ref":"#/components/schemas/EsimRecurrenceDeliveryMode"},"offer_id":{"$ref":"#/components/schemas/EsimOfferID"},"model":{"$ref":"#/components/schemas/EsimRecurrenceModel"},"interval_count":{"type":"integer","minimum":1,"maximum":366,"description":"The number of calendar months or fixed days in each period."},"revision":{"type":"integer","minimum":1,"description":"The recurring configuration revision to accept."},"price":{"$ref":"#/components/schemas/Money"}}},"EsimRecurringSubscriptionStatus":{"type":"string","minLength":1,"description":"Delivery state of the recurring service. Check payment and renewal fields separately.\n\n- `pending`: enrollment or the initial purchase is still being processed.\n- `active`: the service has delivered a package and remains active.\n- `needs_attention`: delivery or a related credit remains unresolved. Check period history and the associated order before purchasing a replacement.\n- `ended`: recurrence has ended. Previously delivered packages keep their own validity.\n","enum":["pending","active","needs_attention","ended"]},"EsimRecurringSubscription":{"type":"object","additionalProperties":false,"description":"Recurring service for an assigned eSIM or a pending initial purchase. Paid periods and delivered connectivity have separate states. Ending recurrence preserves the profile and separately purchased packages.","required":["delivery_mode","id","esim_id","initial_order_id","subscriber_id","offer_id","status","billing_status","current_period_start","current_period_end","cancel_at_period_end","latest_order_id","created_at","price","model","interval_count","next_renewal_at","cancellation_effective_at","stop_reason"],"properties":{"delivery_mode":{"$ref":"#/components/schemas/EsimRecurrenceDeliveryMode"},"id":{"$ref":"#/components/schemas/EsimRecurringSubscriptionID"},"esim_id":{"oneOf":[{"$ref":"#/components/schemas/EsimID"},{"type":"null"}],"description":"The provisioned eSIM, or null while the initial purchase is pending."},"initial_order_id":{"oneOf":[{"$ref":"#/components/schemas/EsimOrderID"},{"type":"null"}],"description":"The initial purchase order, or null when recurrence was enrolled on an existing eSIM."},"subscriber_id":{"$ref":"#/components/schemas/EsimSubscriberID"},"offer_id":{"$ref":"#/components/schemas/EsimOfferID"},"status":{"$ref":"#/components/schemas/EsimRecurringSubscriptionStatus"},"billing_status":{"type":["string","null"],"description":"The financial subscription state, or null while acceptance is pending."},"current_period_start":{"type":["string","null"],"format":"date-time","description":"The authoritative billing period boundary, or null while acceptance is pending."},"current_period_end":{"type":["string","null"],"format":"date-time","description":"The authoritative billing period boundary, or null while acceptance is pending."},"cancel_at_period_end":{"type":"boolean","description":"Whether future renewal is stopped at the current paid boundary."},"latest_order_id":{"oneOf":[{"$ref":"#/components/schemas/EsimOrderID"},{"type":"null"}],"description":"The order for the current billing period, or null before fulfillment starts."},"created_at":{"type":"string","minLength":1,"format":"date-time","description":"When the recurring service was requested."},"price":{"oneOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Accepted package price before tax, in its published currency. Null before Billing accepts enrollment."},"model":{"oneOf":[{"$ref":"#/components/schemas/EsimRecurrenceModel"},{"type":"null"}],"description":"Accepted cadence, or null before Billing accepts enrollment."},"interval_count":{"type":["integer","null"],"minimum":1,"maximum":366,"description":"Number of calendar months or fixed 24-hour days in each accepted period. Null before acceptance."},"next_renewal_at":{"type":["string","null"],"format":"date-time","description":"Next scheduled renewal boundary. Null when enrollment is pending or future renewals have stopped."},"cancellation_effective_at":{"type":["string","null"],"format":"date-time","description":"When canceled recurrence ends: the paid boundary for scheduled cancellation, or the recorded cancellation time for an immediate stop. Null when renewal has not been stopped or no period was accepted. Paid packages remain available under their own validity."},"stop_reason":{"oneOf":[{"$ref":"#/components/schemas/EsimRecurringStopReason"},{"type":"null"}],"description":"First recorded reason future renewal stopped. Null when no reason has been recorded. Delivery outcomes are available separately in period history."}},"anyOf":[{"properties":{"esim_id":{"$ref":"#/components/schemas/EsimID"}}},{"properties":{"initial_order_id":{"$ref":"#/components/schemas/EsimOrderID"}}}]},"EsimRecurringSubscriptionList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EsimRecurringSubscription"},"description":"Recurring services in this workspace."}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"EsimRecurringSubscriptionCreate":{"type":"object","additionalProperties":false,"description":"Starts a new paid package period on an existing assigned eSIM. The workspace organization pays; the subscriber has no personal wallet.","required":["esim_id","offer_id","offer_revision","recurrence_revision","accepted_price"],"properties":{"esim_id":{"$ref":"#/components/schemas/EsimID","description":"Assigned eSIM receiving the recurring package."},"offer_id":{"$ref":"#/components/schemas/EsimOfferID","description":"Offer whose recurring terms the buyer accepted."},"offer_revision":{"type":"integer","minimum":1,"example":1,"description":"The accepted offer revision."},"recurrence_revision":{"type":"integer","minimum":1,"example":1,"description":"The accepted recurring configuration revision."},"accepted_price":{"$ref":"#/components/schemas/Money"}}},"EsimRecurringPeriodStatus":{"type":"string","minLength":1,"description":"Delivery outcome of a paid period.\n\n- `pending`: package delivery has not been confirmed, including an uncertain network outcome.\n- `completed`: the package was delivered.\n- `failing`: delivery failed and the credit is being processed.\n- `failed`: failure processing is complete. Check `refund_transaction_id` for an issued credit.\n","enum":["pending","completed","failing","failed"]},"EsimRecurringPeriod":{"type":"object","additionalProperties":false,"description":"A funded period and its delivery outcome. Amounts retain the original charged currency and tax; free periods have no wallet transaction.","required":["delivery_mode","period_start","period_end","status","net_amount","tax_amount","total_amount","wallet_transaction_id","refund_transaction_id","order_id","order_status"],"properties":{"delivery_mode":{"$ref":"#/components/schemas/EsimRecurrenceDeliveryMode"},"period_start":{"type":"string","minLength":1,"format":"date-time","description":"Start of the funded billing period. Package activation follows the accepted delivery mode."},"period_end":{"type":"string","minLength":1,"format":"date-time","description":"End of the paid billing period. A recurring top-up package can expire at a different time; check the package’s expiry."},"status":{"$ref":"#/components/schemas/EsimRecurringPeriodStatus"},"net_amount":{"$ref":"#/components/schemas/Money"},"tax_amount":{"$ref":"#/components/schemas/Money"},"total_amount":{"$ref":"#/components/schemas/Money"},"wallet_transaction_id":{"oneOf":[{"$ref":"#/components/schemas/WalletTransactionID"},{"type":"null"}],"description":"Original wallet charge, or null for a free period."},"refund_transaction_id":{"oneOf":[{"$ref":"#/components/schemas/WalletTransactionID"},{"type":"null"}],"description":"Confirmed wallet credit after definitive failure, or null when no credit was issued."},"order_id":{"oneOf":[{"$ref":"#/components/schemas/EsimOrderID"},{"type":"null"}],"description":"Delivery order, or null before fulfillment starts."},"order_status":{"oneOf":[{"$ref":"#/components/schemas/EsimOrderStatus"},{"type":"null"}],"description":"Delivery order state, or null before fulfillment starts."}}},"EsimRecurringPeriodList":{"allOf":[{"$ref":"#/components/schemas/_ListEnvelope"},{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EsimRecurringPeriod"}}}}],"unevaluatedProperties":false},"EsimSubscriber":{"readOnly":true,"unevaluatedProperties":false,"description":"A stable person reference for eSIM service in this workspace. Editing contact details does not change this identity.","allOf":[{"type":"object","required":["id","contact_id"],"properties":{"id":{"$ref":"#/components/schemas/EsimSubscriberID"},"contact_id":{"$ref":"#/components/schemas/ContactID"}}},{"$ref":"#/components/schemas/Timestamps"}]},"EsimSubscriberList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EsimSubscriber"},"description":"Subscribers in creation order, newest first."}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"EsimSubscriberCreate":{"type":"object","additionalProperties":false,"description":"Select an existing contact in this workspace. One subscriber is kept per contact. Creating the link requires Contacts read permission and prevents Contact deletion, including after any assigned eSIM ends. Subscriber links cannot currently be removed.","required":["contact_id"],"properties":{"contact_id":{"$ref":"#/components/schemas/ContactID","description":"Existing contact in this workspace; requires Contacts read permission."}}},"EsimAssignmentID":{"type":"string","minLength":1,"pattern":"^eas_[0-9a-hjkmnp-tv-z]{26}$","example":"eas_01krdgeqcxet5s7t44vh8rt9mg"},"EsimAssignment":{"readOnly":true,"unevaluatedProperties":false,"description":"The person assigned to one eSIM. Assignment grants no workspace membership or permission to read installation credentials.","allOf":[{"type":"object","required":["id","subscriber_id","esim_id"],"properties":{"id":{"$ref":"#/components/schemas/EsimAssignmentID"},"subscriber_id":{"$ref":"#/components/schemas/EsimSubscriberID"},"esim_id":{"$ref":"#/components/schemas/EsimID"}}},{"$ref":"#/components/schemas/Timestamps"}]},"EsimAssignmentCreate":{"type":"object","additionalProperties":false,"description":"Assign an unassigned eSIM to this person. The profile must be allocated and ready, active, or suspended. Customers handle identification collection and compliance.","required":["subscriber_id"],"properties":{"subscriber_id":{"$ref":"#/components/schemas/EsimSubscriberID","description":"Subscriber in this workspace to assign to the eSIM."}}},"EsimRenewalState":{"type":"string","minLength":1,"description":"The status of the eSIM's one recurring subscription that has not ended, or `none` when it has no such subscription. The values are every `EsimRecurringSubscriptionStatus` except `ended`, plus `none`. This is subscription state, not a promise of another renewal: read the subscription's `cancel_at_period_end` for that.\n\n- `pending`: enrollment or the initial purchase is still being processed.\n- `active`: the subscription is in service. One canceled at the end of its paid period stays `active` until that boundary; read the subscription's `cancel_at_period_end` to tell them apart.\n- `needs_attention`: a delivery or a related credit remains unresolved.\n- `none`: the eSIM has no recurring subscription, or only ended ones.\n","enum":["pending","active","needs_attention","none"]},"EsimRecurringSubscriptionSummary":{"type":"object","additionalProperties":false,"description":"The eSIM's recurring subscription that has not ended. Fetch the subscription by id for its price, cadence, next charge and period history.\n","required":["subscription_id","status"],"properties":{"subscription_id":{"$ref":"#/components/schemas/EsimRecurringSubscriptionID"},"status":{"$ref":"#/components/schemas/EsimRecurringSubscriptionStatus"}}},"EsimSummary":{"type":"object","additionalProperties":false,"description":"Compact eSIM representation used in lists. Fetch the eSIM by id for the full aggregate with packages, balances, and installation state.\n","required":["id","subscriber_id","status","mode","iccid","phone_number","display_name","renewal","created_at"],"properties":{"subscriber_id":{"readOnly":true,"oneOf":[{"$ref":"#/components/schemas/EsimSubscriberID"},{"type":"null"}],"description":"The assigned service user, or null when the eSIM has no person assignment."},"id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimID"}]},"status":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimStatus"}]},"mode":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimMode"}]},"iccid":{"type":["string","null"],"readOnly":true,"description":"ICCID of the eSIM profile, or null while none is allocated.","example":"8944500212345678912"},"phone_number":{"type":["string","null"],"readOnly":true,"description":"Phone number attached to this eSIM, in E.164 format, as the supplier reports it. Null while none is on record.\n","example":"+31612345678"},"display_name":{"type":["string","null"],"maxLength":120,"readOnly":true,"description":"Free-text label for your own reference."},"renewal":{"readOnly":true,"oneOf":[{"$ref":"#/components/schemas/EsimRecurringSubscriptionSummary"},{"type":"null"}],"description":"The eSIM's recurring subscription that has not ended, or null when it has none. The single-eSIM read does not carry it; list the eSIM's subscriptions with `esim_id` for the full renewal history."},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true}}},"EsimList":{"allOf":[{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EsimSummary"},"description":"eSIMs, newest first, in compact form; fetch one by id for the full aggregate."}}},{"$ref":"#/components/schemas/_ListEnvelope"}]},"EsimUpdate":{"type":"object","additionalProperties":false,"description":"Fields that can be updated on an eSIM.","properties":{"display_name":{"type":["string","null"],"maxLength":120,"description":"Free-text label for your own reference. Null clears it."},"tags":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/Tag"},"description":"Replaces the eSIM's tags."},"metadata":{"type":"object","additionalProperties":true,"description":"Replaces the eSIM's metadata. Maximum 2 KB serialized."}}},"EsimInstallationInstructions":{"type":"object","additionalProperties":false,"readOnly":true,"description":"Device installation steps based on the available credentials. Follow the list for the recipient’s device.","required":["language","ios","android"],"properties":{"language":{"$ref":"#/components/schemas/LanguageTag","description":"BCP-47 tag of the language `ios` and `android` are written in. This is the language served, which is the closest match to Accept-Language, or English when nothing closer is available. One list never mixes two languages.\n","example":"en"},"ios":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Ordered steps for iOS devices."},"android":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Ordered steps for Android devices."}}},"EsimCredentials":{"type":"object","additionalProperties":false,"description":"Installation details for an eSIM. Keep activation codes, installation links, QR images, and manual setup credentials private because they can grant access to the profile. Use fields with a value and follow the returned device instructions.","required":["esim_id","ios_install_url","android_install_url","qr_code_url","activation_code","smdp_address","matching_id","apn","data_roaming_required","instructions"],"properties":{"esim_id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimID"}]},"ios_install_url":{"type":["string","null"],"format":"uri","readOnly":true,"x-sensitive":true,"description":"One-tap install link for iOS 17.4 and later, derived from the activation code. Null when a valid link cannot be derived for this eSIM."},"android_install_url":{"type":["string","null"],"format":"uri","readOnly":true,"x-sensitive":true,"description":"Android installation link. Currently unavailable; returns null. Use the returned Android instructions for manual setup."},"qr_code_url":{"type":["string","null"],"format":"uri","readOnly":true,"x-sensitive":true,"description":"Hosted QR image URL. Currently unavailable; returns null. Use the activation code in your own installation flow or provide a hosted installation page."},"activation_code":{"type":"string","minLength":1,"readOnly":true,"x-sensitive":true,"description":"Raw activation string for manual entry in device settings.","example":"LPA:1$smdp.example.com$K2-1AbCdE-2FgHiJ"},"smdp_address":{"type":"string","minLength":1,"readOnly":true,"x-sensitive":true,"description":"SM-DP+ server address, for building a custom install flow.","example":"smdp.example.com"},"matching_id":{"type":"string","minLength":1,"readOnly":true,"x-sensitive":true,"description":"Matching ID component of the activation code, for building a custom install flow."},"confirmation_code":{"type":["string","null"],"readOnly":true,"x-sensitive":true,"description":"Confirmation code requested during installation, when available. Null means the requirement is unknown; it does not confirm that a code is unnecessary."},"apn":{"type":["string","null"],"readOnly":true,"description":"Access point name for mobile data, when available. Null means no APN information is available; it does not confirm automatic configuration.","example":"internet"},"data_roaming_required":{"type":["boolean","null"],"readOnly":true,"description":"Whether data roaming must be enabled. Null means the requirement is unknown. When true, `instructions` includes a step to enable roaming."},"instructions":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimInstallationInstructions"}],"description":"Step-by-step install instructions, covering whichever of the fields in this response carry a value, in the closest language available for the Accept-Language request header. Its `language` field names the one served.\n"}}},"EsimDeliveryStatus":{"type":"string","minLength":1,"enum":["pending","delivered","failed"],"description":"Outcome of a credential delivery.\n\n- `pending`: accepted; the outcome has not settled.\n- `delivered`: the message reached the recipient's provider; terminal.\n- `failed`: the message could not be delivered; `failure_code` says why. Terminal.\n"},"EsimInstallLinkID":{"type":"string","minLength":1,"pattern":"^eil_[0-9a-hjkmnp-tv-z]{26}$","example":"eil_01krdgeqcxet5s7t44vh8rt9mg"},"EsimInstallLinkMetadata":{"type":"object","readOnly":true,"additionalProperties":false,"description":"Non-secret link details for identifying and revoking a delivered installation link. Contains no token or installation credentials.","required":["id","expires_at","revoked_at"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/EsimInstallLinkID"}]},"expires_at":{"type":"string","format":"date-time","minLength":1,"description":"When the installation link expires."},"revoked_at":{"type":["string","null"],"format":"date-time","description":"When the link was revoked, or null while not revoked."}}},"EsimCredentialsDelivery":{"type":"object","additionalProperties":false,"description":"One credential delivery to a traveler. Returned when a delivery is accepted and listed on the eSIM's delivery history; the id reappears on the event that settles it.","required":["id","channel","to","status","failure_code","created_at","settled_at","install_link"],"properties":{"id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimDeliveryID"}]},"channel":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimDeliveryChannel"}]},"to":{"type":"string","minLength":3,"readOnly":true,"description":"Recipient address the message goes to.","example":"traveler@example.com"},"status":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimDeliveryStatus"}]},"failure_code":{"type":["string","null"],"readOnly":true,"x-extensible-enum":["invalid_recipient","suppressed","blocked","bounced","channel_unavailable","send_failed"],"description":"Why the delivery failed. Null unless status is failed. Open enum: treat unrecognized values as future failure kinds."},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the delivery was accepted."},"settled_at":{"type":["string","null"],"format":"date-time","readOnly":true,"description":"When the outcome became known. Null while pending."},"install_link":{"readOnly":true,"description":"Link metadata for explicit revocation. Null for deliveries created before hosted links were enabled.","oneOf":[{"$ref":"#/components/schemas/EsimInstallLinkMetadata"},{"type":"null"}]}}},"EsimDeliveryList":{"type":"object","additionalProperties":false,"description":"The eSIM's credential deliveries, newest first, most recent 50.","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EsimCredentialsDelivery"}}}},"EsimInstallLink":{"type":"object","additionalProperties":false,"description":"A hosted installation page for one eSIM. The recipient does not need a Bird account. The secret URL is returned at creation and cannot be retrieved through later reads.","required":["id","esim_id","url","expires_at","created_at"],"properties":{"id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimInstallLinkID"}]},"esim_id":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/EsimID"}]},"url":{"type":"string","format":"uri","minLength":1,"readOnly":true,"x-sensitive":true,"description":"Private installation URL. Anyone holding it can access installation details until expiry or revocation. Store or share it securely when created; later reads do not return it."},"expires_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the link stops granting access to installation details."},"created_at":{"type":"string","format":"date-time","minLength":1,"readOnly":true,"description":"When the link was created."}}},"EsimPackageList":{"type":"object","additionalProperties":false,"description":"The eSIM's data packages. Bounded: an eSIM holds at most package_limit concurrent packages, so the list is returned in full.","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EsimPackage"},"description":"Packages, newest first."}}},"EsimCompatibleOfferList":{"type":"object","additionalProperties":false,"description":"Offers this eSIM can take as a top-up right now, given its mobile network, current packages, and package_limit. A point-in-time answer; re-fetch rather than caching.","required":["data","as_of"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EsimOfferSummary"},"description":"Orderable top-up offers for this eSIM."},"as_of":{"type":"string","minLength":1,"format":"date-time","readOnly":true,"description":"When this answer was computed."}}},"EsimSettings":{"type":"object","additionalProperties":false,"description":"The eSIM settings your workspace controls. Every field carries its effective value, whether or not the workspace has ever changed it.\n","required":["credential_delivery_enabled"],"properties":{"credential_delivery_enabled":{"type":"boolean","description":"Whether Bird automatically sends an install link after a new eSIM purchase with a linked contact. Uses the contact's email address, or SMS when only a phone number is available. Defaults to `false`. Manual install-link sends remain available regardless of this setting.\n","example":false}}},"EsimSettingsUpdate":{"type":"object","additionalProperties":false,"description":"Changes to your workspace's eSIM settings. Omit a field to leave it as it is.\n","properties":{"credential_delivery_enabled":{"type":"boolean","description":"Whether Bird automatically sends an install link after a new eSIM purchase with a linked contact. Uses the contact's email address, or SMS when only a phone number is available. Omit this field to retain the current value; a workspace without saved settings starts with `false`. Manual install-link sends remain available regardless of this setting.\n","example":false}}}},"parameters":{"PaginationLimit":{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},"StartingAfter":{"name":"starting_after","in":"query","required":false,"description":"Cursor from the `next_cursor` field of a previous list response. Returns items immediately after the cursor position in the current sort order.","schema":{"type":"string"}},"EndingBefore":{"name":"ending_before","in":"query","required":false,"description":"Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.","schema":{"type":"string"}},"OrderDesc":{"name":"order","in":"query","required":false,"description":"Sort direction. Defaults to `desc`, which sorts from newest to oldest or largest to smallest, depending on the selected sort field.\n","schema":{"$ref":"#/components/schemas/SortOrder","default":"desc"}},"XWorkspaceId":{"name":"X-Workspace-Id","in":"header","required":false,"description":"Workspace context for the request. Required for dashboard authentication and master keys. Workspace keys and access tokens already identify their workspace; send that workspace or omit the header. A different one is rejected.","schema":{"type":"string","pattern":"^ws_[0-9a-hjkmnp-tv-z]{26}$"}},"XOrganizationId":{"name":"X-Organization-Id","in":"header","required":false,"description":"Organization context for the request. Required for dashboard authentication. An API key or access token carries its own organization, so send either that organization or no header at all; a different one is rejected.","schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$"}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Client-supplied key. On operations supporting request deduplication, a retained\nresponse is replayed for duplicate requests with the same key within the\nidempotency window (3 hours by default). This protection requires a workspace,\norganization, or staff-account scope. User-only and unscoped unauthenticated operations,\nstreams, and operations with a separate replay contract do not use this\nresponse replay.\n\nOn a supported operation, if idempotency protection is unavailable before execution, the API returns\n`503 IdempotencyUnavailable` (E01033) without executing this attempt. Retry with\nbackoff using the same key and request. An operation that takes effect before\nits response is retained can still execute again on retry.\n\nTwo distinct 409 errors signal misuse:\n\n- `request_in_progress` (E01004): The same key is currently being\n  processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.\n- `idempotency_key_reuse` (E01005): The same key has already completed\n  against a different request body or method. Generate a new key.\n\nRecommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).\n","schema":{"type":"string","maxLength":255}},"IncludeTotal":{"name":"include_total","in":"query","required":false,"description":"When true, the response includes a `total` field with the total number of items matching the request's filters across all pages.","schema":{"type":"boolean","default":false}},"OrderAsc":{"name":"order","in":"query","required":false,"description":"Sort direction. Defaults to `asc`, which sorts alphabetically or from oldest to newest, depending on the selected sort field.\n","schema":{"$ref":"#/components/schemas/SortOrder","default":"asc"}},"StatsTimezone":{"name":"timezone","in":"query","required":false,"description":"IANA timezone identifier used to group statistics, for example `Asia/Kathmandu`. The default is UTC. Day and hour boundaries, including the default window when `from` and `to` are omitted, follow this timezone. When this parameter is set, pass `from` and `to` as calendar days or `Z` instants instead of timestamps with explicit UTC offsets.\n","schema":{"type":"string","minLength":1,"example":"Asia/Kathmandu"}},"SMSStatsContentType":{"name":"content_type","in":"query","required":false,"description":"Restrict statistics to SMS or MMS. Omit to include both. This filter can be combined with an existing dimension filter where the operation supports one. Previously recorded statistics remain attributed to SMS. New activity uses the message type, so a late MMS delivery can appear under MMS while its earlier send remains under SMS.","schema":{"$ref":"#/components/schemas/SMSContentType"}},"CreatedAfter":{"name":"created_after","in":"query","required":false,"description":"Limits the response to resources created at or after this timestamp. Combine it with `created_before` to select a time window. Use an RFC 3339 timestamp with a timezone offset.","schema":{"type":"string","format":"date-time","example":"2026-05-01T00:00:00Z"}},"CreatedBefore":{"name":"created_before","in":"query","required":false,"description":"Limits the response to resources created before this timestamp. Combine it with `created_after` to select a time window. Use an RFC 3339 timestamp with a timezone offset.","schema":{"type":"string","format":"date-time","example":"2026-06-01T00:00:00Z"}},"TagFilter":{"name":"tag","in":"query","required":false,"description":"Filter by tag. Accepts `name` to match any record carrying that tag name, or `name:value` to match a specific tag pair (for example `category:welcome`). Repeat the parameter to add more tags. A record must match every tag listed to be returned.\n","schema":{"type":"array","items":{"type":"string"}}},"MessageReferenceFilter":{"name":"reference","in":"query","required":false,"description":"Keep only messages whose `reference` is exactly this value. The match is case-sensitive, and several messages can share a reference.\n","schema":{"$ref":"#/components/schemas/MessageReference"}},"EmailBroadcastStatusFilter":{"name":"status","in":"query","required":false,"description":"Filter by lifecycle status. Repeat the parameter to match more than one status, for example `?status=accepted&status=sending`.\n","style":"form","explode":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmailBroadcastStatus"}}},"BroadcastAudienceFilter":{"name":"audience_id","in":"query","required":false,"description":"Filter by audience. Only broadcasts that use this audience are returned.","schema":{"$ref":"#/components/schemas/AudienceID"}},"BroadcastTagFilter":{"name":"tag","in":"query","required":false,"description":"Filter by tag. Pass `name` to match any broadcast that has that tag name, or pass `name:value` to match a specific tag pair, for example `campaign:spring_launch`.\n","schema":{"type":"string"}},"EmailBroadcastSearchFilter":{"name":"q","in":"query","required":false,"description":"Case-insensitive literal substring match against the broadcast's tags or the referenced template's name. With `email_management` read access, also matches the subject in the effective language of the template version resolved when this broadcast's execution starts. Draft and scheduled broadcasts have no execution subject to search. Percent signs, underscores, and backslashes are literal characters.","schema":{"type":"string","maxLength":200}},"BroadcastTestIdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"description":"Required key for one logical broadcast test send, scoped to the workspace, the authenticated\ncaller and this operation. Reuse the same key and the exact same request when retrying.\n\n- A confirmed `202` response replays unchanged for the same key and request within the\n  configured window, 3 hours by default. Authorization is checked again on every retry; on an\n  email test, so is the destination's member access.\n- `409 request_in_progress` (E01004) or `503 IdempotencyUnavailable` (E01033): retry with\n  backoff using the same key. Switching keys can send another test.\n- `409 idempotency_key_reuse` (E01005): the key was used for a different request or\n  broadcast. Use a new key for a different test send.\n- After the window, saved results and unresolved requests can be removed. Reusing the key\n  after removal can send another test, even if the earlier response was not confirmed.\n","schema":{"type":"string","minLength":1,"maxLength":255}},"PreferenceBrandID":{"name":"brand_id","in":"query","required":false,"description":"Return only this Brand's email preferences, including older preferences belonging to the original business. Omit to return all matching preferences. Empty, repeated or malformed values return 422. Where the endpoint also accepts a channel filter, it must be email. A Brand not found in this workspace returns 404.","schema":{"$ref":"#/components/schemas/BrandID"}},"AssetUploadSessionId":{"name":"upload_id","in":"path","required":true,"description":"ID of the media-library upload session.","schema":{"$ref":"#/components/schemas/AssetUploadSessionID"}},"ConversationInboxStatusFilter":{"name":"inbox_status","in":"query","required":false,"description":"Filter by workspace inbox status. Omit to include open and resolved conversations.","schema":{"$ref":"#/components/schemas/ConversationInboxStatus"}},"ConversationAssigneeFilter":{"name":"assigned_to","in":"query","required":false,"description":"Return conversations assigned to this workspace member. Pass `me` for the signed-in user or `unassigned` for conversations without an assignee. An API key cannot use `me` and receives a `422` response.","schema":{"type":"string","pattern":"^(me|unassigned|usr_[0-9a-hjkmnp-tv-z]{26})$"},"example":"unassigned"},"ConversationLabelFilter":{"name":"label","in":"query","required":false,"description":"Return conversations carrying this label, matched in any casing. Repeat the parameter to require every supplied label. A name the workspace doesn't have matches nothing.","schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"example":["billing"]},"WhatsAppStatsTemplateFilter":{"name":"template","in":"query","required":false,"description":"Restricts the statistics to one template, identified by its ID (`wat_…`) or slug. Mutually exclusive with the other dimension filters (`category`, `phone_number`, `tag`); only one may be set per request. An ID matches the `template_id` key on a row of the per-template breakdown; a slug is accepted for callers that predate that key and resolves to the same messages.\n","schema":{"type":"string","minLength":1,"maxLength":63,"pattern":"^(wat_[0-9a-hjkmnp-tv-z]{26}|[a-z0-9]([a-z0-9_-]*[a-z0-9])?)$","example":"wat_01krdgeqcxet5s7t44vh8rt9mg"}},"RequiredIdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"description":"Required client-supplied deduplication key for this write. Reuse it for retries of the same intent. Successful results replay within the configured idempotency window (three hours by default); selected connected-app writes also replay uncertain-write conflicts. Use a new key only after confirming the prior result and beginning a different action.","schema":{"type":"string","minLength":1,"maxLength":255}},"WhatsAppBusinessAccountRef":{"name":"business_account_ref","in":"path","required":true,"description":"WhatsApp Business Account ID (`waa_` prefix) or the WhatsApp Business Account ID Meta reports in `waba`. A value that parses as a valid ID resolves by ID; any other value resolves as Meta's ID.\n","schema":{"type":"string","minLength":1,"maxLength":64},"example":"102290129340001"},"AutomaticSeedingSourceKindFilter":{"name":"source_kind","in":"query","required":false,"description":"Match the original source kind.","schema":{"$ref":"#/components/schemas/AutomaticSeedingSourceKind"}},"AutomaticSeedingSourceEmailFilter":{"name":"source_email_id","in":"query","required":false,"description":"Match an original email. Cannot be combined with source_broadcast_id or source_kind=broadcast; either combination returns 422.","schema":{"$ref":"#/components/schemas/EmailID"}},"AutomaticSeedingSourceBroadcastFilter":{"name":"source_broadcast_id","in":"query","required":false,"description":"Match an original broadcast. Cannot be combined with source_email_id. If source_kind is supplied, it must be broadcast; conflicting combinations return 422.","schema":{"$ref":"#/components/schemas/EmailBroadcastID"}},"AutomaticSeedingRunIDPath":{"name":"run_id","in":"path","required":true,"description":"Automatic seeding run to read or stop.","schema":{"$ref":"#/components/schemas/AutomaticSeedingRunID"}},"EmailStatsTemplateFilter":{"name":"template","in":"query","required":false,"description":"Restricts the statistics to a template or a comma-separated union of templates, identified by ID (`emt_…`) or name. This parameter is mutually exclusive with other dimension filters.\n","schema":{"type":"string","minLength":1,"pattern":"^(emt_[0-9a-hjkmnp-tv-z]{26}|[a-z0-9]([a-z0-9_-]{0,61}[a-z0-9])?)(,(emt_[0-9a-hjkmnp-tv-z]{26}|[a-z0-9]([a-z0-9_-]{0,61}[a-z0-9])?))*$","example":"welcome-email"}},"EmailCompetitiveRange":{"name":"range","in":"query","required":false,"description":"How many days back the response covers, counting from now. One of three fixed trend windows rather than an open date range, matching how a competitive-intelligence chart is read. Defaults to 30.\n","schema":{"type":"integer","enum":[7,30,90],"default":30,"example":30}},"EmailCompetitiveTimezone":{"name":"timezone","in":"query","required":false,"description":"IANA timezone identifier to report send times in; defaults to UTC. The grid is folded into this zone before it is summed, so a send lands on the weekday and hour it happened at locally rather than the one it happened at in UTC. A zone this API does not know returns 422 rather than falling back to UTC, so an axis is never labelled with a zone the figures were not folded into.\n","schema":{"$ref":"#/components/schemas/Timezone"}},"EmailBlockId":{"name":"block_id","in":"path","required":true,"description":"Block to read or edit.","schema":{"$ref":"#/components/schemas/EmailBlockID"}},"EmailBlockLanguageTag":{"name":"language","in":"path","required":true,"description":"Exact block language as a BCP-47 tag. No fallback is applied.","example":"en","schema":{"$ref":"#/components/schemas/LanguageTag"}},"EmailBlockRevisionId":{"name":"revision_id","in":"path","required":true,"description":"Retained published revision to read.","schema":{"$ref":"#/components/schemas/EmailBlockRevisionID"}},"EsimSubscriberFilter":{"name":"subscriber_id","in":"query","required":false,"description":"Return eSIMs assigned to this subscriber.","schema":{"$ref":"#/components/schemas/EsimSubscriberID"}},"EsimTagFilter":{"name":"tag","in":"query","required":false,"description":"Filter by tag. Accepts `name` to match any eSIM carrying that tag name, or `name:value` to match a specific tag pair (e.g. `trip:summer`). A trailing colon (`name:`) matches the name alone, the same as `name`. A term with an empty name is rejected. Repeat the parameter to AND-combine several tag filters.\n","schema":{"type":"array","items":{"type":"string"}}},"EsimIccidPrefixFilter":{"name":"iccid_prefix","in":"query","required":false,"description":"Keep only eSIMs whose ICCID starts with these digits. Use it when you hold only the first part of an ICCID. Pass `iccid` instead when you hold the whole number.\n","schema":{"type":"string","minLength":1,"maxLength":22,"example":"89445002"}}},"responses":{"Unauthorized":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"MisdirectedRequest":{"description":"The request reached the wrong regional endpoint. The organization or API key belongs to a different region; reissue the request against the regional host named in the error message.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unprocessable":{"description":"The request has invalid field values, violates a business rule, or carries a query parameter the endpoint does not declare. Field validation errors use `type: validation_error` and include the affected fields in `details`. Business-rule errors identify the failed rule in `type`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServiceUnavailable":{"description":"The service is temporarily unavailable. If `Retry-After` is present, wait for that delay before retrying; otherwise, retry with exponential backoff. Reuse the same idempotency key and request when retrying a mutation.\n","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PayloadTooLarge":{"description":"Request body or message size exceeds the allowed limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Gone":{"description":"The resource existed but is no longer available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ConflictWithReplay":{"description":"Resource conflict","headers":{"Idempotency-Replay":{"$ref":"#/components/headers/IdempotencyReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PreconditionFailed":{"description":"Precondition failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PaymentRequired":{"description":"Insufficient balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooEarly":{"description":"The resource is not available yet. Retry shortly.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ValidationError":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"NotImplemented":{"description":"The operation is not supported","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"headers":{"RateLimit":{"description":"Remaining capacity for the request's rate-limit policy as an IETF Structured Field. Format: `\"<policy>\";r=<remaining>;t=<seconds_until_reset>`.\n","schema":{"type":"string"},"example":"\"email_send\";r=842;t=35"},"RateLimit-Policy":{"description":"Effective quota for the request's rate-limit policy as an IETF Structured Field. Format: `\"<policy>\";q=<quota>;w=<window_seconds>`.\n","schema":{"type":"string"},"example":"\"email_send\";q=1000;w=60"},"RetryAfter":{"description":"Number of seconds to wait before retrying the request.\n","schema":{"type":"integer","minimum":0},"example":35},"IdempotencyReplay":{"description":"The API includes this header when it replays the response for an earlier request that used the same `Idempotency-Key`. The API does not process the request again.","schema":{"type":"string","enum":["true"]}},"ContentDisposition":{"description":"Indicates the response is a file attachment and carries the suggested\ndownload filename, for example `attachment; filename=\"invoice-2600042.pdf\"`.\n","schema":{"type":"string"}},"NoStoreCacheControl":{"description":"`no-store`. Browsers and intermediaries must not store this response.","schema":{"type":"string","enum":["no-store"]}}}}}