{"openapi":"3.1.0","info":{"title":"Blooio v4 API","version":"4.0.0-beta","description":"The Blooio v4 API is a multi-channel messaging API for iMessage, SMS, RCS, WhatsApp, and Apple Messages for Business. It exposes channels, contacts and identities, chats, messages, reactions, polls, groups, webhooks, and a unified event feed.\n\n## Authentication\nAuthenticate with an API key as a bearer token: `Authorization: Bearer bl_live_...`. Create keys in the Blooio dashboard.\n\n## Conventions\n- **IDs** are prefixed and globally unique: channels `ch_`, contacts `ct_`, identities `cid_`, chats `chat_`, messages `msg_`, groups `grp_`, webhooks `wh_`, webhook deliveries `wdel_`, events `evt_`.\n- **List responses** normally return `{ \"data\": [...], \"has_more\": boolean, \"next_cursor\": string | null }` and use cursor pagination (`limit`, `cursor`). The contacts list additionally supports offset pagination for search, filtering, and sorting, returning a `pagination` object when that mode is used.\n- **Item responses** return `{ \"data\": { ... } }`. Message send endpoints return the message object at the top level (not wrapped).\n- **Errors** use `{ \"error\": { \"code\": string, \"message\": string, \"details\": object } }`. Authentication failures at the middleware boundary use a flatter shape `{ \"error\": string, \"message\": string, \"status\": number }`.","contact":{"name":"Blooio Support","email":"help@blooio.com","url":"https://docs.blooio.com"}},"servers":[{"url":"https://api.blooio.com/v4","description":"Production"}],"security":[{"BearerApiKey":[]}],"x-blooio-status":"beta","tags":[{"name":"Account","description":"Authenticated account, sender numbers, and contact cards."},{"name":"Location","description":"Find My friend locations (device passthrough)."},{"name":"Channels","description":"Sending surfaces (iMessage/Blooio, Twilio, WhatsApp, RCS, Apple Messages for Business) and their capabilities."},{"name":"Priorities","description":"Channel routing / number pools: ordered sets of channels walked by priority for the agnostic send."},{"name":"Contacts","description":"Contacts, their channel identities, capabilities, timeline, and tags."},{"name":"Chats","description":"Conversations and chat-level actions (typing, read, contact card, background)."},{"name":"Messages","description":"Send messages and read message history, status, events, and reactions."},{"name":"Polls","description":"Native iMessage polls (Blooio channels)."},{"name":"Groups","description":"Group chats on group-capable channels (Blooio, WhatsApp)."},{"name":"Webhooks","description":"Webhook subscriptions and delivery attempts for inbound + lifecycle events."},{"name":"Events","description":"Unified activity feed across messages, polls, groups, reactions, typing, payments, and messaging-safety state changes."},{"name":"Tickets","description":"Support tickets between the organization and the Blooio team, including call-forwarding requests. Open a ticket, reply to it, close it, and poll it for progress. Organizations with the support assistant enabled also get assistant replies on support and technical tickets, and can confirm an answer, escalate, keep chatting, or retry a stalled reply. Priority is set by Blooio support and can't be changed over the API. OAuth apps need `tickets:read` to read tickets, comments, and assistant state, and `tickets:write` to open, reply, update, confirm, escalate, continue, or retry."},{"name":"Phone Numbers","description":"Phone number lookup and geocoding (enterprise plans)."},{"name":"Numbers","description":"Every number the organization rents from Blooio, as one resource keyed by the number itself. A number carries one or more `products`: `imessage` (a Blooio iMessage line), `sms` (Blooio SMS), and `voice` (Blooio Voice). Each product is a channel, listed in the number's `channels`, and that channel is what you send and call from. Search and buy Blooio SMS and Blooio Voice numbers here; iMessage lines are bought through `/channels/blooio/purchases`. An organization holds up to 5 Blooio SMS and Blooio Voice numbers unless Blooio raises its limit. OAuth apps need `numbers:read` to read and `numbers:manage` to buy, change, and release."},{"name":"10DLC","description":"US carrier registration for Blooio SMS. Carriers deliver texts from a local number only once the number sits on a 10DLC campaign they've provisioned. The organization registers one brand (who is sending), then one or more campaigns (what it sends and how people opt in). Blooio assigns the organization's SMS numbers to its oldest provisioned campaign automatically; `PATCH /numbers/{number}` with `campaign_id` moves a number to another. Registration status changes arrive as `registration.brand.updated` and `registration.campaign.updated` webhooks. OAuth apps need `numbers:read` to read and `numbers:manage` to register."},{"name":"RCS","description":"Blooio RCS registration. RCS messages arrive in the Google Messages app from a verified business sender, with its name, logo, and colors, instead of a phone number. The organization registers one brand (the business), then one or more senders (each a branded profile people message). Google verifies a sender's brand, testers try it on their own phones, and carriers approve its launch; it can message the testers once it's `verified` and anyone once it's `live`. Each sender is an `rcs_business` channel: send from its channel id or alias with `POST /messages`. Once submitted, a sender's name, logo, and banner and the brand's point of contact change by paid change request. Submitting, launching, and change requests bill the organization's SMS, Voice & RCS subscription, from its credit first, then its card, so they need credit or a card on file. Status changes arrive as `registration.rcs_brand.updated`, `registration.rcs_sender.updated`, and `registration.rcs_change.updated` webhooks. OAuth apps need `numbers:read` to read and `numbers:manage` to register. See the Blooio RCS guide."},{"name":"Calls","description":"Calls on the organization's Blooio Voice numbers. Every call has a handler that takes its audio once it's answered: `stream` (your WebSocket server, speaking the Blooio media stream protocol), `agent` (the Blooio agent that owns the number), or `softphone` (a teammate in the dashboard). Inbound calls go to the handler set in the number's voice settings (`PATCH /channels/{channel}/settings` with `inbound`); with `softphone`, the call rings the dashboard and you can also answer it yourself with `POST /calls/{call_id}/answer` after the `call.ringing` webhook, whichever answers first. A call lasts at most 4 hours. Call status changes arrive as `call.ringing`, `call.answered`, and `call.ended` webhooks. When an organization admin turns on call recording in the dashboard settings, every call is recorded from answer, and `call.recording.ready` fires once its recording is saved. OAuth apps need `calls:read` to read and `calls:write` to place and control calls."},{"name":"API Keys","description":"Programmatic API key management — create keys, list them, deprecate them, and assign them to channels.\n\n**Blooio Apps (OAuth) only.** Every endpoint under this tag is callable *only* with a Blooio Apps OAuth access token (`blo_at_...`) whose install was granted the `apikeys:read` / `apikeys:manage` scopes. API-key and dashboard authentication are rejected with `403 oauth_token_required`. This mirrors the API-key management that has always lived in the dashboard, exposed to installed apps under explicit user consent."},{"name":"AI","description":"Model-backed decisions about conversations. Bloobability v2 returns, for each policy you write, a calibrated probability that it holds and a separate estimate of whether the conversation can answer it, from the instant or full tier you choose. The deprecated v1 gauge stays documented for reference."}],"paths":{"/me":{"get":{"tags":["Account"],"summary":"Get the authenticated account","description":"Returns the authenticated organization, linked devices/numbers, usage, and API key validity.","operationId":"getMe","responses":{"200":{"description":"Account context","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/me/priority":{"get":{"tags":["Account"],"summary":"Get the key's default priority","description":"Returns the calling API key's default channel priority, or `{ \"data\": null }` when none is configured (in which case the agnostic send falls back to the implicit Blooio pool of the key's own numbers).","operationId":"getMyDefaultPriority","responses":{"200":{"description":"The default priority (or null)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"$ref":"#/components/schemas/Priority"},{"type":"null"}]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/me/numbers":{"get":{"tags":["Account"],"summary":"List sender numbers","description":"Lists the phone numbers / sender addresses available to this API key. Banned and suspended numbers stay in the list. `status` is `banned`, `suspended`, or `active`; a ban takes precedence when both apply. `is_active` is false when the line is banned, suspended, or the underlying account is blocked.","operationId":"listNumbers","responses":{"200":{"description":"Sender numbers","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"phone_number":{"type":"string","example":"+15551234567"},"is_active":{"type":"boolean","description":"False when the line is banned, suspended, or the underlying account is blocked."},"banned":{"type":"boolean","description":"True when the phone number is banned."},"suspended":{"type":"boolean","description":"True when the phone number is suspended. A line can be both banned and suspended; `status` is then `banned`."},"status":{"type":"string","enum":["active","suspended","banned"],"description":"`banned` if the number is banned, otherwise `suspended` if it is suspended, otherwise `active`."},"last_active":{"type":"integer","format":"int64","nullable":true,"description":"Epoch milliseconds of the allocation's last activity."},"plan_kind":{"type":"string","nullable":true,"enum":["shared","dedicated","inbound","trial","2fa",null],"description":"Plan type the underlying allocation runs on. `inbound` numbers are reply-only."}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/me/numbers/{number}/contact-card":{"get":{"tags":["Account"],"summary":"Get a number's contact card","operationId":"getContactCard","parameters":[{"$ref":"#/components/parameters/NumberParam"}],"responses":{"200":{"description":"Contact card","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"put":{"tags":["Account"],"summary":"Update a number's contact card","description":"Updates the contact card (name, avatar, sharing settings) shared from this number. At least one field is required.","operationId":"updateContactCard","parameters":[{"$ref":"#/components/parameters/NumberParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"avatar":{"type":["string","null"],"description":"Base64 image or data URI (`data:image/png;base64,...`). `null` removes the photo; lines that cannot clear a photo show a plain black image instead."},"sharing":{"type":"object","properties":{"enabled":{"type":"boolean"},"audience":{"type":"integer","enum":[0,1],"description":"0 = Contacts Only, 1 = Always Ask"},"name_format":{"type":"integer","enum":[0,1],"description":"0 = First & Last, 1 = First Only"}}}}}}}},"responses":{"200":{"description":"Updated contact card","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/me/numbers/{number}/contact-card/avatar":{"post":{"tags":["Account"],"summary":"Upload a contact card avatar","description":"Uploads an avatar image for the number's contact card. Max 10MB.","operationId":"uploadContactCardAvatar","parameters":[{"$ref":"#/components/parameters/NumberParam"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"avatar":{"type":"string","format":"binary"},"first_name":{"type":"string","description":"Optional. Sent to the device with the photo so the write is not photo-only. Recommended: without it the device keeps whatever name it currently has."},"last_name":{"type":"string","description":"Optional. See first_name."}},"required":["avatar"]}}}},"responses":{"200":{"description":"Avatar uploaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemEnvelope"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/me/numbers/{number}/call-forwarding":{"post":{"tags":["Account"],"summary":"Request call forwarding","description":"Opens a support ticket to forward calls from an owned dedicated or inbound Blooio number. The destination must be a US E.164 number. Shared or foreign source numbers are rejected. Forwarding isn't instant: check its progress with `GET /tickets/{ticket_id}` using the returned `ticket_id`, whose `forwarding.state` reaches `completed` when calls forward. OAuth apps need `numbers:manage` to open the request and `tickets:read` to check it.","operationId":"requestCallForwarding","parameters":[{"$ref":"#/components/parameters/NumberParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"forward_to":{"type":"string","pattern":"^\\+1[2-9]\\d{9}$","description":"US E.164 number to forward calls to."}},"required":["forward_to"]}}}},"responses":{"201":{"description":"Call forwarding requested","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean"},"ticket_id":{"type":"string","description":"Pass to `GET /tickets/{ticket_id}` to check progress."},"status":{"$ref":"#/components/schemas/TicketStatus"},"number":{"type":"string","description":"E.164 source number."},"forward_to":{"type":"string","description":"E.164 destination number."}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/location/contacts":{"get":{"tags":["Location"],"summary":"List Find My contacts","description":"Lists Find My friends sharing their location with the linked Apple account.","operationId":"listLocationContacts","responses":{"200":{"description":"Find My contacts","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/location/contacts/refresh":{"get":{"tags":["Location"],"summary":"Refresh Find My locations (GET)","description":"Convenience GET form of the refresh endpoint. Forces a refresh of Find My location data from the device.","operationId":"refreshLocationContactsGet","responses":{"200":{"description":"Refresh result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Location"],"summary":"Refresh Find My locations","description":"Forces a refresh of Find My location data from the device.","operationId":"refreshLocationContacts","responses":{"200":{"description":"Refresh result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/location/contacts/{handle}":{"get":{"tags":["Location"],"summary":"Get one Find My contact","operationId":"getLocationContact","parameters":[{"name":"handle","in":"path","required":true,"schema":{"type":"string"},"description":"Contact handle to resolve — a phone number in E.164 format, an email address, or an Apple ID. URL-encode the value."}],"responses":{"200":{"description":"Find My contact","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/channels":{"get":{"tags":["Channels"],"summary":"List channels","description":"Lists messaging channels for the organization. Ordinary sends do not require a channel id; use this endpoint to inspect capabilities or obtain an exact channel id for advanced integrations.","operationId":"listChannels","parameters":[{"name":"type","in":"query","schema":{"$ref":"#/components/schemas/ChannelType"},"description":"Filter by channel type."},{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/ChannelStatus"},"description":"Filter by channel status."},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"}],"responses":{"200":{"description":"A page of channels","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"example":{"data":[{"id":"ch_018f7b2a-1c3d-7e4f-9a2b-0c1d2e3f4a5b","type":"blooio","address":"+15551234567","status":"active","capabilities":{"protocols":["imessage","sms","rcs"],"content":["text","media"]},"created_at":1718000000000}],"has_more":false,"next_cursor":null}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/channels/blooio/available":{"get":{"tags":["Channels"],"summary":"List available Blooio numbers","description":"Browse Blooio number inventory available to purchase. `type=shared` returns available shared lines; `type=dedicated` returns unassigned dedicated inventory. When one or more `area_code` values are supplied with `type=dedicated` or `type=inbound`, the response is an area-code quote: each requested code is reported as either in stock (provisioned free) or requiring a custom order (a custom area-code fee applies and a provisioning ticket is opened at purchase). Requires the number purchase API feature to be enabled for the organization, and the `numbers:read` scope for OAuth apps.","operationId":"listAvailableBlooioNumbers","parameters":[{"name":"type","in":"query","schema":{"type":"string","enum":["shared","dedicated","inbound"],"default":"shared"},"description":"Plan family to browse."},{"name":"area_code","in":"query","schema":{"type":"string"},"description":"A desired 3-digit US area code. Repeat the parameter (or pass a comma-separated `area_codes`) to quote several. Only meaningful for `dedicated`/`inbound`."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Filter inventory by ISO country code (e.g. `US`)."},{"$ref":"#/components/parameters/LimitParam"}],"responses":{"200":{"description":"Available inventory or an area-code quote","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"Inventory rows (browse mode) or quote lines (when `area_code` is supplied).","items":{"oneOf":[{"type":"object","description":"Inventory row (browse mode). The full number is never returned — only a masked form.","properties":{"masked_national":{"type":["string","null"],"description":"National format with only the area code revealed, e.g. `(801) ***-****`."},"area_code":{"type":["string","null"]},"country_code":{"type":["string","null"],"description":"E.164 country calling code, e.g. `1`."},"phone_number_country":{"type":["string","null"],"description":"ISO country code, e.g. `US`."},"location":{"type":"string","description":"Geocoded `City, ST` label for NANPA numbers, when resolvable. Omitted otherwise."}}},{"type":"object","description":"Quote line (when `area_code` is supplied).","properties":{"area_code":{"type":"string"},"matched":{"type":"boolean","description":"`true` when the code is in stock (provisioned free)."},"custom_order":{"type":"boolean","description":"Present and `true` when the code needs a custom order (custom area-code fee applies)."},"auto_assigned":{"type":"boolean","description":"Present when no specific code was requested for this line and one is auto-assigned."},"zip_code":{"type":"string"}}}]}},"matched_count":{"type":"integer","description":"Quote mode only: requested area codes found in stock."},"custom_order_count":{"type":"integer","description":"Quote mode only: requested area codes needing a custom (ticketed, billed) order."},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"examples":{"browse":{"summary":"Browse shared inventory","value":{"data":[{"masked_national":"(801) ***-****","area_code":"801","country_code":"1","phone_number_country":"US","location":"Salt Lake City, UT"}],"has_more":false,"next_cursor":null}},"quote":{"summary":"Area-code quote","value":{"data":[{"area_code":"801","matched":true},{"area_code":"212","matched":false,"custom_order":true}],"matched_count":1,"custom_order_count":1,"has_more":false,"next_cursor":null}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}}},"/channels/blooio/purchases":{"post":{"tags":["Channels"],"summary":"Purchase Blooio numbers","description":"Purchase one or more Blooio lines. Purchases are asynchronous and billable: the call charges the organization's credit balance, then its default payment method, and returns a `purchase_id`; the lines are provisioned when Stripe confirms the invoice, at which point a `number.purchase.completed` webhook fires (or `number.purchase.failed`). A card requiring 3DS/SCA returns `status: action_required` with an `action_url`, and also emits `number.purchase.action_required`.\n\n**Idempotency is required** — send a unique `Idempotency-Key` header; replaying the same key returns the same purchase rather than charging twice.\n\nRules enforced server-side (identically to the dashboard): without a saved payment method, the organization's credit must cover the purchase in full (else `402 no_payment_method`, and nothing is charged); shared plans are limited to one line per organization (`409 shared_number_limit`); and a single order may not exceed the per-order line cap (`400 line_limit_exceeded`, default 10 — apply for an increase in the dashboard Limits tab). Requested area codes that are out of stock incur a custom area-code fee and open a provisioning ticket; in-stock codes are assigned immediately with no custom fee.\n\n**Custom requests.** For anything the pool can't fill automatically (installing your own eSIM, porting in a number, a number from another country), send `custom_requests`: one entry per line, matched to lines by position like `area_codes`. Each line with a custom request is charged the one-time custom fee, is never assigned automatically, and opens a provisioning ticket carrying your notes. The line stays pending (`phone_number: null`, with a `ticket_id` in the purchase status) until Blooio staff provision it. Read the ticket with `GET /v4/tickets/{ticketId}`.\n\nRequires the number purchase API feature to be enabled, and the `numbers:manage` scope for OAuth apps.","operationId":"purchaseBlooioNumbers","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Unique key that makes the billable purchase safe to retry."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["plan"],"properties":{"plan":{"type":"string","enum":["shared_nc","shared_com","dedicated_com","dedicated_ent","inbound_basic"],"description":"Plan id to purchase (determines shared / dedicated / inbound). Use the specific id, not the tier name — e.g. `dedicated_com` or `dedicated_ent`, not `dedicated` (which returns `invalid_plan`)."},"quantity":{"type":"integer","minimum":1,"default":1,"description":"Number of new lines (dedicated/inbound). Shared is always 1."},"area_codes":{"type":"array","items":{"type":"string"},"description":"Preferred 3-digit US area codes (dedicated/inbound). Out-of-stock codes incur a custom fee and open a ticket."},"zip_codes":{"type":"array","items":{"type":"string"},"description":"Preferred ZIP codes (dedicated/inbound), used when an area code is not specified."},"custom_requests":{"type":"array","description":"Per-line custom provisioning requests (dedicated/inbound only), matched to lines by position. An object marks that line for manual provisioning by Blooio staff; `null` (or no entry) leaves the line on normal fulfillment. May not have more entries than `quantity`. Each custom line is charged the one-time custom fee and opens a provisioning ticket. Notes are stored as sent and shown on the ticket to your organization and Blooio staff.","items":{"oneOf":[{"type":"object","properties":{"notes":{"type":["string","null"],"description":"Free-text instructions for Blooio staff, e.g. eSIM details, a number to port in, or the country you need. Optional."}}},{"type":"null"}]}},"auto_bind":{"type":"string","description":"`api_key_id` of an API key in your organization that should own every line in this purchase. Each line is assigned to the key as soon as it gets its number, including lines Blooio staff provision later (custom requests, ZIP codes, out-of-stock area codes), so sends authenticated with that key can use them without a separate assignment call. A key deprecated before its line is provisioned is not assigned. Unknown keys return `404 auto_bind_api_key_not_found`. Plans without number pools (`shared_nc`, `shared_com`, `dedicated_com`) let a key own one line, so on those plans `auto_bind` requires `quantity: 1` and a key holding no other line on such a plan (else `409 auto_bind_exceeds_plan`)."}}},"examples":{"auto_bind":{"summary":"Two lines owned by one API key","value":{"plan":"dedicated_ent","quantity":2,"area_codes":["415","628"],"auto_bind":"production"}},"area_codes":{"summary":"Two lines by area code","value":{"plan":"dedicated_com","quantity":2,"area_codes":["415","628"]}},"custom_requests":{"summary":"One custom line, one normal line","value":{"plan":"dedicated_com","quantity":2,"custom_requests":[{"notes":"Port in +15551234567 from T-Mobile. Account 123456789, PIN 4821."},null]}}}}}},"responses":{"202":{"description":"Purchase accepted; provisioning proceeds asynchronously.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"purchase_id":{"type":"string"},"status":{"type":"string","enum":["provisioning","action_required"]},"action_url":{"type":["string","null"],"description":"Present when `status` is `action_required`: complete card authentication here."}}}}},"example":{"data":{"purchase_id":"idem_abc123","status":"provisioning"}}}}},"400":{"description":"Invalid request. `code` includes `invalid_plan`, `line_limit_exceeded`, `invalid_custom_requests` (`custom_requests` isn't an array of objects or nulls), `custom_requests_exceed_quantity` (more entries than `quantity`), and `custom_requests_not_supported` (a custom request on a shared plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Payment required or failed. `code` is `no_payment_method` (no saved card, and the credit doesn't cover the purchase) or `payment_failed` (the card was declined).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Conflicts with a purchase rule, e.g. `shared_number_limit`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/channels/blooio/purchases/{purchaseId}":{"get":{"tags":["Channels"],"summary":"Get purchase status","description":"Poll the status of an asynchronous number purchase by its `purchase_id`. Returns `pending`, `completed` (every line has a number), or `failed`. A line awaiting Blooio staff (a custom request, or an out-of-stock area code or ZIP) has `phone_number: null` and the `ticket_id` of its provisioning ticket; the purchase stays `pending` until staff provision it. Requires the `numbers:read` scope for OAuth apps.","operationId":"getBlooioPurchase","parameters":[{"name":"purchaseId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Purchase status","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"purchase_id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","failed"]},"allocations":{"type":"array","items":{"type":"object","properties":{"binding_id":{"type":"string"},"phone_number":{"type":["string","null"],"description":"Null until the line has a number."},"type":{"type":["string","null"]},"ticket_id":{"type":["string","null"],"description":"The line's provisioning ticket when staff provision it by hand (custom request, or out-of-stock area code or ZIP). Read it with `GET /v4/tickets/{ticketId}`."}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/channels/{channel}":{"get":{"tags":["Channels"],"summary":"Get a channel","operationId":"getChannel","parameters":[{"$ref":"#/components/parameters/ChannelIdParam"}],"responses":{"200":{"description":"A channel","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Channel"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Channels"],"summary":"Remove (unsubscribe) a Blooio number","description":"Removes/unsubscribes an owned Blooio line, cancelling its subscription — the same flow as the dashboard unsubscribe button. Accepts either the E.164 number or the `ch_` channel id as `{channel}`. A `reasons` array (why the customer is unsubscribing) is required; the same reason handling updates the CRM, posts to Slack, and emits a `number.removed` webhook. Requires the `numbers:manage` scope for OAuth apps.","operationId":"removeBlooioNumber","parameters":[{"$ref":"#/components/parameters/ChannelIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["reasons"],"properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One or more churn reason codes/labels for the removal."}}},"example":{"reasons":["too_expensive","no_longer_needed"]}}}},"responses":{"200":{"description":"The line was removed.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"phone_number":{"type":"string"},"channel_id":{"type":["string","null"]},"reasons":{"type":"array","items":{"type":"string"}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/channels/{channel}/capabilities":{"get":{"tags":["Channels"],"summary":"Get channel capabilities","description":"Returns supported protocols, content types, actions, and interactive features for a channel.","operationId":"getChannelCapabilities","parameters":[{"$ref":"#/components/parameters/ChannelIdParam"}],"responses":{"200":{"description":"Channel capabilities","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"channel_id":{"type":"string"},"type":{"$ref":"#/components/schemas/ChannelType"},"capabilities":{"$ref":"#/components/schemas/ChannelCapabilities"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/channels/{channel}/health":{"get":{"tags":["Channels"],"summary":"Get line health","description":"Messaging health for one dedicated or inbound Blooio line: its live safety state plus reply, delivery, and risk metrics over the trailing `days`. Built for polling.\n\n**Freshness.** `safety` is read live on every request, so a new safety action shows on the next poll. The metrics (`replies`, `delivery`, `risk`, `daily`) are recomputed at most every 5 minutes and may be served up to 30 minutes old while a recompute runs in the background. Read `computed_at` (equal to `window.end`) rather than assuming freshness. Polling more often than every 5 minutes returns the same metrics; polling by the `ch_` channel id is cheapest, because a phone number or alias is resolved first.\n\n**First-reply rate.** `replies.first_reply_rate` is the share of conversations this line started that got a written reply (reactions don't count). At the default `days=7` it is the same number the safety system's one-way check uses: with more than 10 new conversations a day, a rate below 0.4 slows the line, and it pauses new conversations after 48 hours in that pattern or once the rate falls below 0.2.\n\n**Risk reply rate.** `risk.factors.reply_rate` uses a different definition: a conversation counts as replied once it has 3 or more inbound messages, whoever started it.\n\n**Delivery comparison.** The safety system compares the last 72 hours of delivery against a 7-day baseline. `days=3` approximates the recent sample, and subtracting its counts from `days=7` approximates the baseline.\n\n**Days.** Day-bucketed values (`replies.new_conversations`, `replies.first_replies`, `daily`) use UTC days. Shared and trial lines return `403 health_unsupported_for_line_type`; non-Blooio channels return `403 health_unsupported_for_channel_type`.","operationId":"getChannelHealth","parameters":[{"$ref":"#/components/parameters/ChannelIdParam"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":30,"default":7},"description":"Trailing window in days, 1 to 30. Anything else returns `400 invalid_window`."}],"responses":{"200":{"description":"Line health","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ChannelHealth"}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/channels/{channel}/settings":{"get":{"tags":["Channels"],"summary":"Get channel settings","description":"Per-channel settings for channel types that support them. `settings` and `available` are per channel type: Blooio (P2P numbers) exposes `auto_mark_read`, `auto_share_contact`, and `imessage_only`; Apple Messages for Business and WhatsApp Business expose `opener`; Blooio Voice exposes `inbound`, who answers the number's calls and how long they ring. `available[key]` says whether THIS channel may turn `key` on (type-gated). A channel whose type has no settings yet returns `403 settings_unsupported_for_channel_type`.","operationId":"getChannelSettings","parameters":[{"$ref":"#/components/parameters/ChannelIdParam"}],"responses":{"200":{"description":"Channel settings","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ChannelSettings"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Channels"],"summary":"Update channel settings","description":"Partial update of a channel's settings (send only the keys you want to change). Keys are per channel type. Blooio (P2P numbers): `auto_mark_read` is available on dedicated and inbound lines; `auto_share_contact` is dedicated-only AND the line must have a contact card (name or photo) set up; `imessage_only` is available on every line. Apple Messages for Business and WhatsApp Business: `opener`, a partial update of the channel's opener (send only the fields you want to change). Blooio Voice: `inbound`, with `handler` (`softphone` or `agent`) and `ring_timeout_seconds` (5 to 120); `agent` needs a live Blooio agent that owns the number. Turning a setting OFF is always allowed. Errors return a machine-readable `code`: `settings_unsupported_for_channel_type` (403, a channel type without settings), `auto_mark_read_not_allowed` / `auto_share_contact_not_allowed` (403, line type can't enable it), `contact_card_not_set_up` (403, enable auto_share_contact with no contact card), `agent_unavailable` (409, the `agent` handler on a number no live Blooio agent owns), `no_settings_provided` (422, empty update), `invalid_settings` (422, unknown key or field, a value of the wrong type, or an opener turned on without its template), `invalid_invitation` (422, an AMB opener template missing a required parameter), `template_not_approved` (422, a WhatsApp opener template that isn't approved on this channel). A malformed channel selector or non-object body is `400`.","operationId":"updateChannelSettings","parameters":[{"$ref":"#/components/parameters/ChannelIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelSettingsUpdate"},"examples":{"autoMarkRead":{"summary":"Blooio: enable auto mark-read","value":{"auto_mark_read":true}},"autoShareContact":{"summary":"Blooio: enable auto share contact (dedicated + contact card)","value":{"auto_share_contact":true}},"iMessageOnly":{"summary":"Blooio: start conversations only with contacts on iMessage","value":{"imessage_only":true}},"voiceInbound":{"summary":"Blooio Voice: have the number's Blooio agent answer its calls","value":{"inbound":{"handler":"agent","ring_timeout_seconds":20}}},"ambOpener":{"summary":"Apple Messages for Business: open new conversations with an invitation","value":{"opener":{"enabled":true,"template_id":"binaryChoice.engage.withImage","parameters":{"brandName":"Acme","brandLogo":"https://example.com/logo.png"}}}},"whatsappOpener":{"summary":"WhatsApp Business: open new conversations with an approved template","value":{"opener":{"enabled":true,"name":"welcome","variables":["Acme"]}}}}}}},"responses":{"200":{"description":"Updated channel settings","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ChannelSettings"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"`agent_unavailable`: the `agent` handler was set on a number no live Blooio agent owns.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/channels/{channel}/profile":{"put":{"tags":["Channels"],"summary":"Update channel profile","description":"Partial update of the channel profile (`display_name`, `about`, `email`, `avatar`). Stored under `metadata.profile` and returned on `GET /channels/{channel}`. Null or empty string clears a field. Unknown keys are rejected. This writes Blooio metadata only; it does not push a display name to the device.","operationId":"updateChannelProfile","parameters":[{"$ref":"#/components/parameters/ChannelIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelProfile"},"example":{"display_name":"Blooio Support","about":"We reply within minutes.","email":"support@blooio.com"}}}},"responses":{"200":{"description":"Updated channel, including `profile`","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Channel"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/channels/{channel}/messages":{"post":{"tags":["Channels"],"summary":"Send a message on a specific channel","description":"Channel-scoped equivalent of `POST /messages` with an explicit `from`: `:channel` accepts the same phone number (URL-encode `+` as `%2B`), alias, or `ch_...` value `from` accepts, and the body omits `from`. Multiple recipients on a group-capable channel (blooio/whatsapp) form a single group thread; on other channels they fan out to individual sends (max 100).","operationId":"sendMessageToChannel","parameters":[{"$ref":"#/components/parameters/ChannelIdParam"},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendToChannelRequest"},"examples":{"text":{"summary":"Simple text","value":{"to":"+15551234567","text":"Hello from Blooio!"}}}}}},"responses":{"200":{"description":"Dry-run preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSendResult"}}}},"201":{"description":"Message accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSendResult"}}}},"207":{"description":"Multi-recipient fan-out with mixed results.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FanOutResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/SafetyBlocked"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/ConversationLimited"},"501":{"$ref":"#/components/responses/NotImplemented"}}}},"/priorities":{"get":{"tags":["Priorities"],"summary":"List priorities","description":"Lists channel priorities owned by the calling API key.","operationId":"listPriorities","parameters":[{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"}],"responses":{"200":{"description":"A page of priorities","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Priority"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Priorities"],"summary":"Create a priority","description":"Creates a channel priority. Channels sharing a `priority` (and type) form a pool; ascending priority is the send-time waterfall. The first priority created for a key becomes its default unless `is_default: false` is set.","operationId":"createPriority","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePriorityRequest"}}}},"responses":{"201":{"description":"Created priority","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Priority"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/priorities/{priorityId}":{"get":{"tags":["Priorities"],"summary":"Get a priority","operationId":"getPriority","parameters":[{"$ref":"#/components/parameters/PriorityIdParam"}],"responses":{"200":{"description":"A priority","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Priority"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Priorities"],"summary":"Update a priority","description":"Updates a priority's name, default flag, and/or channel set. When `channels` is supplied it replaces the priority's channels wholesale.","operationId":"updatePriority","parameters":[{"$ref":"#/components/parameters/PriorityIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePriorityRequest"}}}},"responses":{"200":{"description":"Updated priority","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Priority"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}},"delete":{"tags":["Priorities"],"summary":"Delete a priority","operationId":"deletePriority","parameters":[{"$ref":"#/components/parameters/PriorityIdParam"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/contacts":{"get":{"tags":["Contacts"],"summary":"List contacts","description":"Lists contacts. Cursor pagination is the default. Supplying `offset`, `q`, `tag`, `agent_id`, `sort`, or `filter` switches to offset pagination and includes `pagination.total`.","operationId":"listContacts","parameters":[{"name":"identifier","in":"query","schema":{"type":"string"},"description":"Filter to the contact owning this phone/email."},{"name":"q","in":"query","schema":{"type":"string"},"description":"Case-insensitive search across contact names, identities, and tags."},{"name":"tag","in":"query","schema":{"type":"string"},"description":"Case-insensitive tag filter."},{"name":"agent_id","in":"query","schema":{"type":"string"},"description":"Only contacts this agent has had a conversation with."},{"name":"sort","in":"query","schema":{"type":"string","enum":["recent","oldest","name_asc","name_desc"]}},{"name":"filter","in":"query","schema":{"type":"string","enum":["none","has_tags","no_tags","inbound_last","outbound_last"]}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0},"description":"Zero-based offset. Cannot be combined with cursor."},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"}],"responses":{"200":{"description":"A page of contacts","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]},"pagination":{"type":"object","properties":{"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Contacts"],"summary":"Create a contact","description":"Creates a contact, optionally with one identity (phone/email on a channel type).","operationId":"createContact","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactRequest"}}}},"responses":{"201":{"description":"Created contact","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/contacts/{contactId}":{"get":{"tags":["Contacts"],"summary":"Get a contact","operationId":"getContact","parameters":[{"$ref":"#/components/parameters/ContactIdParam"}],"responses":{"200":{"description":"A contact","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Contacts"],"summary":"Update a contact","operationId":"updateContact","parameters":[{"$ref":"#/components/parameters/ContactIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Updated contact","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}},"delete":{"tags":["Contacts"],"summary":"Delete a contact","description":"Soft-deletes a contact and its identities.","operationId":"deleteContact","parameters":[{"$ref":"#/components/parameters/ContactIdParam"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/contacts/{contactId}/merge":{"post":{"tags":["Contacts"],"summary":"Merge a contact","description":"Collapses two auto-created contacts for the same person into one. The survivor is the `{contactId}` in the path; the `source_contact_id` in the body is absorbed into it. Every identity on the source is re-parented onto the survivor, tags are unioned, the survivor keeps its own name (falling back to the source's), and the source becomes a deprecated tombstone stamped with `merged_into`. Because chats and messages reference identities (not contacts), all conversations and timeline entries follow the moved identities automatically — nothing is rewritten or lost, and reads such as the survivor's timeline immediately reflect the merge. Idempotent: re-merging the same source into the same survivor returns 200; a source already merged into a different contact returns 409. Emits a `contact.merged` webhook event.","operationId":"mergeContact","parameters":[{"$ref":"#/components/parameters/ContactIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["source_contact_id"],"properties":{"source_contact_id":{"type":"string","description":"The contact to merge into the survivor, prefixed with `ct_`. Must differ from the path contact.","example":"ct_01HZ0000000000000000000000"}}}}}},"responses":{"200":{"description":"The merged survivor contact, now including the re-parented identities.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},"400":{"description":"The source equals the survivor, or an id is malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"}}},"example":{"error":"ApiError","message":"Cannot merge a contact into itself","status":400,"code":"cannot_merge_self"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"The source contact has already been merged into a different contact.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"}}},"example":{"error":"ApiError","message":"Contact has already been merged","status":409,"code":"contact_already_merged"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/contacts/{contactId}/identities":{"get":{"tags":["Contacts"],"summary":"List contact identities","operationId":"listContactIdentities","parameters":[{"$ref":"#/components/parameters/ContactIdParam"}],"responses":{"200":{"description":"Identities","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactIdentity"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Contacts"],"summary":"Attach an identity","description":"Attaches a phone/email identity (on a channel type) to a contact.","operationId":"attachContactIdentity","parameters":[{"$ref":"#/components/parameters/ContactIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachIdentityRequest"}}}},"responses":{"201":{"description":"Attached identity","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ContactIdentity"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/contacts/{contactId}/identities/{identityId}":{"patch":{"tags":["Contacts"],"summary":"Update an identity","description":"Renames a contact identity in place. An optional name updates the parent contact in the same request.","operationId":"updateContactIdentity","parameters":[{"$ref":"#/components/parameters/ContactIdParam"},{"name":"identityId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier of the contact identity, prefixed with `cid_`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["identifier"],"properties":{"identifier":{"type":"string"},"name":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"Updated identity","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ContactIdentity"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}},"delete":{"tags":["Contacts"],"summary":"Detach an identity","operationId":"detachContactIdentity","parameters":[{"$ref":"#/components/parameters/ContactIdParam"},{"name":"identityId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier of the contact identity (a phone/email tied to the contact), prefixed with `cid_`. Returned by the List contact identities endpoint."}],"responses":{"200":{"description":"Detached","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"detached":{"type":"boolean"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/contacts/{contactId}/capabilities":{"get":{"tags":["Contacts"],"summary":"Get contact capabilities","description":"Returns per-identity reachability/capabilities (iMessage/SMS/RCS, etc.) for a contact. For iMessage (blooio) identities this is a LIVE per-number lookup performed by an active iMessage channel — the request is rejected with 409 if the API key has no active iMessage (blooio) channel provisioned. `rcs` says what each of the organization's verified Blooio RCS senders can show each of the contact's phone numbers.","operationId":"getContactCapabilities","parameters":[{"$ref":"#/components/parameters/ContactIdParam"}],"responses":{"200":{"description":"Capabilities per identity","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"contact_id":{"type":"string"},"identities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"identifier":{"type":"string"},"channel_id":{"type":["string","null"]},"capabilities":{"type":"object","additionalProperties":true}}}},"rcs":{"type":"array","description":"One entry per verified Blooio RCS sender and phone number.","items":{"type":"object","properties":{"channel_id":{"type":"string","description":"The RCS sender."},"phone_number":{"type":"string"},"reachable":{"type":"boolean","description":"Whether the sender may message the number yet: it's `live`, or the number is one of its accepted test devices."},"features":{"type":["array","null"],"items":{"type":"string"},"description":"The RCS features the phone supports, such as `RICHCARD_CAROUSEL` or `ACTION_DIAL`; null when it can't receive RCS. A phone that gets RCS is rechecked weekly; one that doesn't, daily."},"error":{"type":"object","description":"Present when the check couldn't be made: `code` is `rcs_probe_failed`.","properties":{"code":{"type":"string"}}}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"No active iMessage (blooio) channel is provisioned for this API key, so live iMessage/SMS/RCS detection is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"}}},"example":{"error":"ApiError","message":"No active iMessage (blooio) channel is provisioned for this API key. Live per-number iMessage/SMS/RCS detection requires an active iMessage channel; provision one or contact support to enable it.","status":409,"code":"no_active_blooio_channel"}}}}}}},"/contacts/{contactId}/timeline":{"get":{"tags":["Contacts"],"summary":"Get contact timeline","description":"A single, chronological cross-channel activity feed for a contact, unifying every conversation the contact takes part in — both 1:1 chats keyed on the contact's identities and group chats where the contact is a current member — across all channel types. After a merge, the survivor's timeline includes the absorbed contact's history automatically. Each entry is a polymorphic envelope tagged by `type`; ordered newest-first by `occurred_at`. By default only `message` entries are returned; pass `include_events=true` to interleave lifecycle and chat events.","operationId":"getContactTimeline","parameters":[{"$ref":"#/components/parameters/ContactIdParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"name":"include_events","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"When true, interleaves non-message activity (delivery/read receipts, reactions, chat/group/typing changes) from the events ledger into the feed as `message_event` / `chat_event` entries. Defaults to false (messages only)."}],"responses":{"200":{"description":"Timeline page","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TimelineItem"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/contacts/{contactId}/tags":{"get":{"tags":["Contacts"],"summary":"List contact tags","operationId":"listContactTags","parameters":[{"$ref":"#/components/parameters/ContactIdParam"}],"responses":{"200":{"description":"Tags","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Contacts"],"summary":"Add contact tags","operationId":"addContactTags","parameters":[{"$ref":"#/components/parameters/ContactIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}},"tag":{"type":"string"}}}}}},"responses":{"200":{"description":"Merged tags","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/contacts/{contactId}/tags/{tag}":{"delete":{"tags":["Contacts"],"summary":"Remove a contact tag","operationId":"removeContactTag","parameters":[{"$ref":"#/components/parameters/ContactIdParam"},{"name":"tag","in":"path","required":true,"schema":{"type":"string"},"description":"The tag to remove from the contact. URL-encode values that contain spaces or special characters."}],"responses":{"200":{"description":"Remaining tags","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/groups":{"get":{"tags":["Groups"],"summary":"List groups","operationId":"listGroups","parameters":[{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"}],"responses":{"200":{"description":"A page of groups","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Group"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Groups"],"summary":"Create a group","description":"Creates a group chat on a group-capable channel (blooio/whatsapp) with one or more members. No iMessage conversation exists yet: the first message sent to the group opens it, and `chat_linked` becomes `true` once it does. There is no separate linking step.\n\nOn that first send the device may hand back an iMessage conversation that another of your groups already holds with the same people. The new group is then merged into that one. Its group id keeps working for `GET /groups/{groupId}`, `GET /groups/{groupId}/members` and sends with `to.group_id`, and its chat id for `GET /chats/{chatId}`; each resolves to the surviving group, whose `id` is the canonical one. Every other request addressed to a merged id (updates, deletes, chat actions) returns 404, so switch to the canonical id once you have it.","operationId":"createGroup","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupRequest"}}}},"responses":{"201":{"description":"Created group","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Group"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/groups/{groupId}":{"get":{"tags":["Groups"],"summary":"Get a group","description":"A group id that was merged into another group on its first send (see Create a group) returns the surviving group. Compare the returned `id` with the one you asked for to pick up the canonical id.","operationId":"getGroup","parameters":[{"$ref":"#/components/parameters/GroupIdParam"}],"responses":{"200":{"description":"A group","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Group"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Groups"],"summary":"Update a group","operationId":"updateGroup","parameters":[{"$ref":"#/components/parameters/GroupIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Updated group","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Group"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}},"delete":{"tags":["Groups"],"summary":"Delete a group","operationId":"deleteGroup","parameters":[{"$ref":"#/components/parameters/GroupIdParam"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/groups/{groupId}/members":{"get":{"tags":["Groups"],"summary":"List group members","description":"Members follow the group on the phone: people who join are added and people who leave or are removed drop off, each with a `group.member_added` / `group.member_removed` webhook. For a merged group id, lists the members of the surviving group.","operationId":"listGroupMembers","parameters":[{"$ref":"#/components/parameters/GroupIdParam"}],"responses":{"200":{"description":"Members","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GroupMember"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/groups/{groupId}/icon":{"post":{"tags":["Groups"],"summary":"Set group icon","description":"Uploads a group icon. Max 10MB; image/jpeg|png|gif|webp|heic|heif. Requires the group chat to be linked on a device.","operationId":"setGroupIcon","parameters":[{"$ref":"#/components/parameters/GroupIdParam"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"icon":{"type":"string","format":"binary"}},"required":["icon"]}}}},"responses":{"200":{"description":"Icon set","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"icon_url":{"type":["string","null"]}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}},"delete":{"tags":["Groups"],"summary":"Remove group icon","operationId":"removeGroupIcon","parameters":[{"$ref":"#/components/parameters/GroupIdParam"}],"responses":{"200":{"description":"Icon removed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"removed":{"type":"boolean"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/chats":{"get":{"tags":["Chats"],"summary":"List chats","description":"Lists conversations, most recent first. Filter by channel type, state, channel, or contact.","operationId":"listChats","parameters":[{"name":"type","in":"query","schema":{"$ref":"#/components/schemas/ChannelType"}},{"name":"state","in":"query","schema":{"$ref":"#/components/schemas/ChatState"}},{"name":"channel_id","in":"query","schema":{"type":"string"}},{"name":"contact_id","in":"query","schema":{"type":"string"}},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"}],"responses":{"200":{"description":"A page of chats","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Chat"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Chats"],"summary":"Find or create a chat","description":"Finds or creates a 1:1 chat with a recipient on a channel. Returns the chat (with `created` indicating whether it was newly created).","operationId":"createChat","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatRequest"}}}},"responses":{"200":{"description":"Existing chat","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCreated"}}}},"201":{"description":"Created chat","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCreated"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/chats/{chatId}":{"get":{"tags":["Chats"],"summary":"Get a chat","description":"The chat of a group that was merged into another group on its first send returns the surviving group's chat on the same number.","operationId":"getChat","parameters":[{"$ref":"#/components/parameters/ChatIdParam"}],"responses":{"200":{"description":"A chat","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Chat"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Chats"],"summary":"Update a chat","description":"Sets chat state (`open`/`closed`) on an Apple Messages for Business chat. Chats on every other channel return 422 `state_not_writable`: `closed` reflects the customer ending an Apple Messages for Business conversation, and no other protocol has an equivalent.","operationId":"updateChat","parameters":[{"$ref":"#/components/parameters/ChatIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["open","closed"],"description":"Apple Messages for Business chats only. `closed` blocks further sends to the chat with 409 `chat_closed_by_user`; an Apple Messages for Business chat also closes itself when the customer ends the conversation, and reopens when they message again."}}}}}},"responses":{"200":{"description":"Updated chat","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Chat"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/chats/{chatId}/typing":{"post":{"tags":["Chats"],"summary":"Start/stop typing indicator","description":"Shows or clears a business-to-customer typing indicator. Supported on Blooio channels and Apple Messages for Business.","operationId":"setTyping","parameters":[{"$ref":"#/components/parameters/ChatIdParam"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["started","stopped"],"default":"started"}}}}}},"responses":{"200":{"description":"Typing state applied","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chat_id":{"type":"string"},"state":{"type":"string"},"at":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}},"delete":{"tags":["Chats"],"summary":"Stop typing indicator","description":"Clears the business-to-customer typing indicator. Supported on Blooio channels and Apple Messages for Business.","operationId":"stopTyping","parameters":[{"$ref":"#/components/parameters/ChatIdParam"}],"responses":{"200":{"description":"Typing stopped","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chat_id":{"type":"string"},"state":{"type":"string"},"at":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/chats/{chatId}/read":{"post":{"tags":["Chats"],"summary":"Mark chat as read","description":"Sends a read receipt. Blooio channels only.","operationId":"markChatRead","parameters":[{"$ref":"#/components/parameters/ChatIdParam"}],"responses":{"200":{"description":"Marked read","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chat_id":{"type":"string"},"read":{"type":"boolean"},"at":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/chats/{chatId}/contact-card":{"post":{"tags":["Chats"],"summary":"Share contact card","description":"Shares the sender's contact card into a chat. Blooio channels only.","operationId":"shareContactCard","parameters":[{"$ref":"#/components/parameters/ChatIdParam"}],"responses":{"200":{"description":"Shared","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chat_id":{"type":"string"},"shared":{"type":"boolean"},"at":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/chats/{chatId}/focus":{"get":{"tags":["Chats"],"summary":"Read Focus status","description":"Reads whether the other person in the chat has notifications silenced by a Focus, as their device shares it over iMessage. `silenced` means new messages arrive quietly; to break through for a message you sent, use Notify Anyway. `unknown` means the device has no status for this person (for example, a handle Messages has not seen yet, or someone who does not share Focus status). Apple does not expose a way to turn another person's Focus on or off. Returns 409 for group chats and non-Blooio channels.","operationId":"getChatFocus","parameters":[{"$ref":"#/components/parameters/ChatIdParam"}],"responses":{"200":{"description":"Focus status","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chat_id":{"type":"string"},"status":{"type":"string","enum":["none","silenced","unknown"]}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/chats/{chatId}/polls":{"post":{"tags":["Polls"],"summary":"Send a poll","description":"Sends a native iMessage poll to a chat. Requires a title and 2+ options. Blooio channels only.","operationId":"sendPoll","parameters":[{"$ref":"#/components/parameters/ChatIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendPollRequest"}}}},"responses":{"201":{"description":"Poll queued","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Poll"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/chats/{chatId}/polls/{pollId}/vote":{"post":{"tags":["Polls"],"summary":"Vote on a poll","description":"Casts or toggles a vote by `option_index` (0-based) or `option` text. Blooio channels only.","operationId":"votePoll","parameters":[{"$ref":"#/components/parameters/ChatIdParam"},{"name":"pollId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier of the poll, prefixed with `msg_` (a poll shares the id of its underlying message)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VotePollRequest"}}}},"responses":{"200":{"description":"All votes toggled off","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PollVoteResult"}}}}}},"201":{"description":"Vote recorded","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PollVoteResult"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/chats/{chatId}/polls/{pollId}":{"get":{"tags":["Polls"],"summary":"Get poll results","operationId":"getPollResults","parameters":[{"$ref":"#/components/parameters/ChatIdParam"},{"name":"pollId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier of the poll, prefixed with `msg_` (a poll shares the id of its underlying message)."}],"responses":{"200":{"description":"Poll results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PollResults"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/chats/{chatId}/background":{"get":{"tags":["Chats"],"summary":"Get chat background","description":"Reads the chat's background image (Blooio channels). Reads live from the device.","operationId":"getChatBackground","parameters":[{"$ref":"#/components/parameters/ChatIdParam"}],"responses":{"200":{"description":"Background info","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chat_id":{"type":"string"},"has_background":{"type":"boolean"},"background_id":{"type":["string","null"]},"background_version":{"type":["integer","null"]},"background_url":{"type":["string","null"]}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"put":{"tags":["Chats"],"summary":"Set chat background","description":"Uploads a chat background image. Max 10MB; image/jpeg|png|gif|webp|heic|heif. Blooio channels only.","operationId":"setChatBackground","parameters":[{"$ref":"#/components/parameters/ChatIdParam"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"background":{"type":"string","format":"binary"}},"required":["background"]}}}},"responses":{"200":{"description":"Background set","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chat_id":{"type":"string"},"background_id":{"type":"string"},"background_url":{"type":["string","null"]}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Chats"],"summary":"Remove chat background","operationId":"removeChatBackground","parameters":[{"$ref":"#/components/parameters/ChatIdParam"}],"responses":{"200":{"description":"Background removed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chat_id":{"type":"string"},"removed":{"type":"boolean"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/chats/{chatId}/messages":{"get":{"tags":["Messages"],"summary":"List chat messages","description":"Lists messages in a chat, newest first by default. Use `order=asc` for oldest first.","operationId":"listChatMessages","parameters":[{"$ref":"#/components/parameters/ChatIdParam"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"}],"responses":{"200":{"description":"A page of messages","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Messages"],"summary":"Send a message to a chat","description":"Sends a message into an existing chat. Both the sender channel and recipient are inferred from the chat, so `from` and `to` must not be supplied. Returns the message object at the top level (not wrapped in `data`).","operationId":"sendMessageToChat","parameters":[{"$ref":"#/components/parameters/ChatIdParam"},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendToChatRequest"}}}},"responses":{"200":{"description":"Dry-run preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSendResult"}}}},"201":{"description":"Message accepted. The message object is returned with its current `status`; a synchronously rejected send returns `status: \"failed\"` with an `error` object (still 201, since the message was created).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSendResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/SafetyBlocked"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/ConversationLimited"},"501":{"$ref":"#/components/responses/NotImplemented"}}}},"/messages":{"post":{"tags":["Messages"],"summary":"Send a message","description":"The primary endpoint for starting a message. The common send is entirely scalar: `{ \"from\": \"+15551230001\", \"to\": \"+15551234567\", \"text\": \"Hello\" }`.\n\n`from` is one optional string:\n\n1. **Phone number** — `\"from\": \"+15551230001\"` selects your exact numbered channel with that address.\n2. **Alias** — `\"from\": \"support\"` selects the non-numbered channel (Apple Messages for Business / RCS Business) with that organization-wide alias.\n3. **Channel id** — `\"from\": \"ch_...\"` is the advanced exact-channel form.\n4. **Automatic** — omit `from` to use the key's default priority / automatic routing.\n\nAdvanced routing controls (each mutually exclusive with `from`): `\"priority_id\": \"priority_...\"` routes through an explicit priority; `\"channel_type\": \"blooio\"` constrains automatic/priority routing to one type. `\"hybrid\"` is a deprecated alias: `true` routes like an omitted `from`, and a phone number routes through the priority of that number's owner.\n\nAutomatic routing is history-first and content-aware. It tries the channel the contact last messaged in on (else the one you last messaged them on, else the pool number they were first sent from), then each step of the priority in order. Channels of one type sharing a step form a pool, and a contact keeps one number in it. A step the priority's `settings.steps` marks `outreach_only` is for contacts who haven't replied: once a contact has replied on a channel in the priority, those steps go last and the contact's history on them doesn't choose the channel. A step's `transition` message goes out with the first message a contact reached on that step gets from the next step, before (`pre`) or after (`post`) it, and `routing.transition` reports it. A channel that can't take the send (opted out, over a limit, outside a WhatsApp customer-service window, no address for this contact) is passed over for the next; `routing.fallthrough` lists the channels passed over. An Apple Messages for Business channel with no identity for the contact, or a WhatsApp Business channel outside its customer-service window, sends its opener instead when the channel's `opener` setting is on (`PATCH /channels/{channel}/settings`): the invitation or approved template replaces the request's content, which is not delivered, and `routing.opener` says which went out. With the opener off, the channel is passed over. A send handed off but not confirmed in time counts as sent and is not tried elsewhere. When no channel takes it the request fails with `422 no_reachable_channel`, and `error.details.attempts` lists every channel tried or skipped. When the contact's number is banned, the priority's `settings.on_banned_sticky` decides: `switch_number` moves them to another number in the pool, `error` fails with `409 sticky_number_unavailable` (`error.details.channel_id`). When the router reaches an Apple Messages for Business or WhatsApp Business channel that can't carry the content to the contact yet, and the channel's opener is on, the opener goes out and the message waits behind it (`status: \"pending\"`, `routing.opener`) until the contact accepts the invitation or replies; later sends to the contact wait behind the same opener. A declined invitation fails what waited (`amb_invitation_declined`) and the channel is passed over from then on. Sending an invitation as the content while one is unanswered fails with `409 amb_invitation_pending`. Poll content currently routes only through Blooio. Cross-type Apple Messages for Business routing requires a contact with an Apple Messages for Business identity, or the channel's invitation opener. Existing groups require an exact sender whose channel owns the group, or the deprecated `hybrid` control when its owner holds that channel. Returns the resolved scalar `from` plus the chosen `channel_id`, `chat_id`, and routing explanation.","operationId":"sendMessage","parameters":[{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"},"examples":{"routed_text":{"summary":"Simple routed text","value":{"to":"+15551234567","text":"Hello from Blooio!"}},"exact_number":{"summary":"Send from an exact number","value":{"from":"+18582849901","to":"+15551234567","text":"Hello!"}},"alias":{"summary":"Send from an aliased sender","value":{"from":"support","to":"opaque-customer-id","text":"How can we help?"}},"media_with_caption":{"summary":"Media with a caption","value":{"from":"+18582849901","to":"+15551234567","text":"Check this out","attachments":["https://example.com/photo.jpg"]}},"blooio_type":{"summary":"Constrain routing to Blooio","value":{"channel_type":"blooio","to":"+15551234567","text":"Hello from Blooio!"}},"poll":{"summary":"Route a Blooio poll","value":{"channel_type":"blooio","to":"+15551234567","poll":{"title":"Choose one","options":["A","B"]}}},"dry_run":{"summary":"Validate/route only","value":{"to":"+15551234567","text":"Test","dry_run":true}}}}}},"responses":{"200":{"description":"Dry-run preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSendResult"}}}},"201":{"description":"Message accepted. The message object is returned with its current `status`; with an exact `from`, a synchronously rejected send returns `status: \"failed\"` with an `error` object (still 201, since the message was created). An automatically routed send moves on to the next channel instead (see `routing.fallthrough`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSendResult"}}}},"207":{"description":"Multi-recipient fan-out with mixed results (some recipients sent, some failed). See per-recipient items in `data`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FanOutResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/SafetyBlocked"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"description":"Validation failed, or a multi-recipient fan-out in which every recipient failed (in which case the body is a `FanOutResult` rather than an error envelope).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Error"},{"$ref":"#/components/schemas/FanOutResult"}]}}}},"429":{"$ref":"#/components/responses/ConversationLimited"},"501":{"$ref":"#/components/responses/NotImplemented"}}}},"/chats/{chatId}/messages/{messageId}":{"get":{"tags":["Messages"],"summary":"Get a message","operationId":"getChatMessage","parameters":[{"$ref":"#/components/parameters/ChatIdParam"},{"$ref":"#/components/parameters/MessageIdParam"}],"responses":{"200":{"description":"A message","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Message"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/chats/{chatId}/messages/{messageId}/status":{"get":{"tags":["Messages"],"summary":"Get message status","description":"Lightweight delivery status of a message.","operationId":"getMessageStatus","parameters":[{"$ref":"#/components/parameters/ChatIdParam"},{"$ref":"#/components/parameters/MessageIdParam"}],"responses":{"200":{"description":"Message status","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MessageStatus"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/chats/{chatId}/messages/{messageId}/events":{"get":{"tags":["Messages"],"summary":"List message events","description":"Lifecycle events for a message (sent, delivered, read, reactions, ...).","operationId":"listMessageEvents","parameters":[{"$ref":"#/components/parameters/ChatIdParam"},{"$ref":"#/components/parameters/MessageIdParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"}],"responses":{"200":{"description":"Message events","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MessageEvent"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/chats/{chatId}/messages/{messageId}/reactions":{"post":{"tags":["Messages"],"summary":"React to a message","description":"Adds or removes a tapback reaction on any message in the chat — inbound (received) or outbound — addressed by the message `id` from the List messages endpoint. Use a `+` prefix to add and `-` to remove (e.g. `+love`, `-love`). Returns 404 if the message isn't in the chat and 409 if it hasn't been dispatched to the device yet. Blooio channels only.","operationId":"addReaction","parameters":[{"$ref":"#/components/parameters/ChatIdParam"},{"$ref":"#/components/parameters/MessageIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reaction":{"type":"string","description":"e.g. '+love' to add, '-love' to remove.","examples":["+love","+like","+laugh","+emphasize","+question","+dislike"]}},"required":["reaction"]}}}},"responses":{"200":{"description":"Reaction applied","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message_id":{"type":"string"},"reaction":{"type":"string"},"at":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/chats/{chatId}/messages/{messageId}/notify":{"post":{"tags":["Messages"],"summary":"Notify Anyway","description":"Breaks through the recipient's Focus for a message you sent, the same as tapping Notify Anyway in Messages. Use it when Read Focus status reports `silenced`. Calling it again for a message that was already notified succeeds. It cannot be undone. Returns 404 if the message isn't in the chat. Returns 409 for an inbound message, an SMS or RCS message, a message that hasn't been dispatched to the device yet, a group chat, or a non-Blooio channel.","operationId":"notifyMessage","parameters":[{"$ref":"#/components/parameters/ChatIdParam"},{"$ref":"#/components/parameters/MessageIdParam"}],"responses":{"200":{"description":"Recipient notified","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chat_id":{"type":"string"},"message_id":{"type":"string"},"notified":{"type":"boolean"},"at":{"type":"integer"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhooks","operationId":"listWebhooks","parameters":[{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"}],"responses":{"200":{"description":"A page of webhooks","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Webhooks"],"summary":"Create a webhook","description":"Subscribes an HTTPS endpoint to events. Returns the signing secret once, on creation.","operationId":"createWebhook","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}}},"responses":{"201":{"description":"Created webhook (includes signing_secret once)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookWithSecret"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/webhooks/versions":{"get":{"tags":["Webhooks"],"summary":"List webhook payload versions","description":"Every payload version a subscription can be set to, newest first, with what each one changed. New subscriptions default to the version marked `latest`. Set a subscription's version with `api_version` on create or update.","operationId":"listWebhookVersions","responses":{"200":{"description":"Supported payload versions, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookApiVersion"}}}},"example":{"data":[{"version":"2026-10-01","latest":true,"released_at":"2026-10-01","summary":"Removes fields left over from v2 payloads and chat_guid, and reports message errors by their public code.","changes":["Removed event, timestamp, external_id, internal_id, participants and legacy_reaction_id from typing.*, message.reaction, contact.shared and poll.voted. Use the envelope's type, created_at and id, and data.contact, data.group and data.channel_address.","Removed the flat group_id and group_name wherever data carries a group object (group.* events keep group_id). Read group.group_id and group.name.","Removed chat_guid. Use chat_id and group.group_id to tell conversations apart.","error.code on message events is one of the public error codes (for example service_unavailable or delivery_unconfirmed), the same code the REST API returns. 2026-09-01 keeps the previous codes; error.message is the public description on both."]},{"version":"2026-09-01","latest":false,"released_at":"2026-09-01","summary":"Baseline: the payload every subscription received before versioning.","changes":[]}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/webhooks/{webhookId}":{"get":{"tags":["Webhooks"],"summary":"Get a webhook","operationId":"getWebhook","parameters":[{"$ref":"#/components/parameters/WebhookIdParam"}],"responses":{"200":{"description":"A webhook","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhook"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Webhooks"],"summary":"Update a webhook","description":"Updates url, status (`active`/`disabled`), or the payload `api_version`. A version change applies to the next event delivered; deliveries already made, and replays of them, keep the version they were sent with.","operationId":"updateWebhook","parameters":[{"$ref":"#/components/parameters/WebhookIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookRequest"}}}},"responses":{"200":{"description":"Updated webhook","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhook"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}},"delete":{"tags":["Webhooks"],"summary":"Delete a webhook","operationId":"deleteWebhook","parameters":[{"$ref":"#/components/parameters/WebhookIdParam"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/webhooks/{webhookId}/secret/rotate":{"post":{"tags":["Webhooks"],"summary":"Rotate webhook signing secret","description":"Rotates and returns a new signing secret (once).","operationId":"rotateWebhookSecret","parameters":[{"$ref":"#/components/parameters/WebhookIdParam"}],"responses":{"200":{"description":"New secret","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"signing_secret":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/webhooks/{webhookId}/deliveries":{"get":{"tags":["Webhooks"],"summary":"List webhook deliveries","description":"Recent delivery attempts for a webhook. Also available at `/webhooks/{webhookId}/logs`.","operationId":"listWebhookDeliveries","parameters":[{"$ref":"#/components/parameters/WebhookIdParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"}],"responses":{"200":{"description":"A page of deliveries","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/webhooks/{webhookId}/deliveries/{deliveryId}/replay":{"post":{"tags":["Webhooks"],"summary":"Replay a webhook delivery","description":"Re-sends a past delivery. Also available at `/webhooks/{webhookId}/logs/{deliveryId}/replay`.","operationId":"replayWebhookDelivery","parameters":[{"$ref":"#/components/parameters/WebhookIdParam"},{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier of the webhook delivery attempt, prefixed with `wdel_`. Returned by the List webhook deliveries endpoint."}],"responses":{"201":{"description":"Replay queued","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"replay_of":{"type":"string"},"status":{"type":"string"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/events":{"get":{"tags":["Events"],"summary":"List events","description":"Unified activity feed (message lifecycle, polls, groups, reactions, typing, payments, `safety.state_changed`, `safety.number_banned`). Filter by type, chat, or message.","operationId":"listEvents","parameters":[{"name":"type","in":"query","schema":{"type":"string"},"description":"Event type or wildcard, e.g. `message.received` or `message.*`."},{"name":"chat_id","in":"query","schema":{"type":"string"}},{"name":"message_id","in":"query","schema":{"type":"string"}},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"}],"responses":{"200":{"description":"A page of events","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/events/{eventId}":{"get":{"tags":["Events"],"summary":"Get an event","operationId":"getEvent","parameters":[{"name":"eventId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier of the event, prefixed with `evt_`. Returned by the List events endpoint."}],"responses":{"200":{"description":"An event","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Event"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/tickets":{"get":{"tags":["Tickets"],"summary":"List tickets","description":"Lists the organization's support tickets, newest first. Includes call-forwarding requests opened with `POST /me/numbers/{number}/call-forwarding`. OAuth apps need `tickets:read`.","operationId":"listTickets","parameters":[{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/TicketStatus"},"description":"Only tickets in this status."},{"name":"type","in":"query","schema":{"$ref":"#/components/schemas/TicketType"},"description":"Only tickets of this type, e.g. `call_forwarding`."},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"}],"responses":{"200":{"description":"A page of tickets","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}},"post":{"tags":["Tickets"],"summary":"Open a ticket","description":"Opens a support ticket for the Blooio team. Every ticket opens at `medium` priority; only Blooio support changes it, so sending `priority` returns `422 priority_not_allowed`. To request call forwarding, prefer `POST /me/numbers/{number}/call-forwarding`, which takes the destination as a field. When the organization has the support assistant enabled, a support or technical ticket starts an assistant reply: poll `GET /tickets/{ticketId}` while `assistant.reply_pending` is true, then read `GET /tickets/{ticketId}/comments`. A billing ticket opened here is not answered by the assistant. OAuth apps need `tickets:write`.","operationId":"createTicket","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTicketRequest"}}}},"responses":{"201":{"description":"Ticket opened","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Ticket"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/tickets/{ticketId}":{"get":{"tags":["Tickets"],"summary":"Get a ticket","description":"Returns one ticket, including `assistant`. Poll this to check a call-forwarding request: its `forwarding.state` reads `pending`, `in_progress`, `completed`, or `failed`, and a closed ticket always reads `completed`. After opening a ticket or adding a comment, poll while `assistant.reply_pending` is true, then read the comments. `can_confirm_answer` or `can_choose_escalation` means another comment returns `409 assistant_decision_pending` until `POST /tickets/{ticketId}/resolution`. OAuth apps need `tickets:read`.","operationId":"getTicket","parameters":[{"$ref":"#/components/parameters/TicketIdParam"}],"responses":{"200":{"description":"A ticket","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Ticket"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Tickets"],"summary":"Update a ticket's status","description":"Changes a ticket's status, for example to close a request you no longer need. Only `status` can change: `priority` is set by Blooio support and returns `422 priority_not_allowed`. Purchase, system, and billing tickets are managed by Blooio and return `403`. OAuth apps need `tickets:write`.","operationId":"updateTicket","parameters":[{"$ref":"#/components/parameters/TicketIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTicketRequest"}}}},"responses":{"200":{"description":"The updated ticket","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Ticket"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/tickets/{ticketId}/comments":{"get":{"tags":["Tickets"],"summary":"List ticket comments","description":"Lists a ticket's public comments, oldest first: the request itself, replies from Blooio support, and your replies. OAuth apps need `tickets:read`.","operationId":"listTicketComments","parameters":[{"$ref":"#/components/parameters/TicketIdParam"}],"responses":{"200":{"description":"The ticket's comments","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TicketComment"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Tickets"],"summary":"Reply to a ticket","description":"Adds a reply. A ticket waiting on you moves back to `in_progress`. Closed tickets and tickets whose `can_comment` is false return `403`. While `assistant.can_confirm_answer` or `assistant.can_choose_escalation` is true, this returns `409 assistant_decision_pending` and writes nothing; answer that choice with `POST /tickets/{ticketId}/resolution`. A successful reply on an eligible ticket schedules the assistant: poll `GET /tickets/{ticketId}` while `assistant.reply_pending` is true. OAuth apps need `tickets:write`.","operationId":"addTicketComment","parameters":[{"$ref":"#/components/parameters/TicketIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000,"description":"The reply. Leading and trailing whitespace is trimmed."}},"required":["content"]}}}},"responses":{"201":{"description":"Reply added","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TicketComment"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"`assistant_decision_pending`: the assistant is waiting for a yes/no or an escalate-or-continue choice. Call `POST /tickets/{ticketId}/resolution` before sending another comment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/tickets/{ticketId}/resolution":{"post":{"tags":["Tickets"],"summary":"Answer the assistant","operationId":"submitTicketResolution","description":"Answers the support assistant. Send exactly one of `answered` and `choice`. `answered: true` closes the ticket. `answered: false` asks whether to escalate or keep chatting and leaves the ticket open. `choice: \"continue\"` keeps the assistant on the ticket. `choice: \"escalate\"` hands the ticket to a person. Sending both fields, neither field, or a value that is not one of those returns `422 invalid_body`. A ticket that is not waiting on that choice returns `409 assistant_choice_stale`. The response is the ticket, including `assistant`. OAuth apps need `tickets:write`.","parameters":[{"$ref":"#/components/parameters/TicketIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketResolutionRequest"}}}},"responses":{"200":{"description":"The ticket after the choice","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Ticket"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"`assistant_choice_stale`: this ticket is not waiting on that confirmation or escalation choice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`invalid_body`: send either `answered` (boolean) or `choice` (`escalate` or `continue`), not both and not neither.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tickets/{ticketId}/reply-retry":{"post":{"tags":["Tickets"],"summary":"Retry a stalled assistant reply","operationId":"retryTicketReply","description":"Asks the support assistant to try the latest customer comment again. Does not add a comment. The original schedule counts as the first attempt; two retries are allowed, and the next one hands the ticket to a person. A closed ticket, a ticket the assistant does not answer, a comment that is no longer the latest, a staff reply, or an existing handoff returns `409 assistant_retry_refused`. The response is the ticket, including `assistant`. Poll while `assistant.reply_pending` is true. OAuth apps need `tickets:write`.","parameters":[{"$ref":"#/components/parameters/TicketIdParam"}],"responses":{"200":{"description":"The ticket after the retry was accepted or handed off","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Ticket"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"`assistant_retry_refused`: this reply can no longer be retried.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/phone-numbers/lookup":{"get":{"tags":["Phone Numbers"],"summary":"Look up a phone number","description":"Parses a phone number: its formats, country, numbering-plan type, and for a North American number, its area code's location. Free without `enrich`. With `enrich`, also looks the number up on the phone network for the data sets named, and bills the lookup as usage on the organization's usage invoice: a charge for the lookup, which answers `portability`, plus one for each other data set named; see [pricing](https://docs.blooio.com/reference/v4/phone-numbers/lookupPhoneNumber#pricing). A number that isn't valid isn't looked up or billed. Requires an enterprise plan.\n\n## Pricing\n\nPer number looked up with `enrich`, billed on the organization's next monthly invoice, or as soon as its unbilled usage reaches $100. A lookup without `enrich`, a number that isn't valid, and a lookup that fails aren't billed.\n\n| Data set | Price per number | What it answers |\n|---|---|---|\n| Any enriched lookup | $0.0016 | `portability`: whether and when the number was ported, its line type, and its serving carrier |\n| `carrier` | +$0.0027 | The carrier name and line type, and a mobile number's network codes (MCC/MNC) |\n| `caller_name` | +$0.0032 | The caller ID (CNAM) name |\n| `enhanced_caller_name` | +$0.0213 | The caller's name, and whether it's a business |\n| `caller_identity` | +$0.0469 | The owner's name and postal address |\n\nFor example, `enrich=carrier,caller_name` is $0.0075 per number: $0.0016 + $0.0027 + $0.0032.","operationId":"lookupPhoneNumber","parameters":[{"name":"number","in":"query","required":true,"schema":{"type":"string"},"description":"Phone number in E.164."},{"name":"enrich","in":"query","required":false,"style":"form","explode":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/LookupDataSet"},"minItems":1},"example":"carrier,caller_name","description":"Data sets to look the number up for, comma-separated; each is billed. Omit it for the free parse."}],"responses":{"200":{"description":"Lookup result","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PhoneNumberLookup"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"description":"`invalid_enrich`: `enrich` named no data set, or one that isn't a data set; `details.allowed` lists them. `lookup_rejected`: the phone network refused to look the number up. Nothing is billed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the phone network couldn't be reached, and nothing is billed. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`telephony_unavailable`: enriched lookups aren't configured. Look up without `enrich`, or retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Phone Numbers"],"summary":"Look up a phone number (POST)","description":"Same as the GET form, accepting the number and `enrich` in a JSON body. Free without `enrich`; with it, billed per data set named, at the [lookup's prices](https://docs.blooio.com/reference/v4/phone-numbers/lookupPhoneNumber#pricing). Requires an enterprise plan.","operationId":"lookupPhoneNumberPost","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number in E.164."},"enrich":{"type":"array","items":{"$ref":"#/components/schemas/LookupDataSet"},"minItems":1,"description":"Data sets to look the number up for; each is billed. Omit it for the free parse."}},"required":["number"]}}}},"responses":{"200":{"description":"Lookup result","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PhoneNumberLookup"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"description":"`invalid_enrich`: `enrich` named no data set, or one that isn't a data set; `details.allowed` lists them. `lookup_rejected`: the phone network refused to look the number up. Nothing is billed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the phone network couldn't be reached, and nothing is billed. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`telephony_unavailable`: enriched lookups aren't configured. Look up without `enrich`, or retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/phone-numbers/batch":{"post":{"tags":["Phone Numbers"],"summary":"Batch phone number lookup","description":"Looks up up to 100 phone numbers, as the single lookup does, in the order given. Free without `enrich`; with it, each valid number's lookup is billed per data set named, at the [lookup's prices](https://docs.blooio.com/reference/v4/phone-numbers/lookupPhoneNumber#pricing). A number whose lookup failed has `enrichment_error` and isn't billed. Requires an enterprise plan.","operationId":"batchLookupPhoneNumbers","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"enrich":{"type":"array","items":{"$ref":"#/components/schemas/LookupDataSet"},"minItems":1,"description":"Data sets to look every number up for; each is billed per number. Omit it for the free parse."}},"required":["numbers"]}}}},"responses":{"200":{"description":"Lookup results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumberLookup"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"description":"`numbers` is missing, empty, over 100, or not all strings; or `invalid_enrich`: `enrich` named no data set, or one that isn't a data set, and `details.allowed` lists them. Nothing is looked up or billed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/participants":{"get":{"tags":["Chats"],"summary":"List chat participants","operationId":"listChatParticipants","x-blooio-status":"planned","parameters":[{"$ref":"#/components/parameters/ChatIdParam"}],"responses":{"501":{"$ref":"#/components/responses/NotImplemented"}}},"post":{"tags":["Chats"],"summary":"Add a chat participant","operationId":"addChatParticipant","x-blooio-status":"planned","parameters":[{"$ref":"#/components/parameters/ChatIdParam"}],"responses":{"501":{"$ref":"#/components/responses/NotImplemented"}}}},"/chats/{chatId}/participants/{identityId}":{"delete":{"tags":["Chats"],"summary":"Remove a chat participant","operationId":"removeChatParticipant","x-blooio-status":"planned","parameters":[{"$ref":"#/components/parameters/ChatIdParam"},{"name":"identityId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier of the contact identity, prefixed with `cid_`. Returned by the List contact identities endpoint."}],"responses":{"501":{"$ref":"#/components/responses/NotImplemented"}}}},"/attachments":{"post":{"tags":["Messages"],"summary":"Register an attachment","operationId":"createAttachment","x-blooio-status":"planned","responses":{"501":{"$ref":"#/components/responses/NotImplemented"}}}},"/attachments/{attachmentId}":{"get":{"tags":["Messages"],"summary":"Get an attachment","operationId":"getAttachment","x-blooio-status":"planned","parameters":[{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier of the attachment, as referenced on a message's content."}],"responses":{"501":{"$ref":"#/components/responses/NotImplemented"}}}},"/templates":{"get":{"tags":["Messages"],"summary":"List templates","operationId":"listTemplates","x-blooio-status":"planned","responses":{"501":{"$ref":"#/components/responses/NotImplemented"}}},"post":{"tags":["Messages"],"summary":"Create a template","operationId":"createTemplate","x-blooio-status":"planned","responses":{"501":{"$ref":"#/components/responses/NotImplemented"}}}},"/templates/{templateId}":{"get":{"tags":["Messages"],"summary":"Get a template","operationId":"getTemplate","x-blooio-status":"planned","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier of the message template. Returned when you create a template or by the List templates endpoint."}],"responses":{"501":{"$ref":"#/components/responses/NotImplemented"}}},"delete":{"tags":["Messages"],"summary":"Delete a template","operationId":"deleteTemplate","x-blooio-status":"planned","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier of the message template. Returned when you create a template or by the List templates endpoint."}],"responses":{"501":{"$ref":"#/components/responses/NotImplemented"}}}},"/api-keys":{"get":{"tags":["API Keys"],"summary":"List API keys","description":"Lists the installed organization's API keys with their metadata (name, type, expiry, blocked/deprecated state). The raw key values are returned so the app can reuse them.\n\n**Blooio Apps (OAuth) only.** Requires the `apikeys:read` scope. API-key and dashboard authentication are rejected with `403 oauth_token_required`.","operationId":"listApiKeys","responses":{"200":{"description":"The organization's API keys.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}},"post":{"tags":["API Keys"],"summary":"Create an API key","description":"Mints a new API key for the installed organization and returns it. This is the **only** way to create an API key programmatically — the raw key is returned once in this response; store it securely.\n\nA new key owns no numbers until you assign channels to it (see Assign a channel to an API key) and, by default, has no explicit expiry (`valid_until: -1`). Organizations are capped at a fixed number of active keys; exceeding it returns `409 api_key_limit_reached`.\n\n**Blooio Apps (OAuth) only.** Requires the `apikeys:manage` scope. API-key and dashboard authentication are rejected with `403 oauth_token_required`.","operationId":"createApiKey","requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"responses":{"201":{"description":"The created API key. The `api_key` value is shown only in this response.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiKey"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/api-keys/{apiKey}":{"get":{"tags":["API Keys"],"summary":"Get an API key","description":"Fetches a single API key's metadata by its value.\n\n**Blooio Apps (OAuth) only.** Requires the `apikeys:read` scope. API-key and dashboard authentication are rejected with `403 oauth_token_required`.","operationId":"getApiKey","parameters":[{"$ref":"#/components/parameters/ApiKeyParam"}],"responses":{"200":{"description":"The API key metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiKey"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["API Keys"],"summary":"Deprecate an API key","description":"Deprecates (revokes) an API key. The key stops authenticating immediately and its number/channel ownership is released. Deprecation is idempotent and cannot be undone via the API.\n\n**Blooio Apps (OAuth) only.** Requires the `apikeys:manage` scope. API-key and dashboard authentication are rejected with `403 oauth_token_required`.","operationId":"deprecateApiKey","parameters":[{"$ref":"#/components/parameters/ApiKeyParam"}],"responses":{"200":{"description":"The key was deprecated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"api_key":{"type":"string"},"deprecated":{"type":"boolean"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api-keys/{apiKey}/channels":{"get":{"tags":["API Keys"],"summary":"List an API key's channels","description":"Lists the numbered senders (Blooio and Twilio) the API key currently owns — the same lines the send layer will consider when a request authenticates with this key.\n\n**Blooio Apps (OAuth) only.** Requires the `apikeys:read` scope. API-key and dashboard authentication are rejected with `403 oauth_token_required`.","operationId":"listApiKeyChannels","parameters":[{"$ref":"#/components/parameters/ApiKeyParam"}],"responses":{"200":{"description":"The lines owned by this key.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"The owned line in E.164, e.g. `+15551234567`. Usable as the `{channel}` reference on the assign/unassign endpoints and as `from` when sending."},"type":{"type":"string","description":"Provider of the line (`blooio` or `twilio`)."},"banned":{"type":"boolean"}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api-keys/{apiKey}/channels/{channel}":{"put":{"tags":["API Keys"],"summary":"Assign a channel to an API key","description":"Makes the API key the owner of a channel's line, so messages sent with that key can originate from it. This is the programmatic equivalent of assigning a number to a key on the dashboard **Channels** board.\n\nThe key becomes the number's sole owner: if another API key or integration owned it, that ownership is deprecated. Assigning is idempotent — re-assigning a line the key already owns returns `unchanged: true`.\n\nOnly numbered, key-ownable channels can be assigned. Blooio lines are the primary case (Twilio where applicable); non-numbered channel types return `422 channel_not_assignable`. On plans without number pools, a key may own at most one line (`400`).\n\n**Blooio Apps (OAuth) only.** Requires the `apikeys:manage` scope. API-key and dashboard authentication are rejected with `403 oauth_token_required`.","operationId":"assignChannelToApiKey","parameters":[{"$ref":"#/components/parameters/ApiKeyParam"},{"$ref":"#/components/parameters/ChannelIdParam"}],"responses":{"200":{"description":"The channel is now owned by the key.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiKeyChannelAssignment"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}},"delete":{"tags":["API Keys"],"summary":"Unassign a channel from an API key","description":"Removes the API key's ownership of a channel's line. The key can no longer send from it.\n\n**Blooio Apps (OAuth) only.** Requires the `apikeys:manage` scope. API-key and dashboard authentication are rejected with `403 oauth_token_required`.","operationId":"unassignChannelFromApiKey","parameters":[{"$ref":"#/components/parameters/ApiKeyParam"},{"$ref":"#/components/parameters/ChannelIdParam"}],"responses":{"200":{"description":"The channel is no longer owned by the key.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiKeyChannelAssignment"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}},"/ai/bloobability/v2/decide":{"post":{"tags":["AI"],"summary":"Decide policies against a conversation","description":"Decides every policy you send against one conversation with Bloobability v2. Each result carries two calibrated numbers in [0, 1]: `probability` (the policy holds) and `answerable` (the conversation contains enough to judge it). There is no verdict and no threshold: choose your own. A low `answerable` never changes `probability`.\n\n## Tiers\nYou choose the model with `tier`. Nothing routes between tiers or falls back from one to the other, and the response's `tier` echoes your choice.\n- `instant` is the fast tier, for short, explicit questions whose deciding facts are stated in the conversation. Its `answerable` is not a reliable check for missing information: on the latest fresh panel it flagged 0 of 34 missing facts.\n- `full` is the more capable tier, for reversals, conditions and written rules, several speakers, longer threads and conversations that may be missing facts. Use it when unsure. It reads the conversation once per policy, so many policies over a long thread are its slowest requests.\n\nThe tiers are separate models and do not return identical probabilities. Pin the tier, and store `model_version`, when you compare numbers across requests.\n\n## Contract\nThe body is checked exactly: unknown fields, explicit `null`, blank strings, duplicate JSON keys and duplicate message or policy IDs are rejected with 400, and `error.details` names the failing `reason`, `path` and `rule`. Message `timestamp`s, when given, must be RFC 3339 with an offset, non-decreasing, and not later than `assessment_time`. Bodies over 1 MiB are rejected with 413. A request that exceeds the chosen tier's context is rejected with 422 and never truncated. 429 and 503 `model_unavailable` mean the model is busy or restarting: retry with backoff. Errors are `{ \"error\": { \"code\", \"message\", \"details\" } }`; 5xx bodies carry no `details`.\n\nPolicies come back in request order and their IDs are echoed unchanged. The call is stateless.","operationId":"decideBloobabilityV2","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BloobabilityV2DecideRequest"},"example":{"tier":"full","messages":[{"id":"m1","role":"customer","speaker_id":"customer-1","text":"I'd like a full refund."},{"id":"m2","role":"agent","speaker_id":"agent-1","text":"I can help with that."}],"policies":[{"id":"refund_request","definition":"The customer currently asks for their money back."}]}}}},"responses":{"200":{"description":"One decision per requested policy, in request order. The example's numbers are illustrative, not measured output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BloobabilityV2DecideResponse"},"example":{"tier":"full","model_version":"bloobability-v2-full-040b3c1d4f9151a4","policies":[{"id":"refund_request","probability":0.94,"answerable":0.98}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"description":"The request body exceeds 1 MiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The conversation and policies exceed the chosen tier's context (`context_limit_exceeded`). Shorten the thread or send fewer or shorter policies; nothing is truncated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The tier's queue is full (`queue_full`, `queue_timeout`). Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The model host gave an unexpected answer (`upstream_error`). Retry later. 5xx bodies carry no `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The model is restarting or unreachable (`model_unavailable`, `upstream_unavailable`): retry with backoff. `inference_timeout` and `gpu_memory_exhausted` mean this request made the model fail and are not worth retrying unchanged: send a shorter conversation or fewer policies. `not_configured` is a fault on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"The model did not answer in time (`upstream_timeout`). Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ai/bloobability/v1/decide":{"post":{"tags":["AI"],"summary":"Bloobability v1 (deprecated, no longer available)","deprecated":true,"description":"**Deprecated.** The Bloobability v1 model is no longer available, so every authenticated call returns 410 `deprecated` and the request body is not read. Use `POST /ai/bloobability/v2/decide` with the Bloobability v2 models instead; see the [Blooio inference page](https://blooio.com/inference).","operationId":"decideBloobabilityV1","responses":{"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"410":{"description":"Bloobability v1 is deprecated and its model is no longer available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"deprecated","message":"Bloobability v1 is deprecated and its model is no longer available. Use POST /v4/ai/bloobability/v2/decide with the Bloobability v2 models: https://blooio.com/inference","details":{"replacement":"POST /v4/ai/bloobability/v2/decide","docs_url":"https://blooio.com/inference"}}}}}}}}},"/numbers":{"get":{"tags":["Numbers"],"summary":"List numbers","description":"Every number the organization rents from Blooio, newest first: iMessage lines and Blooio SMS and Blooio Voice numbers alike, one entry per number. `products` says what each does and `channels` lists the channel behind each product. OAuth apps need `numbers:read`.","operationId":"listOrgNumbers","parameters":[{"name":"products","in":"query","schema":{"type":"string"},"example":"sms,voice","description":"Comma-separated `imessage`, `sms`, `voice`. Returns numbers carrying any of them; omit for every number."},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"}],"responses":{"200":{"description":"A page of numbers","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Number"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"`invalid_products`, `invalid_cursor`, or `invalid_limit`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Numbers"],"summary":"Buy numbers","description":"Buy 1 to 10 US local numbers found with `GET /numbers/available`, with `products` turned on. The purchase finishes asynchronously: the response is a `provisioning` purchase, and `number.purchase.completed` or `number.purchase.failed` fires when it settles (or poll `GET /numbers/purchases/{purchaseId}`). Retrying with the same `Idempotency-Key` and body returns the same purchase. Each number bills monthly from its purchase, charged to the organization's card before it's ordered. An SMS number sends texts once it's assigned to a provisioned 10DLC campaign, which Blooio does automatically when the organization has one. OAuth apps need `numbers:manage`.","operationId":"buyNumbers","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Unique key that makes the purchase safe to retry."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNumberPurchaseRequest"},"examples":{"smsAndVoice":{"summary":"A number for texting and calling","value":{"phone_numbers":["+14155550123"],"products":["sms","voice"]}}}}}},"responses":{"202":{"description":"The purchase, provisioning","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/NumberPurchase"}}}}}},"400":{"description":"`products_required`, `invalid_products`, `idempotency_key_required`, or `invalid_phone_numbers` (with the offending `phone_numbers`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/TelecomPaymentRequired"},"409":{"description":"`number_limit_reached` (with the organization's `limit`), `number_unavailable` (with the `phone_numbers` already taken), or `idempotency_key_reused_with_different_body`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`number_unavailable`: the carrier refused the order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`telephony_unavailable`: Blooio Voice isn't configured. Buy without `voice`, or retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/numbers/available":{"get":{"tags":["Numbers"],"summary":"Search available numbers","description":"US local numbers you can buy that support every product in `products`. Results are live inventory: a number can be taken between the search and the purchase. OAuth apps need `numbers:read`.","operationId":"searchAvailableNumbers","parameters":[{"name":"products","in":"query","required":true,"schema":{"type":"string"},"example":"sms,voice","description":"Comma-separated `sms`, `voice`."},{"name":"area_code","in":"query","schema":{"type":"string","pattern":"^[2-9]\\d{2}$"},"description":"Three-digit US area code."},{"name":"region","in":"query","schema":{"type":"string","pattern":"^[A-Z]{2}$"},"description":"Two-letter US state code."},{"name":"locality","in":"query","schema":{"type":"string"},"description":"City."},{"name":"contains","in":"query","schema":{"type":"string","pattern":"^\\d{1,10}$"},"description":"Digits the number contains."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"description":"Maximum numbers to return."}],"responses":{"200":{"description":"Available numbers; `has_more` is always false","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AvailableNumber"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"`products_required`, `invalid_products`, `invalid_area_code`, `invalid_region`, or `invalid_contains`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"description":"`invalid_search`: the carrier refused the search.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/numbers/purchases/{purchaseId}":{"get":{"tags":["Numbers"],"summary":"Get a number purchase","description":"A purchase made with `POST /numbers`. Its numbers appear in `GET /numbers` once it's `completed`. OAuth apps need `numbers:read`.","operationId":"getNumberPurchase","parameters":[{"$ref":"#/components/parameters/PurchaseIdParam"}],"responses":{"200":{"description":"The purchase","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/NumberPurchase"}}}}}},"400":{"description":"`invalid_purchase_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`purchase_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/numbers/{number}":{"get":{"tags":["Numbers"],"summary":"Get a number","description":"One of the organization's numbers, with its products and channels. OAuth apps need `numbers:read`.","operationId":"getNumber","parameters":[{"$ref":"#/components/parameters/TelecomNumberParam"}],"responses":{"200":{"description":"The number","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Number"}}}}}},"400":{"description":"`invalid_number`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`number_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Numbers"],"summary":"Update a number","description":"Turn a Blooio SMS or Blooio Voice number's products on and off, or assign its SMS channel to a 10DLC campaign. Turning `sms` off takes the number off its campaign. iMessage lines can't be changed here. OAuth apps need `numbers:manage`.","operationId":"updateNumber","parameters":[{"$ref":"#/components/parameters/TelecomNumberParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNumberRequest"},"examples":{"addVoice":{"summary":"Turn on calling","value":{"products":["sms","voice"]}},"assignCampaign":{"summary":"Move the number to another campaign","value":{"campaign_id":"camp_018f7b2a-77aa-7c22-9d3e-4f5a6b7c8d9e"}}}}}},"responses":{"200":{"description":"The updated number","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Number"}}}}}},"400":{"description":"`invalid_number`, `invalid_products`, `invalid_campaign_id`, or `empty_update`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`number_not_found` (including iMessage lines) or `campaign_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`sms_product_required` (a `campaign_id` for a number without `sms`) or `campaign_not_approved`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`number_update_rejected`: the carrier refused the change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`telephony_unavailable`: Blooio Voice isn't configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Numbers"],"summary":"Release a number","description":"Give a number up. A Blooio SMS or Blooio Voice number is released to the carrier at once and its channels retired; `number.removed` fires for each channel. An iMessage line is removed the same way as `DELETE /channels/{channel}`. OAuth apps need `numbers:manage`.","operationId":"releaseNumber","parameters":[{"$ref":"#/components/parameters/TelecomNumberParam"}],"responses":{"200":{"description":"The released number","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ReleasedNumber"}}}}}},"400":{"description":"`invalid_number`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`number_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/10dlc/options":{"get":{"tags":["10DLC"],"summary":"List registration options","description":"The entity types, verticals, and campaign use cases a brand and campaign can name. OAuth apps need `numbers:read`.","operationId":"getTenDlcOptions","responses":{"200":{"description":"Registration options","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TenDlcOptions"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/10dlc/brand":{"get":{"tags":["10DLC"],"summary":"Get the brand","description":"The organization's 10DLC brand. OAuth apps need `numbers:read`.","operationId":"getTenDlcBrand","responses":{"200":{"description":"The brand","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TenDlcBrand"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`brand_not_found`: the organization hasn't registered a brand.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["10DLC"],"summary":"Register the brand","description":"Register the organization's brand, or resubmit it with corrected details. The registry reviews it asynchronously; `registration.brand.updated` fires as its `status` changes. A `SOLE_PROPRIETOR` brand must then verify its mobile number (`requires_otp`). The first registration charges a one-time fee, which also covers the first campaign's review, and refunds it if the registry rejects the request. OAuth apps need `numbers:manage`.","operationId":"putTenDlcBrand","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenDlcBrandRequest"},"examples":{"privateCompany":{"summary":"A private company","value":{"entity_type":"PRIVATE_PROFIT","display_name":"Acme","company_name":"Acme Inc.","ein":"12-3456789","email":"ops@acme.com","website":"https://acme.com","country":"US","vertical":"RETAIL"}}}}}},"responses":{"200":{"description":"The brand","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TenDlcBrand"}}}}}},"400":{"description":"`invalid_entity_type`, `missing_fields` (with the missing `fields`), or `invalid_field` (with the `field`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/TelecomPaymentRequired"},"409":{"description":"`brand_submission_in_progress`: another submission is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`brand_rejected`: the registry refused the brand.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/10dlc/brand/otp":{"post":{"tags":["10DLC"],"summary":"Send the brand verification PIN","description":"Text a verification PIN to a `SOLE_PROPRIETOR` brand's `mobile_phone`. OAuth apps need `numbers:manage`.","operationId":"sendTenDlcBrandOtp","responses":{"202":{"description":"The PIN was sent","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sent":{"type":"boolean","const":true}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`brand_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`otp_not_required`: the brand isn't a sole proprietor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`invalid_otp`: the registry refused to send a PIN.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["10DLC"],"summary":"Verify the brand PIN","description":"Submit the PIN texted by `POST /10dlc/brand/otp`. OAuth apps need `numbers:manage`.","operationId":"verifyTenDlcBrandOtp","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pin":{"type":"string","pattern":"^\\d{4,8}$"}},"required":["pin"]}}}},"responses":{"200":{"description":"The brand","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TenDlcBrand"}}}}}},"400":{"description":"`invalid_otp`: `pin` must be 4 to 8 digits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`brand_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`otp_not_required`: the brand isn't a sole proprietor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`invalid_otp`: the PIN is wrong or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/10dlc/usecases/{usecase}/qualification":{"get":{"tags":["10DLC"],"summary":"Check a use case","description":"Whether the organization's brand qualifies for a campaign use case, and what carriers require of a campaign for it: how many sub use cases and samples it takes, which flags it must set, and whether its messages can include links or phone numbers. OAuth apps need `numbers:read`.","operationId":"getTenDlcUsecaseQualification","parameters":[{"name":"usecase","in":"path","required":true,"schema":{"type":"string"},"example":"MARKETING"}],"responses":{"200":{"description":"The qualification","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TenDlcUsecaseQualification"}}}}}},"400":{"description":"`invalid_field`: `usecase` isn't a registry code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`brand_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`brand_not_registered`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`usecase_not_qualified`: the brand can't register campaigns with this use case.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/10dlc/campaigns":{"get":{"tags":["10DLC"],"summary":"List campaigns","description":"The organization's 10DLC campaigns, newest first. OAuth apps need `numbers:read`.","operationId":"listTenDlcCampaigns","responses":{"200":{"description":"Every campaign; `has_more` is always false","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TenDlcCampaign"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["10DLC"],"summary":"Create a campaign","description":"Register a campaign under the organization's registered brand. The registry and carriers review it asynchronously; `registration.campaign.updated` fires as its `status` changes. Once a campaign reaches `mno_provisioned`, Blooio assigns the organization's unassigned SMS numbers to its oldest provisioned campaign. A campaign bills monthly until it can no longer send (`tcr_failed`, `tcr_expired`, `tcr_suspended`, or `mno_provisioning_failed`) or is canceled with `DELETE /10dlc/campaigns/{campaignId}`, and each one after the first that's reviewed charges a review fee; both are charged before it's submitted and refunded if the registry rejects the request. A campaign carriers would reject is refused before any charge, with every reason; one the registry still fails before review (`tcr_failed`) has its review fee refunded. OAuth apps need `numbers:manage`.","operationId":"createTenDlcCampaign","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTenDlcCampaignRequest"},"examples":{"customerCare":{"summary":"Customer care replies","value":{"usecase":"CUSTOMER_CARE","description":"Replies to customers who text Acme support about their orders.","message_flow":"Customers text our support number from the contact page at https://acme.com/contact, which states that they agree to receive replies.","samples":["Hi Sam, your order #1234 shipped today. Reply STOP to opt out.","Thanks for reaching out! An agent will reply shortly. Reply HELP for help."],"help_message":"Acme support: reply STOP to opt out. Questions? support@acme.com","optout_message":"You're unsubscribed from Acme texts. Reply START to resubscribe.","subscriber_optin":true,"subscriber_optout":true,"subscriber_help":true,"terms_and_conditions":true}}}}}},"responses":{"201":{"description":"The campaign","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TenDlcCampaign"}}}}}},"400":{"description":"`missing_fields` (with the missing `fields`), `invalid_field` (with the `field`), `terms_not_accepted`, or `campaign_not_qualified` (with `problems`, each a `field` and a `message`): carriers would reject the campaign for its text lengths or for what `GET /10dlc/usecases/{usecase}/qualification` requires.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/TelecomPaymentRequired"},"404":{"description":"`brand_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`brand_not_registered`, `campaign_limit_reached` (a sole proprietor brand holds one campaign), or `campaign_submission_in_progress` (the brand has a campaign still `submitting`; one is submitted at a time).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`campaign_rejected`: the registry refused the campaign; or `usecase_not_qualified`: the brand can't register campaigns with this use case.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. The campaign may still have been registered: it's listed as `submitting` until the registry confirms it or, after a few minutes, the next submission finds it was never received. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/10dlc/campaigns/{campaignId}":{"get":{"tags":["10DLC"],"summary":"Get a campaign","description":"One of the organization's 10DLC campaigns. OAuth apps need `numbers:read`.","operationId":"getTenDlcCampaign","parameters":[{"$ref":"#/components/parameters/CampaignIdParam"}],"responses":{"200":{"description":"The campaign","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TenDlcCampaign"}}}}}},"400":{"description":"`invalid_campaign_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`campaign_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["10DLC"],"summary":"Update campaign samples","description":"Replace a campaign's sample messages, the field carriers most often ask to change. OAuth apps need `numbers:manage`.","operationId":"updateTenDlcCampaign","parameters":[{"$ref":"#/components/parameters/CampaignIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"samples":{"type":"array","minItems":2,"maxItems":5,"items":{"type":"string"},"description":"Example messages, as recipients will see them."}},"required":["samples"]}}}},"responses":{"200":{"description":"The campaign","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TenDlcCampaign"}}}}}},"400":{"description":"`invalid_campaign_id` or `invalid_field`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`campaign_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`campaign_submission_in_progress`: the campaign is still being submitted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`campaign_rejected`: the registry refused the change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["10DLC"],"summary":"Cancel a campaign","description":"Deactivate a campaign with the registry, for good: it moves to `deactivated` and can't be restored or appealed. Its monthly charge stops, and the unused part of the current month is credited to the next invoice; review fees aren't refunded. Move any numbers on the campaign to another one first (`PATCH /numbers/{number}` with `campaign_id`). Retrying after any failure is safe, and canceling a campaign that's already `deactivated` returns it unchanged. `registration.campaign.updated` fires once. OAuth apps need `numbers:manage`.","operationId":"cancelTenDlcCampaign","parameters":[{"$ref":"#/components/parameters/CampaignIdParam"}],"responses":{"200":{"description":"The campaign, `deactivated`","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TenDlcCampaign"}}}}}},"400":{"description":"`invalid_campaign_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`campaign_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`campaign_has_numbers`: numbers are still on the campaign, listed in `phone_numbers`. `campaign_submission_in_progress`: the campaign is still being submitted. `campaign_closed`: the registry already closed it (`tcr_failed` or `tcr_expired`), so it isn't billed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`campaign_cancel_rejected`: the registry refused the cancellation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/10dlc/campaigns/{campaignId}/appeal":{"post":{"tags":["10DLC"],"summary":"Appeal a campaign","description":"Ask for a rejected campaign (`review_failed` or `mno_rejected`) to be reviewed again, saying what you fixed. An appeal charges a review fee, refunded if the registry rejects the request. OAuth apps need `numbers:manage`.","operationId":"appealTenDlcCampaign","parameters":[{"$ref":"#/components/parameters/CampaignIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","description":"What changed since the rejection."}},"required":["reason"]}}}},"responses":{"200":{"description":"The campaign","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TenDlcCampaign"}}}}}},"400":{"description":"`invalid_campaign_id` or `invalid_field`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/TelecomPaymentRequired"},"404":{"description":"`campaign_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`campaign_not_appealable`: the campaign wasn't rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`appeal_rejected`: the registry refused the appeal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rcs/brand":{"get":{"tags":["RCS"],"summary":"Get the RCS brand","description":"The organization's RCS brand. While it's `in_review`, reading it checks the review for news. OAuth apps need `numbers:read`.","operationId":"getRcsBrand","responses":{"200":{"description":"The brand","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RcsBrand"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`rcs_brand_not_found`: the organization hasn't registered an RCS brand.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["RCS"],"summary":"Register the RCS brand","description":"Register the organization's RCS brand and send it for review, or resubmit a `rejected` or `failed` one with corrected details. Once it's submitted the brand can't change, except its point of contact through `POST /rcs/brand/changes`. `registration.rcs_brand.updated` fires as its `status` changes. OAuth apps need `numbers:manage`.","operationId":"putRcsBrand","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RcsBrandDetails"},"examples":{"privateCompany":{"summary":"A private company","value":{"display_name":"Acme","legal_name":"Acme Inc.","legal_entity_type":"CORPORATION","organization_type":"PRIVATE_PROFIT","website":"https://acme.com","ein":"12-3456789","street":"1 Main St","city":"Austin","state":"TX","postal_code":"78701","country":"US","first_name":"Ada","last_name":"Lovelace","email":"ops@acme.com","phone":"+15125550100"}}}}}},"responses":{"200":{"description":"The brand","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RcsBrand"}}}}}},"400":{"description":"`missing_fields` (with the missing `fields`) or `invalid_field` (with the `field`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"description":"`rcs_brand_submission_in_progress` (another submission is still running) or `rcs_brand_locked` (the brand is in review or verified, so it can't change; carries `brand_status`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`rcs_brand_rejected`: the registry refused the brand, with the rejected `fields` when it named them.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the RCS network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rcs/brand/changes":{"post":{"tags":["RCS"],"summary":"Request a change to the RCS brand's contact","description":"Pay to change the point of contact of a brand that's `in_review` or `verified`; send only the fields that change. The request is charged once, whatever it changes, and Blooio carries it to Google. The brand keeps its contact until the request is `applied`. The brand has one open request at a time. OAuth apps need `numbers:manage`.","operationId":"requestRcsBrandChange","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","minProperties":1,"properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"title":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string","description":"E.164."}},"additionalProperties":false}}}},"responses":{"201":{"description":"The change request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RcsChange"}}}}}},"400":{"description":"`invalid_field` (including a field that can't change once submitted), `missing_fields`, or `no_changes` (every field already has that value).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/TelecomPaymentRequired"},"404":{"description":"`rcs_brand_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`rcs_brand_state_conflict` (carries `brand_status`; resubmit a draft, rejected, or failed brand instead) or `rcs_change_in_progress` (the brand already has an open request).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rcs/senders":{"get":{"tags":["RCS"],"summary":"List RCS senders","description":"The organization's RCS senders, newest first. OAuth apps need `numbers:read`.","operationId":"listRcsSenders","responses":{"200":{"description":"Every sender","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RcsSender"}},"has_more":{"type":"boolean","description":"Always `false`: every sender is returned."},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["RCS"],"summary":"Create an RCS sender","description":"Draft a sender under the organization's brand. It's an `rcs_business` channel from the start, `pending_verification` until Google verifies it, and nothing is sent for review until `POST /rcs/senders/{channelId}/submit`. Upload the logo and banner with `POST /rcs/assets` first. OAuth apps need `numbers:manage`.","operationId":"createRcsSender","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRcsSenderRequest"},"examples":{"orders":{"summary":"An order updates sender","value":{"use_case":"TRANSACTIONAL","alias":"acme-orders","profile":{"display_name":"Acme Orders","description":"Order and delivery updates from Acme.","logo_url":"https://cdn.blooio.com/rcs/logo.png","banner_url":"https://cdn.blooio.com/rcs/banner.png","brand_color":"#1A73E8","privacy_policy_url":"https://acme.com/privacy","terms_url":"https://acme.com/terms","website":{"url":"https://acme.com","label":"Shop"}}}}}}}},"responses":{"201":{"description":"The draft sender","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RcsSender"}}}}}},"400":{"description":"`missing_fields`, `invalid_field`, or `invalid_alias`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"description":"`rcs_brand_not_found` (register the brand first) or `alias_conflict` (another channel holds the alias).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rcs/senders/{channelId}":{"get":{"tags":["RCS"],"summary":"Get an RCS sender","description":"One of the organization's RCS senders. While it's under review, reading it checks the review for news. OAuth apps need `numbers:read`.","operationId":"getRcsSender","parameters":[{"$ref":"#/components/parameters/RcsSenderIdParam"}],"responses":{"200":{"description":"The sender","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RcsSender"}}}}}},"400":{"description":"`invalid_channel_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`rcs_sender_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["RCS"],"summary":"Update a draft RCS sender","description":"Change a `draft` sender's use case or profile fields; fields you leave out keep their values. Set `phone`, `email`, or `website` to `null` to remove it; one must remain. A submitted sender's name, logo, and banner change through `POST /rcs/senders/{channelId}/changes`. OAuth apps need `numbers:manage`.","operationId":"updateRcsSender","parameters":[{"$ref":"#/components/parameters/RcsSenderIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"use_case":{"$ref":"#/components/schemas/RcsUseCase"},"profile":{"$ref":"#/components/schemas/RcsSenderProfile"}}}}}},"responses":{"200":{"description":"The sender","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RcsSender"}}}}}},"400":{"description":"`invalid_channel_id` or `invalid_field`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`rcs_sender_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`rcs_sender_state_conflict`: the sender was already submitted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["RCS"],"summary":"Remove an RCS sender","description":"Stop using a sender for good: its channel stops sending and receiving, and its monthly fee stops, with the rest of the period credited. A sender Google has is then deleted there, which shows in `GET /rcs/changes` as a `sender_removal` request. Fees already charged aren't refunded. OAuth apps need `numbers:manage`.","operationId":"removeRcsSender","parameters":[{"$ref":"#/components/parameters/RcsSenderIdParam"}],"responses":{"200":{"description":"The sender was removed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"channel_id":{"type":"string"},"removed":{"type":"boolean","const":true}},"required":["channel_id","removed"]}}}}}},"400":{"description":"`invalid_channel_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`rcs_sender_not_found`: no such sender, or it was already removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`rcs_sender_submission_in_progress`: the sender is being submitted; try again once it's done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rcs/senders/{channelId}/submit":{"post":{"tags":["RCS"],"summary":"Submit an RCS sender","description":"Send a draft sender to Google for verification. The brand must be `verified`. Submitting charges the sender's verification, renewed yearly, and starts its monthly fee; if the registry refuses the sender, its verification is refunded, its month is credited back, and it stays a draft. Once submitted, add test devices and request the carrier launch; `registration.rcs_sender.updated` fires as its `status`, `section_statuses`, or `carrier_approvals` change. A retry after a lost response finds the same submission. OAuth apps need `numbers:manage`.","operationId":"submitRcsSender","parameters":[{"$ref":"#/components/parameters/RcsSenderIdParam"}],"responses":{"200":{"description":"The submitted sender","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RcsSender"}}}}}},"400":{"description":"`invalid_channel_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/TelecomPaymentRequired"},"404":{"description":"`rcs_sender_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`rcs_brand_not_found`, `rcs_brand_not_verified` (carries `brand_status`), `rcs_sender_submission_in_progress`, or `rcs_sender_state_conflict` (already submitted).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`rcs_sender_rejected`: the registry refused the sender, with the rejected `fields` when it named them.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the RCS network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rcs/senders/{channelId}/launch":{"post":{"tags":["RCS"],"summary":"Request an RCS sender's launch","description":"Ask the US carriers to launch a submitted sender, so it can message anyone rather than only its test devices. Carriers review how people opt in and what they'll receive; each carrier's answer arrives in `carrier_approvals`, and the sender is `live` once they approve. The launch details can be sent once. The organization needs credit or a card on file; the one-time launch fee is billed when T-Mobile approves, from the credit first. OAuth apps need `numbers:manage`.","operationId":"launchRcsSender","parameters":[{"$ref":"#/components/parameters/RcsSenderIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RcsLaunchDetails"}}}},"responses":{"200":{"description":"The sender","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RcsSender"}}}}}},"400":{"description":"`invalid_channel_id`, `missing_fields`, or `invalid_field`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/TelecomPaymentRequired"},"404":{"description":"`rcs_sender_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`rcs_sender_state_conflict`: the sender isn't submitted yet, or its launch was already requested.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`rcs_sender_rejected`: the registry refused the launch request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the RCS network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rcs/senders/{channelId}/changes":{"post":{"tags":["RCS"],"summary":"Request a change to an RCS sender","description":"Pay to change a submitted sender's `display_name`, `logo_url`, or `banner_url`; send only the fields that change. Each field changed is charged when you request it, and Blooio carries the change to Google and the carriers, who review it again. The sender keeps its profile until the request is `applied`. A sender has one open request at a time. OAuth apps need `numbers:manage`.","operationId":"requestRcsSenderChange","parameters":[{"$ref":"#/components/parameters/RcsSenderIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","minProperties":1,"properties":{"display_name":{"type":"string","maxLength":40},"logo_url":{"type":"string","format":"uri","description":"From `POST /rcs/assets` with `kind: logo`."},"banner_url":{"type":"string","format":"uri","description":"From `POST /rcs/assets` with `kind: banner`."}},"additionalProperties":false}}}},"responses":{"201":{"description":"The change request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RcsChange"}}}}}},"400":{"description":"`invalid_channel_id`, `invalid_field` (including a field that can't change once submitted), `missing_fields`, or `no_changes` (every field already has that value).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/TelecomPaymentRequired"},"404":{"description":"`rcs_sender_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`rcs_sender_state_conflict` (a draft is edited with `PATCH` instead) or `rcs_change_in_progress` (the sender already has an open request).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rcs/senders/{channelId}/test_devices":{"get":{"tags":["RCS"],"summary":"List an RCS sender's test devices","description":"The phones invited to test the sender before its launch. OAuth apps need `numbers:read`.","operationId":"listRcsTestDevices","parameters":[{"$ref":"#/components/parameters/RcsSenderIdParam"}],"responses":{"200":{"description":"Every test device","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RcsTestDevice"}},"has_more":{"type":"boolean","description":"Always `false`."},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"`invalid_channel_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`rcs_sender_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["RCS"],"summary":"Invite an RCS test device","description":"Invite a phone to test a submitted sender. The phone gets a prompt in Google Messages; once it accepts (`status` is `accepted`), the sender can message it as soon as Google verifies the sender, before any launch. OAuth apps need `numbers:manage`.","operationId":"addRcsTestDevice","parameters":[{"$ref":"#/components/parameters/RcsSenderIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone_number":{"type":"string","description":"The tester's phone number (E.164).","example":"+15125550100"}},"required":["phone_number"]}}}},"responses":{"201":{"description":"Every test device, with the new one","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RcsTestDevice"}}}}}}},"400":{"description":"`invalid_channel_id` or `invalid_field`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`rcs_sender_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`rcs_sender_state_conflict`: submit the sender first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`rcs_test_device_rejected`: the phone couldn't be invited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the RCS network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rcs/senders/{channelId}/test_devices/{testDeviceId}":{"delete":{"tags":["RCS"],"summary":"Remove an RCS test device","description":"Stop a phone from testing the sender. OAuth apps need `numbers:manage`.","operationId":"removeRcsTestDevice","parameters":[{"$ref":"#/components/parameters/RcsSenderIdParam"},{"name":"testDeviceId","in":"path","required":true,"schema":{"type":"string"},"description":"The `test_device_id` from the sender's test devices."}],"responses":{"200":{"description":"The remaining test devices","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RcsTestDevice"}}}}}}},"400":{"description":"`invalid_channel_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`rcs_sender_not_found` or `rcs_test_device_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the RCS network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rcs/assets":{"post":{"tags":["RCS"],"summary":"Upload an RCS asset","description":"Host an image or video a sender's profile or launch request points to, and get back its URL. Each `kind` has its own limits: `logo` is a 224×224 PNG or JPEG up to 50 KB; `banner` is a 1440×448 PNG or JPEG up to 200 KB; `opt_in_media` is a PNG or JPEG screenshot of the opt-in call to action, up to 5 MB; `test_video` is an MP4 or QuickTime video of the sender in use, up to 50 MB. OAuth apps need `numbers:manage`.","operationId":"uploadRcsAsset","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["logo","banner","opt_in_media","test_video"]},"file":{"type":"string","format":"binary"}},"required":["kind","file"]}}}},"responses":{"201":{"description":"The hosted asset","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string"},"url":{"type":"string","format":"uri","description":"Use as `logo_url`, `banner_url`, `call_to_action_media_url`, or `test_video_url`."}},"required":["kind","url"]}}}}}},"400":{"description":"`invalid_form_data`, `invalid_field`, `unsupported_media_type`, `file_too_large`, or `invalid_dimensions`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/rcs/changes":{"get":{"tags":["RCS"],"summary":"List RCS change requests","description":"The organization's change requests, newest first: paid changes to submitted senders and the brand, and removed senders' deletions. `registration.rcs_change.updated` fires as Blooio sends, applies, or rejects one. OAuth apps need `numbers:read`.","operationId":"listRcsChanges","responses":{"200":{"description":"Every change request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RcsChange"}},"has_more":{"type":"boolean","description":"Always `false`: every change request is returned."},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/rcs/changes/{changeId}/cancel":{"post":{"tags":["RCS"],"summary":"Cancel an RCS change request","description":"Withdraw a change request that's still `requested`, and refund its fees. Canceling again is safe. A sender removal can't be canceled. OAuth apps need `numbers:manage`.","operationId":"cancelRcsChange","parameters":[{"name":"changeId","in":"path","required":true,"schema":{"type":"string","pattern":"^rcschg_"},"description":"The change request's `change_id`."}],"responses":{"200":{"description":"The canceled change request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RcsChange"}}}}}},"400":{"description":"`invalid_change_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`rcs_change_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`rcs_change_state_conflict` (carries `change_status`): it was already sent, settled, or is a sender removal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/calls":{"get":{"tags":["Calls"],"summary":"List calls","description":"The organization's calls, newest first. OAuth apps need `calls:read`.","operationId":"listCalls","parameters":[{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"}],"responses":{"200":{"description":"A page of calls","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Call"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"`invalid_cursor` or `invalid_limit`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Calls"],"summary":"Place a call","description":"Call `to` from one of the organization's Blooio Voice numbers. The call starts `ringing`; when the callee answers, `handler` takes its audio and `call.answered` fires. With an `agent` handler, the Blooio agent that owns `from` talks to the callee. OAuth apps need `calls:write`.","operationId":"placeCall","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaceCallRequest"},"examples":{"stream":{"summary":"Stream the audio to your server","value":{"from":"+14155550123","to":"+15551234567","handler":{"type":"stream","url":"wss://voice.example.com/calls","auth_token":"secret-token"}}},"agent":{"summary":"Have your Blooio agent make the call","value":{"from":"+14155550123","to":"+15551234567","handler":{"type":"agent"}}}}}}},"responses":{"201":{"description":"The call","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Call"}}}}}},"400":{"description":"`invalid_body`, or `invalid_field` (with the `field`) for a bad `from`, `to`, or `handler`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/TelecomPaymentRequired"},"404":{"description":"`voice_number_not_found`: `from` isn't one of the organization's Blooio Voice numbers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`agent_unavailable`: no live Blooio agent owns `from`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`call_rejected`: the carrier refused the call. The call is recorded as `failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`telephony_unavailable`: Blooio Voice isn't configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/calls/{callId}":{"get":{"tags":["Calls"],"summary":"Get a call","description":"One of the organization's calls. OAuth apps need `calls:read`.","operationId":"getCall","parameters":[{"$ref":"#/components/parameters/CallIdParam"}],"responses":{"200":{"description":"The call","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Call"}}}}}},"400":{"description":"`invalid_call_id`: the id is not a `call_...` id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`call_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/calls/{callId}/transcript":{"get":{"tags":["Calls"],"summary":"Get a call transcript","description":"What was said on a call while a Blooio agent had it, in order. Empty for calls no agent took. Lines are added while the call is up. OAuth apps need `calls:read`.","operationId":"getCallTranscript","parameters":[{"$ref":"#/components/parameters/CallIdParam"}],"responses":{"200":{"description":"The transcript","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CallTranscriptSegment"}}}}}}},"400":{"description":"`invalid_call_id`: the id is not a `call_...` id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`call_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/calls/{callId}/recording":{"get":{"tags":["Calls"],"summary":"Get a call recording","description":"The recording of a call with `is_recorded`, once it's saved shortly after the call ends (`call.recording.ready` fires then). A `ready` recording carries `download_url`, an MP3 link that works for 10 minutes; read the recording again for a new one. Recordings are kept for the organization's retention period, at most a year. OAuth apps need `calls:read`.","operationId":"getCallRecording","parameters":[{"$ref":"#/components/parameters/CallIdParam"}],"responses":{"200":{"description":"The recording","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CallRecording"}}}}}},"400":{"description":"`invalid_call_id`: the id is not a `call_...` id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`recording_not_found`: the call wasn't recorded, or its recording isn't saved yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`recording_unavailable`: the carrier couldn't produce the recording.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Calls"],"summary":"Delete a call recording","description":"Delete a call's recording before its retention period ends. It can't be recovered. A recording that failed or is already deleted is returned as it is. OAuth apps need `calls:write`.","operationId":"deleteCallRecording","parameters":[{"$ref":"#/components/parameters/CallIdParam"}],"responses":{"200":{"description":"The recording, now `deleted`","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CallRecording"}}}}}},"400":{"description":"`invalid_call_id`: the id is not a `call_...` id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`recording_not_found`: the call wasn't recorded, or its recording isn't saved yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`recording_unavailable`: the carrier refused the deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/calls/{callId}/answer":{"post":{"tags":["Calls"],"summary":"Answer a call","description":"Answer an inbound call that's ringing, or take a call a Blooio agent handed off, with `handler`. The first answer wins; any later one gets `409 call_not_ringing`. OAuth apps need `calls:write`.","operationId":"answerCall","parameters":[{"$ref":"#/components/parameters/CallIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerCallRequest"}}}},"responses":{"200":{"description":"The call","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Call"}}}}}},"400":{"description":"`invalid_call_id`, `invalid_body`, or `invalid_field`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`call_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`call_not_ringing` (with the call's `status`), `agent_unavailable`, or `caller_unidentified` (an `agent` handler for a caller who withheld their number).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`call_command_rejected`: the carrier refused the command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/calls/{callId}/hangup":{"post":{"tags":["Calls"],"summary":"Hang up a call","description":"End a call. It ends once the carrier confirms, and `call.ended` fires. OAuth apps need `calls:write`.","operationId":"hangupCall","parameters":[{"$ref":"#/components/parameters/CallIdParam"}],"responses":{"200":{"description":"The call, as it stands","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Call"}}}}}},"400":{"description":"`invalid_call_id`: the id is not a `call_...` id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`call_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`call_ended` or `call_not_connected` (the dial is still being placed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`call_command_rejected`: the carrier refused the command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/calls/{callId}/transfer":{"post":{"tags":["Calls"],"summary":"Transfer a call","description":"Move a connected call to another handler, or to the phone number `to`, which takes it off Blooio once that number answers. A call a Blooio agent handed off can be transferred too. A transfer that fails partway, or a number that doesn't answer, leaves the call waiting for a teammate, as a handed-off call does. OAuth apps need `calls:write`.","operationId":"transferCall","parameters":[{"$ref":"#/components/parameters/CallIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferCallRequest"},"examples":{"phone":{"summary":"To a phone number","value":{"to":"+15557654321"}},"agent":{"summary":"To your Blooio agent","value":{"handler":{"type":"agent"}}}}}}},"responses":{"200":{"description":"The call","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Call"}}}}}},"400":{"description":"`invalid_call_id`, `invalid_body` (send exactly one of `to` and `handler`), or `invalid_field`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`call_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`call_ended`, `call_not_connected`, `call_not_in_progress`, `call_transferred` (already on a phone), `call_handler_changed` (someone else answered or moved the call meanwhile), or `agent_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`call_command_rejected`: the carrier refused the command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/calls/{callId}/dtmf":{"post":{"tags":["Calls"],"summary":"Send DTMF","description":"Play keypad tones into a connected call, to navigate a phone menu for example. OAuth apps need `calls:write`.","operationId":"sendCallDtmf","parameters":[{"$ref":"#/components/parameters/CallIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDtmfRequest"}}}},"responses":{"200":{"description":"The call","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Call"}}}}}},"400":{"description":"`invalid_call_id`, `invalid_body`, or `invalid_field`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`call_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`call_ended`, `call_not_connected`, or `call_not_in_progress`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`call_command_rejected`: the carrier refused the command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"BearerApiKey":{"type":"http","scheme":"bearer","description":"Blooio API key as a bearer token, e.g. `Authorization: Bearer bl_live_...`."}},"parameters":{"LimitParam":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Maximum number of items to return per page. Must be between 1 and 200; defaults to 50. Combine with `cursor` to paginate."},"CursorParam":{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque pagination cursor. Pass the `next_cursor` value from a previous response to fetch the next page; omit it on the first request."},"IdempotencyKeyHeader":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional key for safe retries. Replaying the same key with an identical body returns the original result; a different body returns 409. Use a unique value (such as a UUID) per logical request."},"ChannelIdParam":{"name":"channel","in":"path","required":true,"schema":{"type":"string"},"description":"The channel reference — the same three forms `from` accepts: a phone number (URL-encode `+` as `%2B`), a channel alias, or the exact channel id (`ch_...`)."},"ContactIdParam":{"name":"contactId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier of the contact, prefixed with `ct_`. Returned when you create a contact or by the List contacts endpoint."},"ChatIdParam":{"name":"chatId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier of the chat, prefixed with `chat_`. Returned by the List chats endpoint."},"PriorityIdParam":{"name":"priorityId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier of the priority, prefixed with `priority_`. Returned when you create a priority or by the List priorities endpoint."},"MessageIdParam":{"name":"messageId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier of the message — the `id` returned when you send a message or by the List messages endpoint. Outbound messages use a `msg_` id; inbound (received) messages use the id the List endpoint exposes for that row. Both are addressable."},"GroupIdParam":{"name":"groupId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier of the group, prefixed with `grp_`. Returned by the List groups endpoint."},"WebhookIdParam":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier of the webhook subscription, prefixed with `wh_`. Returned when you create a webhook or by the List webhooks endpoint."},"NumberParam":{"name":"number","in":"path","required":true,"schema":{"type":"string"},"description":"Sender phone number in E.164 format, e.g. `+15551234567`."},"ApiKeyParam":{"name":"apiKey","in":"path","required":true,"schema":{"type":"string"},"description":"The API key value (prefixed with `api_`), as returned when the key was created or by the List API keys endpoint."},"TelecomNumberParam":{"name":"number","in":"path","required":true,"schema":{"type":"string"},"description":"The number in E.164 format, with `+` URL-encoded as `%2B` (e.g. `%2B15551234567`)."},"PurchaseIdParam":{"name":"purchaseId","in":"path","required":true,"schema":{"type":"string","pattern":"^pur_"},"description":"Purchase id (`pur_...`)."},"CampaignIdParam":{"name":"campaignId","in":"path","required":true,"schema":{"type":"string","pattern":"^camp_"},"description":"10DLC campaign id (`camp_...`)."},"RcsSenderIdParam":{"name":"channelId","in":"path","required":true,"schema":{"type":"string","pattern":"^ch_"},"description":"The RCS sender's channel id (`ch_...`)."},"CallIdParam":{"name":"callId","in":"path","required":true,"schema":{"type":"string","pattern":"^call_"},"description":"Call id (`call_...`)."},"TicketIdParam":{"name":"ticketId","in":"path","required":true,"schema":{"type":"string","pattern":"^tkt_"},"description":"Ticket id (`tkt_...`), returned when the ticket is opened."}},"responses":{"TelecomPaymentRequired":{"description":"Blooio SMS, Voice & RCS couldn't charge the organization, and nothing was submitted or ordered. `code` is `no_payment_method` (no saved card, and the credit doesn't cover the charge), `payment_failed` (the card was declined), or `invoice_unpaid` (pay the organization's unpaid invoice first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Authentication failed or missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"Forbidden":{"description":"Authenticated but not allowed (e.g. blocked key or plan gate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"BadRequest":{"description":"Malformed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Conflicting state (e.g. chat closed, idempotency reuse, channel not active).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnprocessableEntity":{"description":"Validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotImplemented":{"description":"Endpoint is defined but not implemented yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_implemented","message":"This v4 endpoint is defined but not implemented yet.","details":{"resource":"templates.list"}}}}}},"SafetyBlocked":{"description":"Blocked by messaging safety. The error `code` identifies the gate: `safety_account_review` (the sending number is blocked pending review), `safety_reply_only` (outbound is restricted to conversations with prior inbound), `safety_new_conversations_paused` (brand-new conversations are temporarily paused; replies are unaffected), or `conversation_content_restricted` (links, media, and attachments are not allowed before the recipient's first written reply, or in a re-engagement of an inactive conversation — an emoji reaction does not unlock them). Safety actions clear automatically as the underlying pattern ages out; current per-number state is delivered via the `safety.state_changed` webhook event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"conversation_content_restricted","message":"Links, media, and attachments are not allowed until the recipient replies. Send plain text first."}}}}},"ConversationLimited":{"description":"Conversation-state limit reached. The error `code` identifies the rule: `conversation_awaiting_reply` (up to 3 messages may be sent before the recipient responds at all), `conversation_streak_limit` (consecutive-message cap since their last response), or `conversation_inactive_paused` (no response in 14+ days and the single re-engagement message was already sent; `details.retry_after` and the `Retry-After` header give a polling interval in seconds — retry after the recipient replies, since the pause does not lift on its own). Every response body carries `conversation_state` — one of `new`, `acknowledged` (reacted but never wrote back), `active`, `established`, `trusted`, or `inactive` — and the streak errors also carry `current_streak` and `limit`, so you can see which rung of the ladder a thread is on.\n\nThe cap rises with the thread's written history, and an **emoji reaction counts as a response**: a tapback clears the consecutive-message counter and keeps a thread from going inactive, so the limit lifts the moment the recipient reacts. A reaction is not treated as a reply, though — only writing back raises the cap and unlocks links, media, and attachments (see `conversation_content_restricted`).","headers":{"Retry-After":{"description":"Sent with `conversation_inactive_paused`: seconds to wait before checking again. The pause lifts when the recipient replies, not when this elapses.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"conversation_awaiting_reply","message":"This conversation is awaiting a reply. Up to 3 messages may be sent before the recipient responds."}}}}}},"schemas":{"Error":{"type":"object","description":"Standard v4 error envelope returned by route handlers.","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]},"AuthError":{"type":"object","description":"Flat error shape returned by the authentication middleware (401/403).","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"}}},"ItemEnvelope":{"type":"object","description":"Generic single-item envelope.","properties":{"data":{"type":"object","additionalProperties":true}}},"LookupDataSet":{"type":"string","enum":["portability","carrier","caller_name","enhanced_caller_name","caller_identity"],"description":"A data set an enriched lookup answers, each a field of the result. `portability` comes with every enriched lookup, at the lookup's charge; each other one named is charged on top. See [pricing](https://docs.blooio.com/reference/v4/phone-numbers/lookupPhoneNumber#pricing)."},"PhoneNumberLookup":{"type":"object","description":"A phone number parsed, and with `enrich`, looked up. A data set's field is present only when `enrich` named it, and null when the number wasn't looked up or the network had no answer for it.","properties":{"input":{"type":"string","description":"The number as given."},"valid":{"type":"boolean"},"error":{"type":"string","description":"Why the number couldn't be parsed. Present only then."},"possible":{"type":"boolean"},"e164":{"type":"string"},"national":{"type":"string"},"international":{"type":"string"},"country_calling_code":{"type":"string"},"country":{"type":["string","null"],"description":"ISO 3166-1 alpha-2."},"national_number":{"type":"string"},"type":{"type":["string","null"],"description":"The type by numbering plan, e.g. `MOBILE`, `FIXED_LINE`, `FIXED_LINE_OR_MOBILE`, `TOLL_FREE`."},"location":{"type":["object","null"],"description":"Where a North American number's exchange is.","properties":{"city":{"type":"string"},"region":{"type":"string"},"region_name":{"type":"string"}}},"area_code":{"type":"string","description":"North American numbers only."},"exchange":{"type":"string","description":"North American numbers only."},"area_code_region":{"type":"string","description":"North American numbers only, e.g. `Chicago, IL`."},"portability":{"type":["object","null"],"properties":{"ported":{"type":["boolean","null"],"description":"Whether the number was ported from the carrier it was issued by."},"ported_date":{"type":["string","null"],"format":"date"},"line_type":{"type":["string","null"],"description":"e.g. `mobile`, `fixed_line`, `voip`, `fixed_line_or_mobile`."},"lrn":{"type":["string","null"],"description":"Location Routing Number."},"ocn":{"type":["string","null"],"description":"Operating Company Number of the serving carrier."},"spid":{"type":["string","null"],"description":"Service provider ID of the serving carrier."},"spid_carrier_name":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]}}},"carrier":{"type":["object","null"],"properties":{"name":{"type":["string","null"]},"normalized_name":{"type":["string","null"],"description":"The carrier's brand, e.g. `AT&T`."},"line_type":{"type":["string","null"],"description":"e.g. `mobile`, `fixed_line`, `voip`."},"mobile_country_code":{"type":["string","null"],"description":"MCC; mobile numbers only."},"mobile_network_code":{"type":["string","null"],"description":"MNC; mobile numbers only."}}},"caller_name":{"type":["string","null"],"description":"The caller ID (CNAM) name."},"enhanced_caller_name":{"type":["object","null"],"properties":{"name":{"type":["string","null"]},"entity_type":{"type":["string","null"],"description":"e.g. `business`."}}},"caller_identity":{"type":["object","null"],"properties":{"name":{"type":["string","null"],"description":"The number's owner."},"address":{"type":["object","null"],"properties":{"street_line_1":{"type":["string","null"]},"street_line_2":{"type":["string","null"]},"city":{"type":["string","null"]},"state_code":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"zip4":{"type":["string","null"]},"country_code":{"type":["string","null"]}}},"confidence_score":{"type":["number","null"],"description":"How sure the match of owner to number is, 0–100."}}},"enriched_with":{"type":"array","items":{"$ref":"#/components/schemas/LookupDataSet"},"description":"The data sets the number was looked up and billed for; empty when it wasn't looked up. Present only with `enrich`."},"enrichment_error":{"type":"string","description":"Batch only: why the number's lookup failed (`upstream_unavailable`, `lookup_rejected`, `telephony_unavailable`). It isn't billed."}},"required":["input","valid"]},"ChannelType":{"type":"string","enum":["blooio","twilio","whatsapp","whatsapp_business","rcs_business","amb","sms","voice"]},"ChannelStatus":{"type":"string","enum":["pending_verification","active","suspended","banned","deprecated"]},"ChatState":{"type":"string","description":"`left`: a group chat whose number is no longer in the group; sends to the group from that number return 409 `not_in_group` until a message arrives in the group on it again.","enum":["open","closed","blocked","deprecated","left"]},"Direction":{"type":"string","enum":["inbound","outbound"]},"ChannelCapabilities":{"type":"object","description":"What a channel can do. Shape varies by channel type.","properties":{"protocols":{"type":"array","items":{"type":"string"}},"content":{"type":"array","items":{"type":"string"}},"actions":{"type":"array","items":{"type":"string"}},"interactive":{"type":"array","items":{"type":"string"}},"gates":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"Channel":{"type":"object","properties":{"id":{"type":"string","description":"Channel id (ch_...)."},"type":{"$ref":"#/components/schemas/ChannelType"},"address":{"type":["string","null"],"description":"The channel's real address: the phone number for numbered channels, or the provider address for non-numbered ones. Usable directly as `from`."},"business_id":{"type":"string","description":"Apple Business Chat Account ID (UUID) for an Apple Messages for Business channel. Omitted for every other channel type. Customers open a conversation with it at `https://bcrw.apple.com/urn:biz:<business_id>` (or `sms:urn:biz:<business_id>` on an Apple device)."},"alias":{"type":"string","description":"Movable, organization-wide name for a non-numbered channel (currently Apple Messages for Business / RCS Business). Usable directly as `from`. Omitted for numbered channels."},"status":{"$ref":"#/components/schemas/ChannelStatus"},"capabilities":{"$ref":"#/components/schemas/ChannelCapabilities"},"profile":{"$ref":"#/components/schemas/ChannelProfile"},"settings":{"type":"object","additionalProperties":true,"description":"Inline per-channel settings for channel types that support them (Blooio numbers, Apple Messages for Business, WhatsApp Business). Each setting value plus a `can_<key>` flag for whether this channel may enable it. Omitted for channel types without settings. Full read/write via `GET`/`PATCH /channels/{channel}/settings`.","example":{"auto_mark_read":false,"auto_share_contact":false,"can_auto_mark_read":true,"can_auto_share_contact":true}},"created_at":{"type":"integer","description":"Epoch milliseconds."}}},"ChannelHealth":{"type":"object","description":"One Blooio line's live safety state plus its metrics over the trailing window. Rates are fractions from 0 to 1, rounded to 3 decimals. Timestamps are epoch milliseconds.","properties":{"channel_id":{"type":"string","description":"Channel id (ch_...)."},"address":{"type":"string","description":"The line's phone number (E.164)."},"window":{"type":"object","description":"The window the metrics cover.","properties":{"start":{"type":"integer","description":"Epoch milliseconds."},"end":{"type":"integer","description":"Epoch milliseconds. Equals `computed_at`."},"days":{"type":"integer","minimum":1,"maximum":30}},"required":["start","end","days"]},"computed_at":{"type":"integer","description":"When the metrics were computed (epoch milliseconds). At most about 5 minutes old for frequent pollers, never more than 30."},"has_activity":{"type":"boolean","description":"False when the line sent and received nothing in the window. `risk.score` and `risk.level` are null then, because a silent line scores the same as a healthy one."},"safety":{"type":"object","description":"Live safety state, read on every request (never cached). The same values the `safety.state_changed` webhook carries.","properties":{"tier":{"type":"string","enum":["new","warming","established"],"description":"Warm-up tier."},"action":{"type":"string","enum":["none","queue","slow","pause_new","reply_only","review"],"description":"Current safety action on outbound sends."},"reasons":{"type":"object","additionalProperties":true,"description":"Why the current action applies, keyed by trigger. Empty when `action` is `none`."},"limits_disabled":{"type":"boolean","description":"True when safety limits are switched off for this line."},"evaluated_at":{"type":["integer","null"],"description":"When the safety system last evaluated the line (epoch milliseconds). Null for a line it has never evaluated, which reports `tier: new` and `action: none`."}},"required":["tier","action","reasons","limits_disabled","evaluated_at"]},"replies":{"type":"object","properties":{"new_conversations":{"type":"integer","description":"Conversations this line started (UTC days in the window). Group chats are excluded."},"first_replies":{"type":"integer","description":"Of those, how many got a written reply."},"first_reply_rate":{"type":["number","null"],"description":"`first_replies / new_conversations`. At `days=7` this equals the safety system's 7-day reply rate. Null with no new conversations."},"unanswered_conversations":{"type":"integer","description":"Conversations this line started in the window that used the full 3-message allowance before a reply and got no reply."},"unanswered_rate":{"type":["number","null"],"description":"Share of the conversations this line started in the window that are unanswered after 3 messages. Null when it started none."}},"required":["new_conversations","first_replies","first_reply_rate","unanswered_conversations","unanswered_rate"]},"delivery":{"type":"object","description":"Outbound delivery counts and rates, measured the way the safety system measures them.","properties":{"resolved":{"type":"integer","description":"Sends whose protocol a device resolved (excludes pending and unknown)."},"imessage":{"type":"integer","description":"Resolved sends that went over iMessage."},"reached":{"type":"integer","description":"Sends that reached a device."},"failed":{"type":"integer","description":"Sends that reached a device and then failed."},"imessage_share":{"type":["number","null"],"description":"`imessage / resolved`. Null below 20 resolved sends, too few to act on."},"failure_rate":{"type":["number","null"],"description":"`failed / reached`. Null below 20 resolved sends."}},"required":["resolved","imessage","reached","failed","imessage_share","failure_rate"]},"risk":{"type":"object","properties":{"score":{"type":["integer","null"],"minimum":0,"maximum":100,"description":"Risk score; null when `has_activity` is false."},"level":{"type":["string","null"],"enum":["low","medium","high",null],"description":"`low` below 30, `medium` below 60, else `high`. Null when `has_activity` is false."},"factors":{"type":"object","description":"The factors behind `score`. Keys: `outbound_conversations_per_day`, `inbound_conversations_per_day`, `inbound_started_share`, `contacts`, `reply_rate`, `inbound_messages_per_conversation`, `inbound_message_share`, `peak_new_conversations_per_hour`, `peak_messages_per_hour`, `message_similarity`. Shares and rates are fractions.","additionalProperties":{"$ref":"#/components/schemas/ChannelHealthRiskFactor"}}},"required":["score","level","factors"]},"daily":{"type":"array","description":"One entry per UTC day with activity, oldest first. Quiet days are omitted.","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"sent":{"type":"integer"},"received":{"type":"integer"},"new_conversations":{"type":"integer"},"first_replies":{"type":"integer"}},"required":["date","sent","received","new_conversations","first_replies"]}}},"required":["channel_id","address","window","computed_at","has_activity","safety","replies","delivery","risk","daily"]},"ChannelHealthRiskFactor":{"type":"object","properties":{"value":{"type":["number","null"],"description":"The measured value. Null when it was not computed."},"points":{"type":"integer","description":"What this factor added to (or, for a bonus, took off) `risk.score`."},"status":{"type":"string","enum":["ok","warning","high","bonus","not_applicable","insufficient_data"]}},"required":["value","points","status"]},"ChannelSettings":{"type":"object","description":"Per-channel settings envelope. `settings` and `available` shapes vary by channel type: Blooio (P2P numbers) exposes `auto_mark_read`, `auto_share_contact`, and `imessage_only`; Apple Messages for Business and WhatsApp Business expose `opener` (`AmbOpener`, `WhatsAppOpener`); Blooio Voice (`voice`) exposes `inbound` (`VoiceInboundSettings`). `available[key]` is whether THIS channel may turn `key` on (type-gated).","properties":{"channel_id":{"type":"string","description":"Channel id (ch_...)."},"type":{"$ref":"#/components/schemas/ChannelType"},"settings":{"type":"object","additionalProperties":true,"description":"Current setting values for this channel (keys are per channel type).","example":{"auto_mark_read":false,"auto_share_contact":false,"imessage_only":false}},"available":{"type":"object","additionalProperties":{"type":"boolean"},"description":"Whether this channel may turn each setting on (type-gated).","example":{"auto_mark_read":true,"auto_share_contact":true,"imessage_only":true}}}},"ChannelSettingsUpdate":{"type":"object","additionalProperties":true,"description":"Partial update of a channel's settings; keys are per channel type and validated by the channel's provider, which rejects any other key (422 invalid_settings). Blooio (P2P numbers) accepts `auto_mark_read`, `auto_share_contact`, and `imessage_only`; Apple Messages for Business and WhatsApp Business accept `opener`; Blooio Voice (`voice`) accepts `inbound`.","properties":{"auto_mark_read":{"type":"boolean","description":"Blooio: mark a chat read on the device as soon as a message arrives. Dedicated + inbound lines only."},"auto_share_contact":{"type":"boolean","description":"Blooio: share the number's Name & Photo card with people who message it. Dedicated lines only, and the line must have a contact card set up."},"imessage_only":{"type":"boolean","description":"Blooio: a routed send (`POST /messages` without `from`) starts a conversation on this line only with a contact on iMessage, checked on the line's device; a contact who isn't, or a device that can't answer, moves the send to the next channel in the priority. Conversations the line already has are unaffected. Off by default, when the device sends SMS to a contact without iMessage."},"inbound":{"$ref":"#/components/schemas/VoiceInboundSettings","description":"Blooio Voice: who answers the number's inbound calls and how long they ring. Send only the fields you want to change."},"opener":{"description":"Apple Messages for Business or WhatsApp Business: a partial update of the channel's opener, merged into the saved one. Turning it on validates the template.","oneOf":[{"$ref":"#/components/schemas/AmbOpener"},{"$ref":"#/components/schemas/WhatsAppOpener"}]}}},"AmbOpener":{"type":"object","additionalProperties":false,"description":"The business invitation a routed send uses to start a conversation with a contact who has no Apple Messages for Business identity on this channel yet. Turning it on requires `template_id` and the template's parameters (`binaryChoice.engage.withImage` needs `brandName` and `brandLogo`; `binaryChoice.engage.withoutImage` needs `brandName`).","properties":{"enabled":{"type":"boolean"},"template_id":{"type":["string","null"],"example":"binaryChoice.engage.withImage"},"parameters":{"type":["object","null"],"additionalProperties":true,"description":"Template parameters. An image parameter such as `brandLogo` may be an https URL; it is inlined when the invitation is sent.","example":{"brandName":"Acme","brandLogo":"https://example.com/logo.png"}},"locale":{"type":["string","null"],"example":"en_US"}}},"WhatsAppOpener":{"type":"object","additionalProperties":false,"description":"The approved message template a routed send uses to start a conversation on this WhatsApp Business channel outside the 24-hour customer service window. Turning it on requires `name` to be an approved template on the channel; `language` is set to the approved template's language.","properties":{"enabled":{"type":"boolean"},"name":{"type":["string","null"],"example":"welcome"},"language":{"type":["string","null"],"example":"en_US"},"variables":{"description":"Body variables: an array for positional (`{{1}}`) variables or an object for named ones.","oneOf":[{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]}}},"ChannelProfile":{"type":"object","additionalProperties":false,"description":"Stored channel profile. Omitted on GET when no fields are set. Null or empty string on PUT clears a field.","properties":{"display_name":{"type":["string","null"]},"about":{"type":["string","null"]},"email":{"type":["string","null"]},"avatar":{"type":["string","null"]}}},"ContactIdentity":{"type":"object","properties":{"id":{"type":"string","description":"Identity id (cid_...)."},"contact_id":{"type":"string"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"identifier":{"type":"string","description":"Phone (E.164) or email."},"channel_id":{"type":["string","null"],"description":"Required for Apple Messages for Business identities."},"created_at":{"type":"integer"}}},"Contact":{"type":"object","properties":{"id":{"type":"string","description":"Contact id (ct_...)."},"name":{"type":["string","null"]},"created_at":{"type":"integer"},"tags":{"type":"array","items":{"type":"string"}},"last_message_time":{"type":["integer","null"]},"last_direction":{"type":["string","null"],"enum":["inbound","outbound",null]},"last_text":{"type":["string","null"]},"last_status":{"type":["string","null"]},"identities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"identifier":{"type":"string"},"channel_id":{"type":["string","null"]},"created_at":{"type":"integer"}}}}}},"TimelineItem":{"type":"object","description":"A single polymorphic entry in a contact's cross-channel timeline. The `type` discriminates the shape of `object`.","properties":{"type":{"type":"string","enum":["message","message_event","chat_event"],"description":"`message`: a message the contact sent or received. `message_event`: a lifecycle event for a message (sent/delivered/read/failed/reaction). `chat_event`: any other chat/group/typing event. Event entries only appear when `include_events=true`."},"occurred_at":{"type":"integer","description":"Epoch-millisecond timestamp the entry occurred at; the feed is ordered by this descending."},"id":{"type":"string","description":"The underlying object id — a `msg_` message id for `message` entries, an `evt_` event id otherwise. Also the pagination sort key within a given `occurred_at`."},"chat_id":{"type":["string","null"]},"channel_id":{"type":["string","null"]},"channel_type":{"type":["string","null"],"description":"The channel type this entry occurred on. Always set for `message` entries; may be null for channel-agnostic events."},"object":{"type":"object","additionalProperties":true,"description":"The full entry payload. For `message` entries: id, chat_id, channel_id, channel_type, direction, type, text, status, created_at. For event entries: id, type, chat_id, channel_id, channel_type, data, occurred_at."}}},"Chat":{"type":"object","properties":{"id":{"type":"string","description":"Chat id (chat_...)."},"channel_id":{"type":"string"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"contact_id":{"type":["string","null"]},"identity_id":{"type":["string","null"]},"group_id":{"type":["string","null"]},"contact":{"oneOf":[{"$ref":"#/components/schemas/ContactSummary"},{"type":"null"}],"description":"The person on the other side of a 1:1 chat. `null` in a group chat; see `group`."},"group":{"oneOf":[{"$ref":"#/components/schemas/GroupSummary"},{"type":"null"}],"description":"The group, when this is a group chat. `null` in a 1:1 chat."},"state":{"$ref":"#/components/schemas/ChatState"},"capabilities":{"type":"object","additionalProperties":true,"description":"What the other side of the chat has told Blooio it supports. On Apple Messages for Business, `amb_capability_list` is the `capability-list` Apple stamped on the customer's latest inbound message (`QUICK`, `LIST`, `TIME`, `AUTH`, `AUTH2`, `FORM`); prefer `supported_interactive_kinds`, which is derived from it.","properties":{"amb_capability_list":{"type":"array","items":{"type":"string","enum":["QUICK","LIST","TIME","AUTH","AUTH2","FORM"]}}}},"supported_interactive_kinds":{"type":"array","items":{"type":"string","enum":["quick_reply","list_picker","time_picker","form","apple_pay","authenticate","imessage_app"]},"description":"Apple Messages for Business only: the `interactive.kind` values the customer's device can render, so you can choose a kind before composing instead of meeting `422 amb_capability_unavailable` at send time. `apple_pay` and `imessage_app` are always listed (Apple gates neither by capability). Until the customer's device has reported a capability list, every kind is listed."},"window_expires_at":{"type":["integer","null"]},"last_message_at":{"type":["integer","null"]},"created_at":{"type":"integer"}}},"ChatCreated":{"type":"object","properties":{"id":{"type":"string"},"channel_id":{"type":"string"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"contact_id":{"type":["string","null"]},"identity_id":{"type":["string","null"]},"state":{"$ref":"#/components/schemas/ChatState"},"created":{"type":"boolean","description":"True if the chat was newly created."}}},"Message":{"type":"object","properties":{"id":{"type":"string","description":"Message id (msg_...)."},"chat_id":{"type":"string"},"channel_id":{"type":"string"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"channel_address":{"type":["string","null"],"description":"The address of your own line on this channel (the sending/receiving number or alias, e.g. `+15559876543`). Same value regardless of direction; `sender`/`recipient` tell you which side of the conversation it is on."},"protocol":{"type":"string","enum":["pending","unknown","imessage","sms","rcs","whatsapp","whatsapp_business","rcs_business","amb"],"description":"Transport state or resolved wire service; never null. `pending` = accepted and dispatched, wire service not resolved yet; `imessage` / `rcs` / `sms` = the device-confirmed transport (iMessage blue bubble, RCS, or SMS/MMS green bubble); `whatsapp` = sent over P2P WhatsApp; `whatsapp_business` = sent over the WhatsApp Business Platform (WABA); `rcs_business` = sent over Blooio RCS, from a verified RCS business sender; `amb` = sent over Apple Messages for Business; `unknown` = accepted but the transport could not be resolved before the tracking window closed (see `error`)."},"direction":{"$ref":"#/components/schemas/Direction"},"sender":{"type":["string","null"],"description":"Who the message is FROM, direction-aware. On `inbound` this is the other party (the contact who messaged you, or in a group the participant who wrote it); on `outbound` this is your own line (`channel_address`). This is the SAME field delivered on the message webhooks, so a message reads identically via REST or webhook."},"recipient":{"type":["string","null"],"description":"Who the message is TO, direction-aware. On `inbound` this is your own line (`channel_address`); on `outbound` this is the other party. The mirror of `sender`. Matches the message webhook shape."},"contact":{"oneOf":[{"$ref":"#/components/schemas/ContactSummary"},{"type":"null"}],"description":"The other party (never your own line), regardless of direction — so you always know who the message is with. On an inbound group message it is the member who sent it; `null` on a message you sent to a group. Matches the message webhook shape."},"group":{"oneOf":[{"$ref":"#/components/schemas/GroupSummary"},{"type":"null"}],"description":"The group, when the message is in a group chat. `null` in a 1:1 chat. Matches the message webhook shape."},"type":{"type":"string","description":"Content type, e.g. text, media, poll, sticker."},"text":{"type":["string","null"],"description":"The plain text of the message — what the recipient actually sees. On a rich-text message the styling delimiters are NOT included here; see `formatted_text`."},"formatted_text":{"type":"string","description":"Markdown for a rich-text (bold/italic/underline/strikethrough) message. Omitted entirely when the message carries no styling, so its presence is how you detect rich text.\n\nPresent in both directions: on an outbound send made with `format: \"markdown\"`, and on an inbound iMessage whose sender styled their text — so styling a customer applied in Messages arrives here even though your integration never asked for it.\n\nAlways a normalized re-serialization of the message's actual styling rather than an echo of the source string: bold is spelled `**`, italic `*`, underline `++`, strikethrough `~~`, and any character that would otherwise read as a delimiter is backslash-escaped. Re-sending this value verbatim with `format: \"markdown\"` reproduces the same styled message. Blooio iMessage only. This is the SAME field delivered on the message webhooks, so a message reads identically via REST or webhook."},"status":{"type":"string","description":"Delivery lifecycle state: `pending` (accepted, waiting behind the channel's opener until the contact answers it), `queued` (accepted, awaiting dispatch), `sent` (handed to the channel; protocol resolves around here), `delivered` (delivery receipt received), `read` (read receipt received), `failed` (see `error`), `superseded` (row replaced by an idempotency retry or a poll-vote supersession). Inbound messages surface via the event feed / webhooks with `received`."},"reply_to_message_id":{"type":["string","null"]},"error":{"$ref":"#/components/schemas/MessageError"},"attachments":{"type":"array","description":"Ordered attachments on the message. Each entry is retrievable directly: `url` (servable, decrypted URL — inbound Apple Messages for Business media is downloaded, decrypted, and re-hosted before this is populated), `media_type` (content type), `size` (bytes), and an optional `caption`. Always present (empty array when there are none). Matches the webhook `attachments` shape exactly.","items":{"type":"object","properties":{"url":{"type":["string","null"]},"media_type":{"type":["string","null"]},"size":{"type":["integer","null"]},"caption":{"type":["string","null"]}}}},"interactive":{"type":"object","description":"Structured interactive content, present on interactive messages. For an inbound reply this is the customer's actual selection (`role: reply`): `kind` (quick_reply/list_picker/time_picker/form/…), `chosen` (the selected option titles / time slots / flattened answers), `selected` (`{ id, title }` for a single pick, where `id` is the `id`/`identifier` you set on the option; an Apple Messages for Business quick reply adds `index`), `selections` (an array of `{ id, title }` instead of `selected` when the customer picked several rows of an Apple Messages for Business list picker) and, for Form Messages, a structured `responses` array (per-page question + typed answers per §17.4). For an outbound send it is the prompt that was sent (`role: prompt`). The message's `text` remains a flattened convenience summary alongside this structure. The `message.received` webhook carries the same `kind`, `chosen`, `selected`, `selections` and `responses`; on Apple Messages for Business it adds `request_identifier` and Apple's raw reply as `detail`.","additionalProperties":true},"imessage_app":{"type":"object","description":"Present on `imessage_app` messages (custom app bubbles): the app's `bundle_id`, `team_id` and `app_name`, the app-state `url` its extension reads, `caption` / `subcaption`, and the bubble's `session_id`. The same object the message webhooks carry.","additionalProperties":true},"sticker":{"type":"object","description":"Present on `sticker` messages, in both directions. The sticker file is the message's one attachment, stored as sent (a received HEICS sticker stays animated). The same object the message webhooks carry.","required":["placed_on","part_index","placement"],"properties":{"placed_on":{"type":["string","null"],"description":"Id of the message the sticker is placed on. `null` for a standalone sticker, or when it was placed on a message Blooio doesn't have."},"part_index":{"type":["integer","null"],"description":"Which part of the target message it is placed on. `null` for a standalone sticker."},"placement":{"type":["object","null"],"description":"Where it sits on the bubble: `x` and `y` (center, as fractions of the bubble), `scale`, `rotation` (radians) and `width` (points). `null` for a standalone sticker.","properties":{"x":{"type":"number"},"y":{"type":"number"},"scale":{"type":"number"},"rotation":{"type":"number"},"width":{"type":"number"}}}}},"rich_card":{"type":"object","description":"Blooio RCS: the cards a `rich_card` message was sent with. The message webhooks carry it too.","properties":{"cards":{"type":"array","items":{"$ref":"#/components/schemas/RcsCard"}}}},"suggestions":{"type":"array","items":{"$ref":"#/components/schemas/RcsSuggestion"},"description":"Blooio RCS: the chips the message was sent with. The message webhooks carry them too."},"routing":{"type":"object","description":"Apple Messages for Business inbound only: the entry-point ids Apple attached because the customer started this message from a link, QR code, or Messages button carrying `biz-intent-id` / `biz-group-id`. Present only on that message; later replies in the conversation don't repeat it. The same object the `message.received` webhook carries.","properties":{"intent_id":{"type":"string","description":"The entry point's `biz-intent-id`.","example":"order_status"},"group_id":{"type":"string","description":"The entry point's `biz-group-id`.","example":"post_sales"}}},"locale":{"type":"string","description":"Apple Messages for Business inbound only: the customer's language and region as Apple reports it, an ISO 639-1 language and ISO 3166 region joined by `_`. Omitted on every other message. The `message.received` webhook carries it too.","example":"en_US"},"created_at":{"type":"integer"},"updated_at":{"type":"integer"}}},"MessageStatus":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","description":"Delivery lifecycle state: `pending` (accepted, waiting behind the channel's opener until the contact answers it), `queued` (accepted, awaiting dispatch), `sent` (handed to the channel; protocol resolves around here), `delivered` (delivery receipt received), `read` (read receipt received), `failed` (see `error`), `superseded` (row replaced by an idempotency retry or a poll-vote supersession). Inbound messages surface via the event feed / webhooks with `received`."},"protocol":{"type":"string","enum":["pending","unknown","imessage","sms","rcs","whatsapp","whatsapp_business","rcs_business","amb"],"description":"Transport state or resolved wire service; never null. `pending` = accepted and dispatched, wire service not resolved yet; `imessage` / `rcs` / `sms` = the device-confirmed transport (iMessage blue bubble, RCS, or SMS/MMS green bubble); `whatsapp` = sent over P2P WhatsApp; `whatsapp_business` = sent over the WhatsApp Business Platform (WABA); `rcs_business` = sent over Blooio RCS, from a verified RCS business sender; `amb` = sent over Apple Messages for Business; `unknown` = accepted but the transport could not be resolved before the tracking window closed (see `error`)."},"error":{"$ref":"#/components/schemas/MessageError"},"created_at":{"type":"integer"},"updated_at":{"type":"integer"}}},"MessageErrorCode":{"type":"string","enum":["delivery_unconfirmed","service_unavailable","number_banned","recipient_unreachable","recipient_blocked","attachment_unavailable","attachment_failed","message_too_large","invalid_content","group_unavailable","send_failed"],"description":"Why a message on a `blooio` channel failed. `delivery_unconfirmed`: it may have been sent; wait for a later status before resending. `service_unavailable`: the sending number was temporarily unavailable and the message wasn't sent; retry after a short wait. `number_banned`: the sending number is restricted from sending. `recipient_unreachable`: the recipient can't be reached at this address. `recipient_blocked`: sending to this recipient isn't allowed. `attachment_unavailable`: an attachment couldn't be downloaded from its URL. `attachment_failed`: an attachment couldn't be processed. `message_too_large`: the message or its attachments are too large. `invalid_content`: the content can't be sent as given. `group_unavailable`: the group conversation couldn't be reached on this number. `send_failed`: any other failure. New codes may be added; treat one you don't recognize like `send_failed`."},"MessageError":{"type":["object","null"],"description":"Why the message failed; null unless it failed. On a `blooio` channel `code` is a `MessageErrorCode` and `message` describes it. On any other channel both are the provider's own error. See [Errors](/errors#v4-message-errors).","properties":{"code":{"anyOf":[{"$ref":"#/components/schemas/MessageErrorCode"},{"type":["string","null"],"description":"A provider channel's own error code."}]},"message":{"type":["string","null"],"description":"A description of the failure."}},"required":["code","message"]},"MessageEvent":{"type":"object","properties":{"id":{"type":"string","description":"Event id (evt_...)."},"message_id":{"type":"string"},"kind":{"type":"string","description":"Bare lifecycle kind, e.g. sent, delivered, read, reaction."},"occurred_at":{"type":"integer"},"metadata":{"type":"object","additionalProperties":true,"description":"The event's data, as `GET /events` returns it: a `reaction` carries the same fields as a `message.reaction` webhook in the latest payload version, a `failed` event is its `{ code, message }` error, and other kinds carry the data recorded with them."}}},"MessageSendResult":{"type":"object","description":"Returned at the top level (not wrapped in `data`) by send endpoints.","properties":{"id":{"type":"string"},"chat_id":{"type":"string"},"channel_id":{"type":"string"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"protocol":{"type":"string","enum":["pending","unknown","imessage","sms","rcs","whatsapp","whatsapp_business","rcs_business","amb"],"description":"Transport state or resolved wire service; never null. `pending` = accepted and dispatched, wire service not resolved yet; `imessage` / `rcs` / `sms` = the device-confirmed transport (iMessage blue bubble, RCS, or SMS/MMS green bubble); `whatsapp` = sent over P2P WhatsApp; `whatsapp_business` = sent over the WhatsApp Business Platform (WABA); `rcs_business` = sent over Blooio RCS, from a verified RCS business sender; `amb` = sent over Apple Messages for Business; `unknown` = accepted but the transport could not be resolved before the tracking window closed (see `error`)."},"from":{"type":["string","null"],"description":"The resolved sender as a human value: the sending channel's phone number (numbered channels) or alias (non-numbered channels). This is the primary sender reference; `channel_id` remains available for exact follow-up and audit."},"direction":{"$ref":"#/components/schemas/Direction"},"type":{"type":"string"},"status":{"type":"string","description":"Initial lifecycle state for the send: normally `queued` (accepted for delivery), `pending` when the message waits behind the channel's opener (see `routing.opener`), or `failed` if rejected before dispatch. Later transitions (`sent` → `delivered` / `read`, or `failed`) are reported via the message status endpoint and `message.*` webhooks."},"group_id":{"type":"string","description":"Existing group id for a group-targeted send."},"error":{"$ref":"#/components/schemas/MessageError"},"fallback":{"type":"object","description":"Present when a send could not be delivered on the requested channel and a different channel should be tried.","properties":{"recommended":{"type":"boolean","description":"True when falling back to another channel is recommended."},"reason":{"type":"string"}}},"downgraded_from":{"type":"string","description":"Present when `fallback: \"auto\"` sent something simpler because the recipient's device couldn't show the content: what was replaced, such as `rich_card`, `media`, or `suggestions` on Blooio RCS."},"to":{"type":"string","description":"Recipient identifier. Present only on per-recipient items inside a fan-out (FanOutResult) response."},"dry_run":{"type":"boolean"},"would_send":{"type":"boolean"},"preview":{"type":"object","additionalProperties":true},"poll":{"type":"object","properties":{"title":{"type":"string"},"options":{"type":"array","items":{"type":"string"}}}},"routing":{"$ref":"#/components/schemas/RoutingMetadata"}}},"RoutingMetadata":{"type":"object","description":"How Blooio selected the concrete sender channel.","properties":{"mode":{"type":"string","enum":["explicit","priority"]},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"number":{"type":"string"},"alias":{"type":"string"},"priority_id":{"type":"string"},"priority":{"type":"integer","description":"The priority step the sending channel belongs to."},"source":{"type":"string","enum":["priority","last_inbound","last_outbound","claim","switch_number"],"description":"Why this channel was tried (priority mode): `last_inbound` / `last_outbound` = the contact's most recent conversation was on it; `claim` = the pool number the contact was first sent from; `switch_number` = their number was banned and they were moved to another in the pool; `priority` = the priority's step order."},"fallthrough":{"type":"array","description":"Channels passed over before this one, in order. Absent when the first channel tried sent it.","items":{"$ref":"#/components/schemas/RoutingAttempt"}},"transition":{"type":"object","description":"Present when this send carried the previous step's transition message (see `PrioritySettings.steps`). `message_id` is the transition message's id. A `post` transition that couldn't be sent after the main message reports `error` instead. A dry run reports only `mode`.","properties":{"mode":{"type":"string","enum":["pre","post"]},"message_id":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}},"required":["mode"]},"opener":{"type":"object","description":"Present when the message waits behind the channel's opener: an Apple Messages for Business invitation, or a WhatsApp Business template outside the contact's 24-hour window. The message reports `pending` until the contact answers, then goes out in order with the messages sent to them since, or fails (`message.failed`, `amb_invitation_declined`) if they decline the invitation. A dry run has no `message_id`. See the channel's `opener` setting.","properties":{"type":{"type":"string","enum":["invitation","template"]},"message_id":{"type":"string","description":"The opener's message."}},"required":["type"]}}},"RoutingAttempt":{"type":"object","description":"A channel the router passed over. Listed in `routing.fallthrough` on a send, and in `error.details.attempts` (with `message`) on a `no_reachable_channel` error.","properties":{"channel_id":{"type":"string"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"outcome":{"type":"string","enum":["skipped","refused"],"description":"`skipped` = not tried (e.g. `number_banned`, `no_address`, `template_required_outside_customer_service_window`, `no_healthy_number`); `refused` = tried and the channel turned the send down (e.g. `recipient_opted_out`, a limit)."},"code":{"type":"string"},"message":{"type":"string"}},"required":["channel_id","channel_type","outcome","code"]},"FanOutResult":{"type":"object","description":"Returned when a multi-recipient send fans out to individual sends.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MessageSendResult"}},"fan_out":{"type":"boolean"},"sent":{"type":"integer"},"failed":{"type":"integer"},"dry_run":{"type":"boolean"},"routing":{"$ref":"#/components/schemas/RoutingMetadata"}}},"Group":{"type":"object","properties":{"id":{"type":"string","description":"Group id (grp_...)."},"channel_id":{"type":"string"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"name":{"type":["string","null"]},"icon_url":{"type":["string","null"]},"chat_id":{"type":["string","null"]},"chat_linked":{"type":"boolean","description":"Whether the group has an iMessage conversation on at least one of your numbers. `false` until the first message to the group opens one."},"created_at":{"type":"integer"},"members":{"type":"array","items":{"$ref":"#/components/schemas/GroupMember"}}}},"GroupMember":{"type":"object","properties":{"identity_id":{"type":"string"},"contact_id":{"type":["string","null"]},"role":{"type":"string"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"identifier":{"type":"string"},"name":{"type":["string","null"],"description":"The member's contact name. `null` when none is on file."}}},"ContactSummary":{"type":"object","description":"Who a chat, message, or call is with.","required":["contact_id","identifier","name"],"properties":{"contact_id":{"type":["string","null"],"description":"The contact (ct_...). `null` when no contact record matches the identifier."},"identifier":{"type":"string","description":"The contact's identifier (phone number, email, or handle)."},"name":{"type":["string","null"],"description":"The contact's name. `null` when none is on file. On a webhook it is a snapshot from when the event happened; read the contact for current details."}}},"GroupSummary":{"type":"object","required":["group_id","name"],"properties":{"group_id":{"type":"string","description":"Group id (grp_...)."},"name":{"type":["string","null"],"description":"The group's name. `null` when it has none."}}},"Webhook":{"type":"object","properties":{"id":{"type":"string","description":"Webhook id (wh_...)."},"url":{"type":"string","format":"uri"},"event_types":{"type":"array","items":{"type":"string"},"description":"The events this webhook receives. `[\"*\"]` for every webhook created since event filtering was retired; subscriptions registered before that keep their original list, which is frozen and cannot be changed."},"status":{"type":"string","enum":["active","disabled"]},"scope":{"type":"string","enum":["organization","api_key","integration"],"description":"Which lines this subscription receives events for. `organization` covers every line; the other two are limited to the lines that owner holds."},"api_key":{"type":["string","null"],"description":"The owning API key when `scope` is `api_key`, otherwise null."},"integration_id":{"type":["string","null"],"description":"The owning integration when `scope` is `integration`, otherwise null."},"channel_id":{"type":["string","null"]},"channel_type":{"type":["string","null"]},"api_version":{"allOf":[{"$ref":"#/components/schemas/WebhookApiVersionId"}],"description":"The payload version this subscription receives, also sent as `api_version` in every event envelope; see `GET /webhooks/versions`."},"created_at":{"type":"integer"}}},"WebhookApiVersionId":{"type":"string","enum":["2026-10-01","2026-09-01"],"description":"A webhook payload version, as a release date. `2026-10-01` is the latest."},"WebhookApiVersion":{"type":"object","properties":{"version":{"$ref":"#/components/schemas/WebhookApiVersionId"},"latest":{"type":"boolean","description":"True for exactly one version: the one new subscriptions get."},"released_at":{"type":"string","format":"date"},"summary":{"type":"string"},"changes":{"type":"array","items":{"type":"string"},"description":"What this version changed relative to the one before it. Empty for the baseline."}},"required":["version","latest","released_at","summary","changes"]},"WebhookWithSecret":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","properties":{"signing_secret":{"type":"string","description":"Returned once, on creation. Store it to verify signatures."}}}]},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string","description":"Delivery id (wdel_...)."},"webhook_id":{"type":"string"},"event_id":{"type":"string"},"event_type":{"type":"string"},"status":{"type":"string"},"attempt_count":{"type":"integer"},"response_status":{"type":["integer","null"]},"last_attempt_at":{"type":["integer","null"]},"next_attempt_at":{"type":["integer","null"]},"created_at":{"type":"integer"}}},"Event":{"type":"object","properties":{"id":{"type":"string","description":"Event id (evt_...)."},"type":{"type":"string","description":"e.g. message.delivered, poll.voted."},"message_id":{"type":["string","null"]},"chat_id":{"type":["string","null"]},"channel_type":{"type":["string","null"]},"occurred_at":{"type":"integer"},"data":{"type":"object","additionalProperties":true,"description":"`typing.*`, `contact.shared`, `message.reaction`, `poll.*` and `group.*` carry the same data as the webhook in the latest payload version, with `contact`, `group` and `channel_address`, and without the fields that version removes. Names in `contact` and `group` are read when you make the request. A `message.failed` event's data is its `{ code, message }` error (see `MessageError`). Other types carry the data recorded with them."}}},"TicketStatus":{"type":"string","enum":["open","in_progress","waiting_on_customer","closed"],"description":"`open`: not picked up yet. `in_progress`: Blooio support is working on it. `waiting_on_customer`: support needs a reply from you. `closed`: resolved."},"TicketType":{"type":"string","enum":["purchase","purchase_failure","support","billing","technical","feature_request","call_forwarding","system"]},"Ticket":{"type":"object","properties":{"id":{"type":"string","description":"Ticket id (tkt_...)."},"type":{"$ref":"#/components/schemas/TicketType"},"status":{"$ref":"#/components/schemas/TicketStatus"},"priority":{"type":"string","enum":["low","medium","high","urgent"],"description":"Read-only. Tickets open at `medium`; only Blooio support changes it."},"content":{"type":["string","null"],"description":"The request as it was opened."},"forwarding":{"oneOf":[{"$ref":"#/components/schemas/TicketForwarding"},{"type":"null"}],"description":"Progress of a `call_forwarding` ticket; `null` for every other type."},"can_comment":{"type":"boolean","description":"Whether this ticket type takes replies. A closed ticket also refuses them."},"assistant":{"description":"What the support assistant is waiting on. Present on a single ticket (`GET`, `POST /tickets`, `PATCH`, resolution, and retry). The list omits it. Replies run only when the organization has the support assistant enabled, and only for support, technical, and billing tickets filed as a general question. A billing ticket opened through this API has no intake, so the assistant does not answer it.","$ref":"#/components/schemas/TicketAssistant"},"created_at":{"type":"integer"},"updated_at":{"type":"integer"}}},"TicketAssistant":{"type":"object","properties":{"reply_pending":{"type":"boolean","description":"A reply to the latest customer comment is in flight. Poll the ticket until this is false, then read the comments."},"can_confirm_answer":{"type":"boolean","description":"The second answer is waiting for yes or no. Another comment returns 409 until the resolution route is called."},"can_choose_escalation":{"type":"boolean","description":"The customer is choosing between a person and more chat. Another comment returns 409 until the resolution route is called."},"can_escalate":{"type":"boolean","description":"The customer already chose to keep chatting and can still escalate with `choice: \"escalate\"`."}},"required":["reply_pending","can_confirm_answer","can_choose_escalation","can_escalate"]},"TicketResolutionRequest":{"type":"object","description":"Exactly one of `answered` and `choice`.","properties":{"answered":{"type":"boolean","description":"`true` closes the ticket. `false` asks whether to escalate or keep chatting."},"choice":{"type":"string","enum":["escalate","continue"],"description":"`continue` keeps the assistant going. `escalate` hands the ticket to a person. `continue` is valid only while the escalate question is the latest comment. `escalate` is also valid after the customer has kept chatting."}}},"TicketForwarding":{"type":"object","properties":{"state":{"type":"string","enum":["pending","in_progress","completed","failed"],"description":"`pending`: not started yet. `in_progress`: Blooio is setting up forwarding with the carrier. `completed`: calls now forward. `failed`: the last attempt failed, and the ticket stays open with Blooio support. A closed ticket always reads `completed`."},"source_number":{"type":["string","null"],"description":"E.164 number whose calls are forwarded."},"destination_number":{"type":["string","null"],"description":"E.164 number calls are forwarded to."},"completed_at":{"type":["integer","null"],"description":"When forwarding completed; for a ticket closed without a recorded completion, when it was closed. `null` until `state` is `completed`."}}},"TicketComment":{"type":"object","properties":{"id":{"type":"string","description":"Comment id (cmt_...)."},"ticket_id":{"type":"string"},"author_type":{"type":"string","enum":["customer","staff","system"],"description":"`customer`: your organization. `staff`: Blooio support. `system`: an automated note."},"author_name":{"type":["string","null"]},"content":{"type":"string"},"created_at":{"type":"integer"}}},"CreateTicketRequest":{"type":"object","properties":{"type":{"type":"string","enum":["support","billing","technical","feature_request","call_forwarding"]},"content":{"type":"string","minLength":1,"maxLength":10000,"description":"What you need. A `call_forwarding` ticket must read `Please forward <source> to <destination>` with two US numbers."}},"required":["type","content"]},"UpdateTicketRequest":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/TicketStatus"}},"required":["status"]},"Poll":{"type":"object","properties":{"id":{"type":"string"},"chat_id":{"type":"string"},"channel_id":{"type":"string"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"type":{"type":"string","enum":["poll"]},"status":{"type":"string"},"poll":{"type":"object","properties":{"title":{"type":"string"},"options":{"type":"array","items":{"type":"string"}}}}}},"PollVoteResult":{"type":"object","properties":{"id":{"type":"string"},"poll_id":{"type":"string"},"voted_option":{"type":"string"},"toggled":{"type":"string","enum":["on","off"]},"active_votes":{"type":"array","items":{"type":"string"}},"active_vote_indices":{"type":"array","items":{"type":"integer"}}}},"PollResults":{"type":"object","properties":{"poll_id":{"type":"string"},"chat_id":{"type":"string"},"title":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"votes":{"type":"integer"}}}},"total_votes":{"type":"integer"}}},"LinkPreview":{"type":"object","properties":{"imageUrl":{"type":"string","format":"uri"},"title":{"type":"string"}}},"MessageContentFields":{"type":"object","description":"Top-level message content. Provide exactly one content field (`text` and `attachments` may be combined); `suggestions` and `fallback` add to the content rather than being content of their own. The content type is inferred from the field, so no separate `type` discriminator exists. Conflicting content fields are rejected with `422 invalid_content`.\n\nUnrecognised top-level request fields (typos, unsupported fields) are rejected by default with `422 unknown_fields` naming the offending field(s), so mistakes are caught immediately instead of being silently dropped. To opt out and have unknown fields logged-and-ignored instead, send the header `X-Blooio-Strict-Fields: false` (also accepts `0`, `off`, `no`, `lenient`, `warn`).","properties":{"text":{"type":"string","description":"Plain text message. May be combined with `attachments` (sent as media with a caption) — except a lone audio file, which is sent as a standalone voice memo and cannot carry a caption. Set `format: \"markdown\"` to interpret Markdown styling in this field (and in `parts[].text`)."},"format":{"type":"string","enum":["plain","markdown"],"default":"plain","description":"How to interpret `text` (and each `parts[].text`). Defaults to `plain`, which sends the string exactly as given.\n\nWith `markdown`, four constructs are parsed and delivered as real iMessage rich text — the recipient sees styled text, not delimiters:\n\n| Construct | Syntax |\n| --- | --- |\n| Bold | `**bold**` or `__bold__` |\n| Italic | `*italic*` or `_italic_` |\n| Underline | `++underline++` |\n| Strikethrough | `~~strike~~` |\n\nThey nest freely (`**bold and _italic_**`). Everything else Markdown can express — headings, lists, links, code spans, blockquotes, images — is NOT styling iMessage can carry, so it is passed through as literal characters: `[Blooio](https://blooio.com)` is delivered with its brackets and URL intact, and `# Heading` keeps its `#`. Escape a delimiter with a backslash (`\\*not italic\\*`) to send it literally.\n\nThe styling travels in the message's attributed body, so the stored `text` and the `text` returned on reads and webhooks is always the plain string the recipient sees, with the delimiters removed. The Markdown itself comes back as `formatted_text`, re-serialized into a normalized spelling rather than echoed verbatim (`__bold__` returns as `**bold**`).\n\nOnly valid on Blooio iMessage channels — `422 format_unsupported_for_channel_type` on any other channel type, since no other channel type has a rich-text equivalent and would otherwise deliver your delimiters as literal text. Rich text also requires the message to be delivered over iMessage: a Blooio send that falls back to SMS arrives as unstyled plain text (the `text` string), because SMS cannot carry styling.\n\nRejected with `422 invalid_content` when set without `text` or `parts`, when the Markdown source exceeds 20000 characters, or when it compiles to more than 256 distinct formatting ranges."},"attachments":{"type":"array","items":{"type":"string","format":"uri"},"description":"Public https media URLs. May be combined with `text`. On Blooio iMessage, two or more image/video URLs are grouped into one photo/video carousel/collage bubble by default; set `carousel: false` to send them as separate bubbles. On RCS Business, a message takes one URL, and its files can total at most 5 MB (`422 message_too_large`); a URL that can't be downloaded returns `422 attachment_unavailable`.\n\n**Voice memos:** a single audio file (`.mp3`, `.m4a`, `.wav`, `.aac`, `.opus`, `.ogg`) is automatically sent as a voice memo (the native waveform/scrubber bubble), not a plain audio-file attachment — no extra field is needed. A voice memo is a standalone bubble, so it cannot be combined with `text` or any other attachment; do that and the send is rejected with `422 invalid_content`. To send audio with a message, send the voice memo and the text as two separate requests.","minItems":1},"rich_link":{"type":"object","description":"A tappable rich link bubble (Blooio / Apple Messages for Business). On Apple Messages for Business, Blooio fills in whatever you leave out from the page's Open Graph tags (`og:title`, `og:image`, `og:video`) and converts the preview image to a PNG under Apple's 200 KB limit; a link whose image can't be brought under it is sent without one. Apple Maps, Apple Music, and App Clip URLs are built by Apple, so `title` and images are ignored for them. A `text` send that is only a URL is sent as a rich link too.","properties":{"url":{"type":"string","format":"uri"},"title":{"type":"string"},"image_url":{"type":"string","format":"uri","description":"Apple Messages for Business: preview image to use instead of the page's `og:image`."},"video_url":{"type":"string","format":"uri","description":"Apple Messages for Business: video Apple plays inline in the card instead of a still image."}},"required":["url"]},"app_clip":{"type":"object","description":"An App Clip bubble (Blooio p2p iMessage only). Sends an App Clip launch URL that Messages renders as a native App Clip card (app icon + name + Open button); tapping it launches the instant App Clip experience without an install. Provide either a ready-made `url` (Apple's `https://appclip.apple.com/id?p=<bundleID>` launcher, or an app's own associated-domain App Clip link) or the `bundle_id` convenience field, which is expanded into the canonical Apple launch URL. Tip: App-Clip availability is region/OS gated by Apple; an unavailable clip renders a card that falls back to the App Store. To deep-link into an already-installed app instead (e.g. open a specific screen in a downloaded app), send that app's universal link via `rich_link`.","properties":{"url":{"type":"string","format":"uri","description":"The App Clip launch URL (https). Mutually exclusive with `bundle_id`; if both are given, `url` wins."},"bundle_id":{"type":"string","description":"App Clip bundle identifier (e.g. `com.example.app.Clip`), expanded to `https://appclip.apple.com/id?p=<bundle_id>`. Used when `url` is absent."},"title":{"type":"string","description":"Optional preview title override."}}},"imessage_app":{"type":"object","description":"Bring-your-own iMessage App Extension bubble (Blooio p2p iMessage only). Blooio is the transport, NOT the renderer: you point at YOUR OWN signed iMessage app extension and we assemble the MSMessage app balloon and send it. Recipients who have your app installed render its interactive overlay (its `MSMessagesAppViewController` reads `url` on tap); recipients who don't see the native template card (from `caption`/`image_url`) plus Apple's built-in App Store fallback. Identify your extension with `bundle_id` + `team_id` (used to form the `com.apple.messages.MSMessageExtensionBalloonPlugin:<team_id>:<bundle_id>` plugin id) and pass the app-state `url` your extension understands. This does NOT ship or host a renderer — the recipient must have your app for the interactive experience. (For instant, no-install experiences use `app_clip`; to deep-link into an already-installed app use `rich_link`.)","required":["bundle_id","team_id","url"],"properties":{"bundle_id":{"type":"string","description":"Your iMessage app extension's bundle identifier (e.g. `com.acme.app.MessagesExtension`)."},"team_id":{"type":"string","description":"Your Apple Developer Team ID. Combined with `bundle_id` to form the balloon plugin id."},"url":{"type":"string","description":"The app-state URL your extension reads on tap (its `MSMessage.url`). Carries the state to reconstruct on the recipient device."},"app_name":{"type":"string","description":"Display name shown for the app (the `an` field). Defaults to a generic label."},"caption":{"type":"string","description":"Template-card caption shown to everyone (including recipients without the app)."},"subcaption":{"type":"string","description":"Optional template-card subcaption."},"image_url":{"type":"string","format":"uri","description":"Optional https image used as the fallback template card thumbnail. Fetched best-effort (≤256KB); a fetch failure never fails the send."},"app_store_id":{"type":"integer","minimum":1,"description":"Optional App Store id (adam id) for your app. When the recipient doesn't have the extension installed, Messages uses it to deep-link the App Store \"get this app\" fallback to the correct listing. Omitting it leaves the send unchanged."}}},"poll":{"type":"object","description":"A native Blooio poll. Routed sends automatically consider only poll-capable channels.","properties":{"title":{"type":"string","minLength":1},"options":{"type":"array","items":{"type":"string","minLength":1},"minItems":2}},"required":["title","options"]},"sticker":{"type":"object","description":"An iMessage sticker (Blooio p2p iMessage only), sent on its own or placed on a message the way you drag a sticker onto a bubble in Messages. The file is sent unchanged: a PNG, APNG, GIF, HEIC or HEICS (animated HEIC) image, at most 40 MB (41,943,040 bytes). Transparent PNGs and HEICS keep their transparency and animation. A sticker can't carry `text` or be a `reply_to`; place it with `placed_on` instead. The file is checked when the message is sent, so a file that is too large fails the message with `message_too_large` and one that isn't a sticker format with `invalid_content`. Field errors are `422 invalid_sticker`; a `placed_on` that can't take a sticker is `404 sticker_target_not_found`, `409 sticker_target_not_reactable` (not sent yet) or `400 sticker_target_expired` (older than 30 days). Dashboard users can upload a file to `POST /v4/dashboard/stickers` for its URL.","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"The sticker file's http(s) URL."},"placed_on":{"type":"string","description":"Id of the message in this chat to place the sticker on. Omit to send a standalone sticker."},"part_index":{"type":"integer","minimum":0,"default":0,"description":"Which part of `placed_on` the sticker goes on (0-based, as in a reaction's `part_index`). Requires `placed_on`."},"placement":{"type":"object","description":"Where the sticker sits on the bubble. Requires `placed_on`. Any field left out takes its default.","additionalProperties":false,"properties":{"x":{"type":"number","default":0.5,"description":"Horizontal center, as a fraction of the bubble's width (0 is the left edge)."},"y":{"type":"number","default":0.5,"description":"Vertical center, as a fraction of the bubble's height (0 is the top edge)."},"scale":{"type":"number","minimum":0,"default":0.75,"description":"Size multiplier."},"rotation":{"type":"number","default":0,"description":"Rotation in radians."},"width":{"type":"number","minimum":1,"default":300,"description":"Rendered width in points before `scale`."}}}}},"interactive":{"type":"object","description":"Interactive content. On Apple Messages for Business this renders as a native interactive message: a quick reply, list picker, time picker, dynamic form, Apple Pay request, authentication (Sign in) request, or a custom iMessage app. Select the variant with `kind` and populate that kind's required fields; fields not relevant to the chosen kind are ignored. Each `kind` is validated against the minimum shape Apple needs to render it BEFORE the message is sent: Apple's gateway accepts malformed payloads and then shows an empty bubble on device, so Blooio rejects them up front with a `422` and a kind-specific `code` (`invalid_quick_reply`, `invalid_list_picker`, `invalid_time_picker`, `invalid_form`, `invalid_apple_pay`, `invalid_authenticate`, `invalid_imessage_app`) whose `message` names the exact field/index that is wrong. Free-form objects (`dynamic`, `payment`, `authenticate`) are otherwise forwarded to Apple verbatim. Before sending, the chosen `kind` is also checked against the device capability-list Apple stamps on the conversation's latest inbound message: when a list is known and does not advertise the required capability, the send is rejected with `422 amb_capability_unavailable` (naming the missing Apple capability) rather than delivering a bubble the device can't render. On Blooio RCS only `quick_reply` is supported: `summary_text` is sent as text with each item as a reply chip (at most 11, titles up to 25 characters), and other kinds return `422 interactive_kind_unsupported_for_channel_type`.","additionalProperties":true,"required":["kind"],"properties":{"kind":{"type":"string","enum":["quick_reply","list_picker","time_picker","form","apple_pay","authenticate","imessage_app"],"description":"Which interactive experience to render."},"summary_text":{"type":"string","description":"Prompt / fallback line shown where the interactive UI can't render. Used as the quick reply prompt."},"text":{"type":"string","description":"Alias for `summary_text`."},"request_identifier":{"type":"string","description":"Optional stable id echoed back on the customer's reply. Defaults to the message id."},"received_message":{"type":"object","description":"Bubble shown to the customer before they interact. Not allowed for `quick_reply` (send a plain text bubble first instead).","additionalProperties":true,"properties":{"title":{"type":"string"},"subtitle":{"type":"string"},"style":{"type":"string","enum":["icon","small","large"]},"imageIdentifier":{"type":"string"}}},"reply_message":{"type":"object","description":"Bubble shown after the customer replies.","additionalProperties":true,"properties":{"title":{"type":"string"},"subtitle":{"type":"string"},"style":{"type":"string","enum":["icon","small","large"]},"imageIdentifier":{"type":"string"}}},"images":{"type":"array","description":"Inline PNG assets referenced by `imageIdentifier` elsewhere in the payload. Supply each as base64 `data` OR a `url` (fetched server-side, and converted to a PNG within 200 KB when it isn't one). Every image — fetched or inline — is validated from its MAGIC BYTES (not the Content-Type): it must be a real PNG (`422 amb_image_not_png` / `code` on the failed send otherwise), within Apple's 200 KB per-image cap (`amb_image_too_large`) and 5 MB aggregate cap (`amb_images_total_too_large`), and within the @3x dimension ceiling — supply `expected_size: { width, height, style }` to enforce an exact @3x size, rejected with `amb_image_bad_dimensions` naming the expected size. When the resulting interactiveData would exceed Apple's ~10 KB inline ceiling, Blooio automatically uploads it and sends it by `interactiveDataRef` instead (Apple's 200 on an over-limit inline payload is not treated as conformance).","items":{"type":"object","properties":{"identifier":{"type":"string"},"data":{"type":"string","description":"Base64-encoded PNG."},"url":{"type":"string","format":"uri","description":"Public https image URL, fetched server-side. Art that isn't a PNG within 200 KB is converted to one; art that can't be converted is validated as sent."},"expected_size":{"type":"object","description":"Optional exact @3x size to enforce for this asset's target style.","properties":{"width":{"type":"integer"},"height":{"type":"integer"},"style":{"type":"string"}}}}}},"items":{"type":"array","description":"Quick reply options (`kind` = quick_reply). Required: 1–5 items, each with a non-empty `id` and `title`. Rejected with `422 invalid_quick_reply` otherwise.","minItems":1,"maxItems":5,"items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"]}},"sections":{"type":"array","description":"List picker sections (`kind` = list_picker). Required: at least one section, each with a non-empty `title` and at least one item; every item needs a non-empty `identifier` and `title`. Rejected with `422 invalid_list_picker` otherwise. Blooio normalizes the input into Apple's reliably-rendering wire shape (`listPicker.sections[].items[]` with a per-item `style`, under a live-layout envelope) — the shape confirmed to both render the bubble and populate options on tap. May also be supplied as `list` (an array of sections or an object with a `sections` array).","minItems":1,"items":{"type":"object","properties":{"title":{"type":"string"},"order":{"type":"integer"},"multipleSelection":{"type":"boolean","description":"Allow selecting more than one item in this section."},"items":{"type":"array","minItems":1,"items":{"type":"object","properties":{"identifier":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"order":{"type":"integer"},"style":{"type":"string","description":"Row style. Defaults to `default` when omitted.","enum":["default"]},"imageIdentifier":{"type":"string"}},"required":["identifier","title"]}}},"required":["title","items"]}},"list":{"type":"object","description":"Alias for `sections` (`kind` = list_picker). Accepts `{ \"sections\": [...] }` (or a bare array of sections). Same validation and normalization as `sections`.","additionalProperties":true},"event":{"type":"object","description":"Time picker event (`kind` = time_picker). Required: at least one `timeslots` entry, each with a `startTime` (ISO-8601) and a positive `duration` (seconds). Rejected with `422 invalid_time_picker` otherwise.","additionalProperties":true,"properties":{"identifier":{"type":"string"},"title":{"type":"string"},"location":{"type":"object","additionalProperties":true,"properties":{"title":{"type":"string"}}},"timezoneOffset":{"type":"integer"},"timeslots":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"string"},"startTime":{"type":"string","description":"ISO-8601 start time; normalized to Apple's `+0000` format on send."},"duration":{"type":"integer","description":"Slot duration in seconds."}},"required":["startTime","duration"]}}}},"dynamic":{"type":"object","description":"Apple dynamic interactive message (multi-page form) object, forwarded verbatim (`kind` = form). Required: at least one page under `pages` (or `data.pages`); also carries `startPageIdentifier`, `requestIdentifier`, `showSummary`, etc. Rejected with `422 invalid_form` otherwise. May also be supplied under `form`.","additionalProperties":true},"form":{"type":"object","description":"Alias for `dynamic` (`kind` = form).","additionalProperties":true},"payment":{"type":"object","description":"Apple Pay payment request object, forwarded verbatim (`kind` = apple_pay). Required: a `paymentRequest` object with `total` (`label` + numeric `amount`), `currencyCode` (ISO-4217), and `countryCode` (ISO-3166). Rejected with `422 invalid_apple_pay` otherwise. Apple additionally gates delivery on the merchant configuration.","additionalProperties":true},"authenticate":{"type":"object","description":"OAuth2 authentication request object, forwarded verbatim (`kind` = authenticate). Required: an `oauth2` object with `responseType`, `scope`, and `redirectURI`. Rejected with `422 invalid_authenticate` otherwise. Sent as interactive data version 2.0.","additionalProperties":true},"oauth2":{"type":"object","description":"Shorthand for `authenticate.oauth2` (`kind` = authenticate). Requires `responseType`, `scope`, and `redirectURI`.","additionalProperties":true},"app":{"type":"object","description":"Custom iMessage app metadata (`kind` = imessage_app). These App Store fallback fields (shown by Messages when the extension isn't installed) may also be supplied flat on the interactive object as `app_id` / `app_name` / `app_icon`; both forms reach the wire.","properties":{"app_id":{"type":"integer"},"app_name":{"type":"string"},"app_icon":{"type":"string"},"bid":{"type":"string"},"url":{"type":"string"}}},"app_id":{"description":"App Store id for the iMessage app fallback (`kind` = imessage_app). Flat alias for `app.app_id`.","type":["integer","string"]},"app_name":{"type":"string","description":"App Store name for the iMessage app fallback (`kind` = imessage_app). Flat alias for `app.app_name`."},"app_icon":{"type":"string","description":"Base64 PNG icon for the iMessage app fallback (`kind` = imessage_app). Flat alias for `app.app_icon`."},"bid":{"type":"string","description":"iMessage extension bundle id. Required for `kind` = imessage_app (or supply it under `app.bid`); rejected with `422 invalid_imessage_app` otherwise."},"url":{"type":"string","description":"Custom app URL / query string (`kind` = imessage_app)."},"session_identifier":{"type":"string"},"use_live_layout":{"type":"boolean"}}},"invitation":{"type":"object","description":"Apple Messages for Business invitation. Sends an Apple-managed notification template (Live Layout) that invites the customer into a business chat. Addressed to a phone number (`tel:+E164`) rather than an opaque Apple Messages for Business id. Requires prior Invitations approval from Apple and explicit customer opt-in.","additionalProperties":true,"required":["template_id","reference_id"],"properties":{"template_id":{"type":"string","description":"The Apple-managed notification template id authorized for your business (e.g. `binaryChoice.engage.withImage`)."},"reference_id":{"type":"string","maxLength":1000,"description":"Your business context id for this invitation (order number, case id, etc.). Required by Apple. Max 1000 characters; must not contain quotation marks or apostrophes."},"parameters":{"type":"object","additionalProperties":true,"description":"Template parameter values required by the chosen template (e.g. `brandName`, and `brandLogo` as a base64 PNG). For known templates the required parameters are enforced before sending — e.g. `binaryChoice.engage.withImage` requires `brandName` + `brandLogo` — and a missing one is rejected with `422 invalid_invitation` naming the field (rather than being accepted and then rejected by Apple with `400 Invalid payload`)."},"locale":{"type":"string","description":"BCP-47 locale for the template. Defaults to `en-us`."}}},"template":{"type":"object","description":"Template content (WhatsApp Business).","properties":{"template_id":{"type":"string"}},"additionalProperties":true},"parts":{"type":"array","description":"Ordered text/media parts sent as one multipart message (Blooio only). When every part is an image/video (two or more, no text parts) Messages renders them as a photo/video carousel/collage by default; set `carousel: false` to opt out. With `format: \"markdown\"`, each part's `text` is parsed for styling independently.","items":{"type":"object","properties":{"text":{"type":"string"},"url":{"type":"string","format":"uri"}}},"minItems":1},"reply_to":{"type":"string","description":"Message id to reply to. Applies to the whole outgoing message."},"effect":{"type":"string","description":"iMessage screen/bubble effect (Blooio, text only)."},"link_preview":{"$ref":"#/components/schemas/LinkPreview"},"badge":{"type":"string","enum":["sent_with_siri","sent_with_facetime"],"description":"Optional attribution badge shown under the bubble: `sent_with_siri` renders \"Sent with Siri\" and `sent_with_facetime` renders \"Sent with FaceTime\", the way a message dictated to Siri or sent during a FaceTime call appears. Omit for no badge. Any other value is rejected with `422 invalid_content`. Applies to `text`, `attachments` (media), `parts` (multipart), `rich_link`, and `app_clip` sends on Blooio iMessage channels only; rejected with `422 invalid_content` on other content types. No effect on non-Blooio channels."},"carousel":{"type":"boolean","description":"Group image/video attachments into ONE message that Messages renders as a swipeable photo/video carousel/collage, instead of separate bubbles (Blooio p2p iMessage only). DEFAULTS ON: a Blooio send whose attachments (via `attachments` or `parts`) are two or more image/video URLs is grouped automatically — set `carousel: false` to send them as independent bubbles instead. Set `carousel: true` explicitly to also enforce the visual-only rule (a known non-visual extension like `.pdf`, a text part, or fewer than two attachments then returns `422 invalid_carousel`); left unset, a non-qualifying send simply isn't grouped. Image extensions: jpg/jpeg/png/gif/heic/heif/webp/bmp/tiff/avif; video: mov/mp4/m4v/qt/3gp/avi/mkv/webm; a URL with no extension is allowed (its real type resolves on the device). An optional `text` is carried as the carousel's caption. Only valid on Blooio iMessage channels (`422 carousel_unsupported_for_channel_type` if set on another channel type)."},"rich_card":{"type":"object","description":"A Blooio RCS rich card, or a swipeable carousel of up to 10 (Blooio RCS only). Each card shows media, a title, a description, and up to 4 suggestions of its own.","properties":{"cards":{"type":"array","minItems":1,"maxItems":10,"items":{"$ref":"#/components/schemas/RcsCard"}}},"required":["cards"]},"suggestions":{"type":"array","maxItems":11,"items":{"$ref":"#/components/schemas/RcsSuggestion"},"description":"Tappable chips under a `text`, `attachments`, or `rich_card` message (Blooio RCS only). A tapped reply comes back as a `message.received` whose `text` is the chip's `text` and whose `interactive.selected` carries its `id`."},"fallback":{"type":"string","enum":["reject","auto"],"default":"reject","description":"What to do when the recipient's device can't show `interactive`, `rich_card`, or `suggestions` content. `reject` (the default) fails the send with a `422` naming what's missing (`amb_capability_unavailable` on Apple Messages for Business, `rcs_feature_unsupported` with `missing_features` on Blooio RCS). `auto` sends the closest thing the device can show instead: on Blooio RCS, cards and chips it can't show become text and links. The `force-fallback` header sets `auto` too."}}},"RcsSuggestion":{"type":"object","description":"A chip on a Blooio RCS message or card. `reply` sends its `text` back; the other types act on the phone, and a phone that can't do one rejects the send unless `fallback` is `auto`.","properties":{"type":{"type":"string","enum":["reply","open_url","dial","view_location","share_location","create_calendar_event"]},"text":{"type":"string","maxLength":25,"description":"The chip's label."},"id":{"type":"string","maxLength":2048,"description":"Returned as `interactive.selected.id` when the chip is tapped. Defaults to `text`."},"url":{"type":"string","format":"uri","description":"`open_url`: the http(s) URL to open."},"phone_number":{"type":"string","description":"`dial`: the E.164 number to call."},"latitude":{"type":"number","description":"`view_location`: with `longitude`, the point to show."},"longitude":{"type":"number"},"query":{"type":"string","maxLength":200,"description":"`view_location`: a place to search for, instead of a point."},"label":{"type":"string","description":"`view_location`: the pin's label."},"title":{"type":"string","maxLength":100,"description":"`create_calendar_event`: the event's title."},"start_time":{"type":"string","format":"date-time","description":"`create_calendar_event`: ISO 8601."},"end_time":{"type":"string","format":"date-time","description":"`create_calendar_event`: ISO 8601, after `start_time`."},"description":{"type":"string","description":"`create_calendar_event`: the event's notes."}},"required":["type","text"],"example":{"type":"open_url","text":"Track order","url":"https://acme.com/orders/1234"}},"RcsCard":{"type":"object","description":"One rich card. It needs a `title`, `description`, or `media`.","properties":{"title":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":2000},"media":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"A public http(s) image or video URL. The files of all a message's cards can total at most 5 MB."},"height":{"type":"string","enum":["short","medium","tall"]}},"required":["url"]},"suggestions":{"type":"array","maxItems":4,"items":{"$ref":"#/components/schemas/RcsSuggestion"}}}},"Recipient":{"description":"A recipient: a raw identifier string (phone/email/opaque provider id), an array of identifier strings (multiple recipients), an existing `{ group_id }` with an exact sender, or (for routed sends) a `{ contact_id }`. A `contact_id` enables cross-channel-type routing via the contact's identities; a bare identifier reaches phone/email-addressable channels only.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"contact_id":{"type":"string","description":"Contact id (ct_...) — routed sends only."}},"required":["contact_id"],"additionalProperties":false},{"type":"object","properties":{"group_id":{"type":"string","description":"Existing group id (grp_...) — an exact sender, or the deprecated `hybrid` control when its owner holds the group's channel."}},"required":["group_id"],"additionalProperties":false}]},"PriorityChannel":{"type":"object","description":"A channel in a priority. Channels sharing a `priority` (and type) form a pool.","properties":{"channel_id":{"type":"string","description":"Channel id (ch_...)."},"type":{"$ref":"#/components/schemas/ChannelType"},"address":{"type":["string","null"],"description":"The channel's real-world address (phone number for numbered channels)."},"alias":{"type":"string","description":"Organization-wide alias, when the channel has one (Apple Messages for Business / RCS Business)."},"priority":{"type":"integer","minimum":1,"description":"Tier (drag order). Lower runs first; same priority + same type = a pool."}},"required":["channel_id","priority"]},"Priority":{"type":"object","properties":{"id":{"type":"string","description":"Priority id (priority_...)."},"name":{"type":["string","null"]},"is_default":{"type":"boolean","description":"Whether this is the key's default priority (used by the agnostic send)."},"channels":{"type":"array","items":{"$ref":"#/components/schemas/PriorityChannel"}},"settings":{"$ref":"#/components/schemas/PrioritySettings"},"created_at":{"type":"integer"},"updated_at":{"type":"integer"}}},"PrioritySettings":{"type":"object","description":"How sends through this priority behave. Reads return every setting, with the owner's default for any left unset.","properties":{"on_banned_sticky":{"type":"string","enum":["switch_number","error"],"description":"When the number a contact's conversation is on gets banned: `switch_number` sends from another number in the pool (and keeps the contact there), `error` fails the send with `409 sticky_number_unavailable`. Defaults to `switch_number` for API keys and `error` for integrations."},"steps":{"type":"object","description":"Rules for individual steps, keyed by step number (the channels' `priority`). A step with no entry has no rule.","additionalProperties":{"$ref":"#/components/schemas/PriorityStepRule"}}}},"PriorityStepRule":{"type":"object","description":"`outreach_only` marks a step for contacts who haven't replied. Once a contact has replied on a channel in the priority, the step goes last (tried only when every other step passes the send over) and the contact's history on it doesn't choose the channel. `transition` is a message sent with the first message a contact reached on this step gets from the next step: `pre` sends it first, `post` right after.","properties":{"outreach_only":{"type":"boolean","enum":[true]},"transition":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["pre","post"]},"text":{"type":"string","minLength":1}},"required":["mode","text"],"additionalProperties":false}},"required":["outreach_only"],"additionalProperties":false},"PrioritySettingsPatch":{"type":"object","description":"Settings to change. A setting set to null returns to the owner's default; unknown keys are rejected with `422 invalid_settings`.","properties":{"on_banned_sticky":{"type":["string","null"],"enum":["switch_number","error",null]},"steps":{"type":["object","null"],"description":"Replaces every step rule; null clears them. A rule must name a step the priority's channels have, so send `steps` together with `channels` when renumbering steps; otherwise `422 invalid_settings`.","additionalProperties":{"$ref":"#/components/schemas/PriorityStepRule"}}},"additionalProperties":false},"CreatePriorityRequest":{"type":"object","properties":{"name":{"type":"string"},"is_default":{"type":"boolean","description":"Make this the key's default priority. Defaults to true for the key's first priority."},"channels":{"type":"array","minItems":1,"description":"Channels in the priority. Each item is a channel id string or `{ channel_id, priority }`. Channels sharing a priority must be the same type.","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"channel_id":{"type":"string"},"priority":{"type":"integer","minimum":1}},"required":["channel_id"]}]}},"settings":{"$ref":"#/components/schemas/PrioritySettingsPatch"}},"required":["channels"]},"UpdatePriorityRequest":{"type":"object","description":"Any subset of fields. When `channels` is present it replaces the priority's channels wholesale.","properties":{"name":{"type":"string"},"is_default":{"type":"boolean"},"channels":{"type":"array","minItems":1,"items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"channel_id":{"type":"string"},"priority":{"type":"integer","minimum":1}},"required":["channel_id"]}]}},"settings":{"$ref":"#/components/schemas/PrioritySettingsPatch"}}},"ApiKey":{"type":"object","description":"An organization API key. The `api_key` field is the secret bearer value — it is returned in full by the create and list endpoints and must be stored securely.","properties":{"api_key":{"type":"string","description":"The secret key value (prefixed `api_`). Send it as `Authorization: Bearer <api_key>` on API requests."},"api_key_id":{"type":"string","description":"The key's public identifier, unique within the organization. Reference a key by this id (for example in `auto_bind` on purchases) instead of its secret."},"name":{"type":["string","null"],"description":"Human-readable label for the key."},"type":{"type":["string","null"],"description":"Set by Blooio on keys its integrations manage. `null` for keys you create."},"created_at":{"type":["integer","null"],"description":"Creation time (epoch milliseconds)."},"valid_until":{"type":"integer","description":"Expiry time (epoch milliseconds), or `-1` when the key never expires."},"blocked":{"type":"boolean","description":"Whether the key is blocked (suspended)."},"deprecated":{"type":"boolean","description":"Whether the key has been deprecated (revoked)."}}},"CreateApiKeyRequest":{"type":"object","description":"Optional attributes for the new key. All fields are optional; an empty body mints an unnamed, non-expiring key.","properties":{"api_key_id":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$","description":"Public identifier for the key, unique within the organization: 1-64 lowercase letters, numbers, hyphens, or underscores, not starting with `api_` (input is lowercased). Omit it for a random UUID. A taken id returns `409 api_key_id_taken`."},"name":{"type":"string","description":"Human-readable label for the key."},"valid_until":{"type":["integer","null"],"description":"Expiry time (epoch milliseconds). Pass `null` or `-1` (or omit) for a key that never expires."}}},"ApiKeyChannelAssignment":{"type":"object","description":"Result of assigning/unassigning a channel to an API key.","properties":{"api_key":{"type":"string"},"channel_id":{"type":"string","description":"The resolved channel id (`ch_...`) the line belongs to."},"address":{"type":"string","description":"The line in E.164 that was (un)assigned."},"success":{"type":"boolean"},"reassigned":{"type":"boolean","description":"Present on assign: true when the line was taken from a previous owner."},"unchanged":{"type":"boolean","description":"Present on assign: true when the key already owned the line (no-op)."}}},"From":{"type":"string","description":"The sender as a single string: a phone number (any common format; matched to your exact numbered channel), a channel alias (organization-wide name of a non-numbered channel), or an exact channel id (ch_...). Omit it for automatic routing. If a phone number ever matches more than one active channel type, the send fails with `409 ambiguous_from` and the exact `ch_...` id must be used instead."},"SendMessageRequest":{"allOf":[{"$ref":"#/components/schemas/MessageContentFields"},{"type":"object","description":"Send to a recipient. `from` is one optional string (phone number, alias, or channel id); omit it for automatic routing. `priority_id` and `channel_type` are advanced routing controls, each mutually exclusive with an explicit `from`; `hybrid` is a deprecated alias for automatic routing.","properties":{"from":{"$ref":"#/components/schemas/From"},"priority_id":{"type":"string","description":"Route through an explicit priority (priority_...). Mutually exclusive with `from`."},"channel_type":{"$ref":"#/components/schemas/ChannelType","description":"Constrain automatic/priority routing to one channel type. Mutually exclusive with `from`."},"hybrid":{"oneOf":[{"type":"boolean"},{"type":"string"}],"deprecated":true,"description":"Deprecated: Twilio-first, Blooio-after-reply routing is now an `outreach_only` step rule on the priority (`settings.steps`). `true` routes like an omitted `from`. A phone number string routes as that number's owner, an API key or integration in your organization (an API key may only name its own numbers); `409 hybrid_unavailable` when none you can send for owns it. Mutually exclusive with `from` and `priority_id`."},"to":{"$ref":"#/components/schemas/Recipient"},"dry_run":{"type":"boolean","description":"Validate and route only; do not send."}},"required":["to"]}]},"SendToChannelRequest":{"allOf":[{"$ref":"#/components/schemas/MessageContentFields"},{"type":"object","description":"Channel-scoped send. The sender comes from the path, so the body carries no `from` or routing controls.","properties":{"to":{"$ref":"#/components/schemas/Recipient"},"dry_run":{"type":"boolean","description":"Validate and route only; do not send."}},"required":["to"]}]},"SendToChatRequest":{"allOf":[{"$ref":"#/components/schemas/MessageContentFields"},{"type":"object","properties":{"dry_run":{"type":"boolean"}}}]},"CreateChatRequest":{"type":"object","properties":{"channel_id":{"type":"string"},"to":{"type":"string","description":"Recipient identifier (phone/email/opaque provider id)."}},"required":["channel_id","to"]},"CreateContactRequest":{"type":"object","properties":{"name":{"type":["string","null"]},"identifier":{"type":"string","description":"Phone (E.164) or email to attach as the first identity."},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"channel_id":{"type":"string","description":"Required when channel_type is amb."}}},"AttachIdentityRequest":{"type":"object","properties":{"identifier":{"type":"string"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"channel_id":{"type":"string","description":"Required when channel_type is amb."}},"required":["identifier"]},"CreateGroupRequest":{"type":"object","properties":{"channel_id":{"type":"string","description":"Must be a group-capable channel (blooio/whatsapp)."},"members":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"identifier":{"type":"string"}},"required":["identifier"]}]},"minItems":1,"description":"Member phone numbers (E.164) or emails, each given as a string or an object `{ \"identifier\": \"...\" }`. Every identifier is validated; invalid members 422 `invalid_members` instead of being dropped."},"name":{"type":"string"}},"required":["channel_id","members"]},"SendPollRequest":{"type":"object","properties":{"title":{"type":"string"},"options":{"type":"array","items":{"type":"string"},"minItems":2}},"required":["title","options"]},"VotePollRequest":{"type":"object","description":"Provide option_index (0-based) or option text.","properties":{"option_index":{"type":"integer","description":"0-based option index."},"option":{"type":"string","description":"Option text."}}},"CreateWebhookRequest":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"HTTPS endpoint."},"event_types":{"type":"array","items":{"type":"string"},"deprecated":true,"description":"Retired. Every webhook receives every event; filter by `type` in your handler. Omit this field, or send `[\"*\"]`. Any narrower value is rejected with 422 `event_types_retired`. Subscriptions created before the retirement keep the list they were registered with."},"api_key":{"type":"string","description":"Scope the subscription to the lines this API key owns. Omit `api_key` and `integration_id` for an organization-wide subscription that receives events from every line. Must belong to your organization; sending both is rejected with 422 `ambiguous_scope`."},"integration_id":{"type":"string","description":"Scope the subscription to the lines this integration owns. Mutually exclusive with `api_key`."},"channel_id":{"type":"string"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"api_version":{"allOf":[{"$ref":"#/components/schemas/WebhookApiVersionId"}],"description":"The payload version to deliver. Defaults to the latest. Anything not listed by `GET /webhooks/versions` is rejected with 422 `invalid_api_version`, whose `details.supported_versions` lists the accepted values."}},"required":["url"]},"UpdateWebhookRequest":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"event_types":{"type":"array","items":{"type":"string"},"deprecated":true,"description":"Retired. Omit this field to leave an existing subscription's frozen list untouched; sending anything narrower than `[\"*\"]` is rejected with 422 `event_types_retired`."},"status":{"type":"string","enum":["active","disabled"]},"api_version":{"allOf":[{"$ref":"#/components/schemas/WebhookApiVersionId"}],"description":"Move the subscription to another payload version, for example to upgrade after updating your handler. Takes effect from the next event. Unsupported values are rejected with 422 `invalid_api_version`."}}},"BloobabilityV2Message":{"type":"object","required":["id","text"],"additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"pattern":"\\S","description":"Unique within the request. The model never reads it."},"text":{"type":"string","minLength":1,"pattern":"\\S","description":"The full message text, sent unaltered and never cropped. Instructions inside it are judged as conversation, not followed."},"speaker_id":{"type":"string","minLength":1,"pattern":"\\S","description":"Optional participant identity, consistent within the conversation. Two people never share one, though they may share a role. Omit when unknown."},"role":{"type":"string","minLength":1,"pattern":"\\S","description":"Optional free-text role such as `customer`, `agent`, `manager` or `tool`. Custom roles are allowed; `system` grants no authority."},"timestamp":{"type":"string","format":"date-time","pattern":"(?:[Zz]|[+-]\\d{2}:\\d{2})$","description":"Optional real send time, RFC 3339 with an offset (`-00:00` is rejected). Must not decrease across `messages`; ties are allowed. Never invent one from array position."}}},"BloobabilityV2Policy":{"type":"object","required":["id","definition"],"additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"pattern":"\\S","description":"Unique within the request, echoed unchanged. The model never reads it."},"definition":{"type":"string","minLength":1,"pattern":"\\S","description":"A natural-language statement that is true or false of the conversation. This is the whole policy: no registration, roster or per-policy calibration."}}},"BloobabilityV2DecideRequest":{"type":"object","required":["tier","messages","policies"],"additionalProperties":false,"properties":{"tier":{"type":"string","enum":["instant","full"],"description":"Which model decides. `instant` is fastest, for short questions with the deciding facts stated; `full` handles reversals, conditions and missing information. There is no `auto`."},"messages":{"type":"array","minItems":1,"maxItems":2048,"items":{"$ref":"#/components/schemas/BloobabilityV2Message"},"description":"The conversation in chronological order. Every message is in scope; none are dropped."},"policies":{"type":"array","minItems":1,"maxItems":128,"items":{"$ref":"#/components/schemas/BloobabilityV2Policy"},"description":"Independent policies. Probabilities do not sum to one."},"assessment_time":{"type":"string","format":"date-time","pattern":"(?:[Zz]|[+-]\\d{2}:\\d{2})$","description":"Optional \"now\" for time-relative policies, RFC 3339 with an offset. Never defaulted to the request time, and it does not filter messages."}}},"BloobabilityV2PolicyDecision":{"type":"object","required":["id","probability","answerable"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"The policy ID you sent."},"probability":{"type":"number","minimum":0,"maximum":1,"description":"Calibrated probability that the policy holds for this conversation."},"answerable":{"type":"number","minimum":0,"maximum":1,"description":"Calibrated estimate that the conversation contains enough to judge the policy. A number, never a Boolean, and it never alters `probability`. On `instant` it is not a reliable missing-information check."}}},"BloobabilityV2DecideResponse":{"type":"object","required":["tier","model_version","policies"],"additionalProperties":false,"properties":{"tier":{"type":"string","enum":["instant","full"],"description":"The tier that answered: always the one you requested."},"model_version":{"type":"string","description":"Immutable identity of the weights, calibration, tokenizer and runtime that produced these numbers. Compare probabilities only within one version."},"policies":{"type":"array","items":{"$ref":"#/components/schemas/BloobabilityV2PolicyDecision"},"description":"One decision per requested policy, in request order. A request either fully succeeds or errors; no policy is ever dropped."}}},"NumberProduct":{"type":"string","enum":["imessage","sms","voice"],"description":"What a number does: `imessage` (a Blooio iMessage line), `sms` (Blooio SMS), or `voice` (Blooio Voice)."},"TelecomProduct":{"type":"string","enum":["sms","voice"],"description":"A product you can buy a number for and turn on and off: `sms` (Blooio SMS) or `voice` (Blooio Voice)."},"NumberChannel":{"type":"object","description":"The channel behind one of a number's products.","properties":{"channel_id":{"type":"string","description":"Channel id (`ch_...`), the `from` for sends and calls."},"type":{"type":"string","enum":["blooio","sms","voice"],"description":"Channel type for the product."},"status":{"type":"string","description":"The channel's status."},"campaign_id":{"type":["string","null"],"description":"SMS only: the 10DLC campaign (`camp_...`) the number is assigned to."},"assignment_status":{"type":"string","enum":["unassigned","pending","assigned","failed"],"description":"SMS only: where the number stands with its campaign. It sends texts once `assigned`, which needs a campaign carriers have provisioned."},"inbound_handler":{"type":"string","enum":["softphone","agent"],"description":"Voice only: who answers the number's inbound calls (see `VoiceInboundSettings`)."},"ring_timeout_seconds":{"type":"integer","description":"Voice only: how long an inbound call rings before it ends `missed` (see `VoiceInboundSettings`)."}},"required":["channel_id","type","status"]},"Number":{"type":"object","properties":{"number":{"type":"string","description":"The number in E.164 format.","example":"+15551234567"},"products":{"type":"array","items":{"$ref":"#/components/schemas/NumberProduct"}},"status":{"type":"string","enum":["active","pending_verification","suspended","banned"],"description":"The status of the number's most usable channel."},"channels":{"type":"array","items":{"$ref":"#/components/schemas/NumberChannel"}},"created_at":{"type":"integer","description":"When the number's first channel was created (epoch ms)."}},"required":["number","products","status","channels","created_at"]},"AvailableNumber":{"type":"object","description":"A US local number you can buy.","properties":{"number":{"type":"string","description":"The number in E.164 format.","example":"+15551234567"},"products":{"type":"array","items":{"$ref":"#/components/schemas/TelecomProduct"},"description":"Products the number supports."},"locality":{"type":["string","null"],"description":"Rate center (city) the number belongs to."},"region":{"type":["string","null"],"description":"Two-letter US state code."}},"required":["number","products","locality","region"]},"CreateNumberPurchaseRequest":{"type":"object","properties":{"phone_numbers":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"string","pattern":"^\\+1[2-9]\\d{2}[2-9]\\d{6}$"},"description":"US local numbers in E.164 format, as returned by `GET /numbers/available`."},"products":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/TelecomProduct"},"description":"Products to turn on for every number in the purchase."},"auto_bind":{"type":"string","description":"`api_key_id` of an API key in your organization that should own every number in the purchase once it is provisioned. Defaults to the calling API key; OAuth apps get no owner without it. Unknown keys return `404 auto_bind_api_key_not_found`."}},"required":["phone_numbers","products"]},"NumberPurchase":{"type":"object","properties":{"purchase_id":{"type":"string","description":"Purchase id (`pur_...`)."},"status":{"type":"string","enum":["provisioning","completed","failed"],"description":"`completed` once every number is an active channel; `failed` when the carrier refused the order."},"phone_numbers":{"type":"array","items":{"type":"string"}},"products":{"type":"array","items":{"$ref":"#/components/schemas/TelecomProduct"}},"error":{"type":"object","description":"Present on a failed purchase.","properties":{"code":{"type":"string","example":"number_unavailable"}}},"created_at":{"type":"integer","description":"Epoch ms."}},"required":["purchase_id","status","phone_numbers","products","created_at"]},"UpdateNumberRequest":{"type":"object","description":"Send `products`, `campaign_id`, or both.","properties":{"products":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/TelecomProduct"},"description":"The products the number should carry from now on. A product you leave out is turned off and its channel retired; one you add gets a new channel."},"campaign_id":{"type":"string","description":"Assign the number's SMS channel to this 10DLC campaign (`camp_...`). The campaign must be provisioned by carriers (`mno_provisioned`)."}}},"ReleasedNumber":{"type":"object","description":"A released Blooio SMS or Blooio Voice number. Releasing an iMessage line returns the same response as `DELETE /channels/{channel}` instead.","properties":{"number":{"type":"string","description":"The released number in E.164 format."},"channel_ids":{"type":"array","items":{"type":"string"},"description":"The channels retired with it."}},"required":["number","channel_ids"]},"TenDlcOption":{"type":"object","properties":{"value":{"type":"string","description":"The code to send.","example":"MARKETING"},"label":{"type":"string"},"description":{"type":"string"}},"required":["value","label","description"]},"TenDlcOptions":{"type":"object","properties":{"entity_types":{"type":"array","items":{"$ref":"#/components/schemas/TenDlcOption"}},"verticals":{"type":"array","items":{"$ref":"#/components/schemas/TenDlcOption"}},"use_cases":{"type":"array","items":{"$ref":"#/components/schemas/TenDlcOption"}},"sub_usecases":{"type":"array","items":{"$ref":"#/components/schemas/TenDlcOption"},"description":"The use cases a campaign can list in `sub_usecases`."}},"required":["entity_types","verticals","use_cases","sub_usecases"]},"TenDlcUsecaseQualification":{"type":"object","properties":{"usecase":{"type":"string","example":"MIXED"},"qualified":{"type":"boolean","description":"Whether the organization's brand may register a campaign with this use case."},"min_sub_usecases":{"type":"integer"},"max_sub_usecases":{"type":"integer"},"min_samples":{"type":"integer","description":"The fewest sample messages a campaign can give."},"required_flags":{"type":"array","items":{"type":"string","enum":["subscriber_optin","subscriber_optout","subscriber_help"]},"description":"Flags a campaign must set to `true`, because a carrier requires them."},"embedded_link_allowed":{"type":"boolean","description":"Whether a campaign can set `embedded_link`."},"embedded_phone_allowed":{"type":"boolean","description":"Whether a campaign can set `embedded_phone`."}},"required":["usecase","qualified","min_sub_usecases","max_sub_usecases","min_samples","required_flags","embedded_link_allowed","embedded_phone_allowed"]},"TenDlcEntityType":{"type":"string","enum":["PRIVATE_PROFIT","PUBLIC_PROFIT","NON_PROFIT","GOVERNMENT","SOLE_PROPRIETOR"]},"TenDlcBrandDetails":{"type":"object","description":"Who is sending. Every entity type needs `display_name`, `email`, `country`, and `vertical`. `SOLE_PROPRIETOR` also needs `first_name`, `last_name`, and `mobile_phone`; `PRIVATE_PROFIT`, `NON_PROFIT`, and `GOVERNMENT` need `company_name` and `ein`; `PUBLIC_PROFIT` needs `company_name`, `ein`, `stock_symbol`, `stock_exchange`, and `business_contact_email`.","properties":{"display_name":{"type":"string","description":"The brand name recipients know you by."},"company_name":{"type":"string","description":"Legal company name. Required for every entity type but `SOLE_PROPRIETOR`."},"ein":{"type":"string","description":"US Employer Identification Number. Required for every entity type but `SOLE_PROPRIETOR`."},"website":{"type":"string","description":"The brand's website."},"first_name":{"type":"string","description":"Required for `SOLE_PROPRIETOR`."},"last_name":{"type":"string","description":"Required for `SOLE_PROPRIETOR`."},"email":{"type":"string","description":"Contact email for the registration."},"phone":{"type":"string","description":"Business phone number."},"mobile_phone":{"type":"string","description":"Required for `SOLE_PROPRIETOR`: the mobile number that receives the verification PIN."},"street":{"type":"string","description":"Street address."},"city":{"type":"string","description":"City."},"state":{"type":"string","description":"State or region code."},"postal_code":{"type":"string","description":"Postal code."},"country":{"type":"string","description":"Two-letter country code, e.g. `US`."},"vertical":{"type":"string","description":"Industry vertical; one of the `verticals` values from `GET /10dlc/options`."},"stock_symbol":{"type":"string","description":"Required for `PUBLIC_PROFIT`."},"stock_exchange":{"type":"string","description":"Required for `PUBLIC_PROFIT`, e.g. `NASDAQ`."},"business_contact_email":{"type":"string","description":"Required for `PUBLIC_PROFIT`: the email the registry verifies the company through."}}},"TenDlcBrandRequest":{"type":"object","description":"`entity_type` plus the brand's details (`TenDlcBrandDetails`) at the top level.","properties":{"entity_type":{"$ref":"#/components/schemas/TenDlcEntityType"},"display_name":{"type":"string","description":"The brand name recipients know you by."},"company_name":{"type":"string","description":"Legal company name. Required for every entity type but `SOLE_PROPRIETOR`."},"ein":{"type":"string","description":"US Employer Identification Number. Required for every entity type but `SOLE_PROPRIETOR`."},"website":{"type":"string","description":"The brand's website."},"first_name":{"type":"string","description":"Required for `SOLE_PROPRIETOR`."},"last_name":{"type":"string","description":"Required for `SOLE_PROPRIETOR`."},"email":{"type":"string","description":"Contact email for the registration."},"phone":{"type":"string","description":"Business phone number."},"mobile_phone":{"type":"string","description":"Required for `SOLE_PROPRIETOR`: the mobile number that receives the verification PIN."},"street":{"type":"string","description":"Street address."},"city":{"type":"string","description":"City."},"state":{"type":"string","description":"State or region code."},"postal_code":{"type":"string","description":"Postal code."},"country":{"type":"string","description":"Two-letter country code, e.g. `US`."},"vertical":{"type":"string","description":"Industry vertical; one of the `verticals` values from `GET /10dlc/options`."},"stock_symbol":{"type":"string","description":"Required for `PUBLIC_PROFIT`."},"stock_exchange":{"type":"string","description":"Required for `PUBLIC_PROFIT`, e.g. `NASDAQ`."},"business_contact_email":{"type":"string","description":"Required for `PUBLIC_PROFIT`: the email the registry verifies the company through."}},"required":["entity_type","display_name","email","country","vertical"]},"TenDlcBrand":{"type":"object","properties":{"brand_id":{"type":"string","description":"Brand id (`brand_...`)."},"entity_type":{"$ref":"#/components/schemas/TenDlcEntityType"},"status":{"type":"string","enum":["submitting","pending","registered","failed"],"description":"`registered` once the registry has accepted the brand; campaigns need a registered brand."},"identity_status":{"type":["string","null"],"description":"The registry's identity verification result, e.g. `verified` or `unverified`."},"requires_otp":{"type":"boolean","description":"A sole proprietor brand must confirm its mobile number: send a PIN with `POST /10dlc/brand/otp`, then submit it with `PUT /10dlc/brand/otp`."},"details":{"$ref":"#/components/schemas/TenDlcBrandDetails"},"failure_reasons":{"type":["string","null"],"description":"Why the registry rejected the brand."},"created_at":{"type":"integer","description":"Epoch ms."},"updated_at":{"type":"integer","description":"Epoch ms."}},"required":["brand_id","entity_type","status","identity_status","requires_otp","details","failure_reasons","created_at","updated_at"]},"TenDlcCampaignDetails":{"type":"object","description":"What the campaign sends. Creating one needs `usecase`, `samples`, `description`, `message_flow`, `subscriber_optin`, `subscriber_optout`, `subscriber_help`, and `terms_and_conditions` (which must be `true`).","properties":{"usecase":{"type":"string","description":"Use case code; one of the `use_cases` values from `GET /10dlc/options`, e.g. `MARKETING`."},"sub_usecases":{"type":"array","minItems":1,"maxItems":5,"items":{"type":"string"},"description":"Sub use case codes, for use cases that take them (`MIXED`, for one), from the `sub_usecases` values of `GET /10dlc/options`. `GET /10dlc/usecases/{usecase}/qualification` says how many."},"samples":{"type":"array","minItems":2,"maxItems":5,"items":{"type":"string"},"description":"Example messages, as recipients will see them."},"description":{"type":"string","description":"What the campaign sends and why."},"message_flow":{"type":"string","description":"How recipients opt in: where they give consent and what they're told."},"help_message":{"type":"string","description":"The reply to HELP."},"optin_message":{"type":"string","description":"The reply when someone opts in."},"optout_message":{"type":"string","description":"The reply to STOP."},"privacy_policy_link":{"type":"string","description":"URL of the privacy policy."},"terms_and_conditions_link":{"type":"string","description":"URL of the terms and conditions."},"embedded_link_sample":{"type":"string","description":"A sample of the links messages contain, when `embedded_link` is true."},"help_keywords":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"string","pattern":"^[A-Z0-9]{1,20}$"},"description":"Keywords that get the HELP reply."},"optin_keywords":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"string","pattern":"^[A-Z0-9]{1,20}$"},"description":"Keywords that opt a recipient in."},"optout_keywords":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"string","pattern":"^[A-Z0-9]{1,20}$"},"description":"Keywords that opt a recipient out."},"subscriber_optin":{"type":"boolean","description":"Recipients opt in before they're messaged."},"subscriber_optout":{"type":"boolean","description":"Recipients can opt out."},"subscriber_help":{"type":"boolean","description":"Recipients can get help by replying HELP."},"terms_and_conditions":{"type":"boolean","description":"You accept the carriers' 10DLC terms. Must be `true`."},"embedded_link":{"type":"boolean","description":"Messages contain links."},"embedded_phone":{"type":"boolean","description":"Messages contain phone numbers."},"number_pool":{"type":"boolean","description":"The campaign sends from a pool of more than 49 numbers."},"age_gated":{"type":"boolean","description":"Content is age-gated (alcohol, for example)."},"direct_lending":{"type":"boolean","description":"The campaign is about direct lending or loans."}}},"CreateTenDlcCampaignRequest":{"type":"object","properties":{"usecase":{"type":"string","description":"Use case code; one of the `use_cases` values from `GET /10dlc/options`, e.g. `MARKETING`."},"sub_usecases":{"type":"array","minItems":1,"maxItems":5,"items":{"type":"string"},"description":"Sub use case codes, for use cases that take them (`MIXED`, for one), from the `sub_usecases` values of `GET /10dlc/options`. `GET /10dlc/usecases/{usecase}/qualification` says how many."},"samples":{"type":"array","minItems":2,"maxItems":5,"items":{"type":"string","minLength":20},"description":"Example messages, as recipients will see them. `GET /10dlc/usecases/{usecase}/qualification` says how many."},"description":{"type":"string","minLength":40,"description":"What the campaign sends and why."},"message_flow":{"type":"string","minLength":40,"description":"How recipients opt in: where they give consent and what they're told."},"help_message":{"type":"string","minLength":20,"description":"The reply to HELP. Required when `subscriber_help` is true."},"optin_message":{"type":"string","minLength":20,"description":"The reply when someone opts in."},"optout_message":{"type":"string","minLength":20,"description":"The reply to STOP. Required when `subscriber_optout` is true."},"privacy_policy_link":{"type":"string","description":"URL of the privacy policy."},"terms_and_conditions_link":{"type":"string","description":"URL of the terms and conditions."},"embedded_link_sample":{"type":"string","description":"A sample of the links messages contain, when `embedded_link` is true."},"help_keywords":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"string","pattern":"^[A-Z0-9]{1,20}$"},"description":"Keywords that get the HELP reply."},"optin_keywords":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"string","pattern":"^[A-Z0-9]{1,20}$"},"description":"Keywords that opt a recipient in."},"optout_keywords":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"string","pattern":"^[A-Z0-9]{1,20}$"},"description":"Keywords that opt a recipient out."},"subscriber_optin":{"type":"boolean","description":"Recipients opt in before they're messaged."},"subscriber_optout":{"type":"boolean","description":"Recipients can opt out."},"subscriber_help":{"type":"boolean","description":"Recipients can get help by replying HELP."},"terms_and_conditions":{"type":"boolean","description":"You accept the carriers' 10DLC terms. Must be `true`."},"embedded_link":{"type":"boolean","description":"Messages contain links."},"embedded_phone":{"type":"boolean","description":"Messages contain phone numbers."},"number_pool":{"type":"boolean","description":"The campaign sends from a pool of more than 49 numbers."},"age_gated":{"type":"boolean","description":"Content is age-gated (alcohol, for example)."},"direct_lending":{"type":"boolean","description":"The campaign is about direct lending or loans."}},"required":["usecase","samples","description","message_flow","subscriber_optin","subscriber_optout","subscriber_help","terms_and_conditions"]},"TenDlcCampaign":{"type":"object","properties":{"campaign_id":{"type":"string","description":"Campaign id (`camp_...`)."},"brand_id":{"type":"string"},"usecase":{"type":"string","example":"MARKETING"},"status":{"type":"string","enum":["submitting","tcr_pending","tcr_accepted","tcr_failed","tcr_suspended","tcr_expired","review_accepted","review_failed","mno_pending","mno_accepted","mno_rejected","mno_provisioned","mno_provisioning_failed","deactivated"],"description":"`tcr_*` is the registry's review, `review_*` the carriers' vetting, and `mno_*` the carriers' own. Numbers send once the campaign is `mno_provisioned`. A `review_failed` or `mno_rejected` campaign can be appealed. `deactivated` is a campaign the organization canceled."},"details":{"$ref":"#/components/schemas/TenDlcCampaignDetails"},"failure_reasons":{"type":["string","null"],"description":"Why the campaign was rejected."},"created_at":{"type":"integer","description":"Epoch ms."},"updated_at":{"type":"integer","description":"Epoch ms."}},"required":["campaign_id","brand_id","usecase","status","details","failure_reasons","created_at","updated_at"]},"RcsBrandDetails":{"type":"object","description":"The business behind the organization's RCS senders, as Google verifies it.","properties":{"display_name":{"type":"string","description":"The brand's name as people know it."},"legal_name":{"type":"string","description":"The registered legal name."},"legal_entity_type":{"type":"string","enum":["LIMITED_LIABILITY_COMPANY","CORPORATION","S_CORPORATION","PARTNERSHIP","SOLE_PROPRIETORSHIP"]},"organization_type":{"type":"string","enum":["PRIVATE_PROFIT","PUBLIC_PROFIT","NON_PROFIT","GOVERNMENT"]},"website":{"type":"string","format":"uri"},"ein":{"type":"string","description":"US Employer Identification Number: nine digits, optionally `NN-NNNNNNN`.","example":"12-3456789"},"stock_symbol":{"type":"string","description":"Required for `PUBLIC_PROFIT`: the listing as `EXCHANGE:SYMBOL`.","example":"NASDAQ:ACME"},"street":{"type":"string"},"street2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 code.","example":"US"},"first_name":{"type":"string","description":"The brand's contact person."},"last_name":{"type":"string"},"title":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string","description":"E.164."}},"required":["display_name","legal_name","legal_entity_type","organization_type","website","ein","street","city","state","postal_code","country","first_name","last_name","email","phone"]},"RcsBrand":{"type":"object","properties":{"brand_id":{"type":"string","description":"Brand id (`brand_...`)."},"status":{"type":"string","enum":["draft","submitting","in_review","verified","rejected","failed"],"description":"Senders submit once the brand is `verified`. A `draft`, `rejected`, or `failed` brand can be registered again with `PUT /rcs/brand`."},"details":{"$ref":"#/components/schemas/RcsBrandDetails"},"failure_reasons":{"type":["string","null"],"description":"Why Google rejected the brand."},"created_at":{"type":"integer","description":"Epoch ms."},"updated_at":{"type":"integer","description":"Epoch ms."}},"required":["brand_id","status","details","failure_reasons","created_at","updated_at"]},"RcsUseCase":{"type":"string","enum":["TRANSACTIONAL","PROMOTIONAL","OTP","MULTI_USE"],"description":"What the sender mostly sends. Carriers review its launch against it."},"RcsSenderProfile":{"type":"object","description":"What people see on the sender in Google Messages. Creating a sender needs every field but the contacts, and at least one of `phone`, `email`, and `website`.","properties":{"display_name":{"type":"string","maxLength":40},"description":{"type":"string","maxLength":100},"logo_url":{"type":"string","format":"uri","description":"A `logo` from `POST /rcs/assets`."},"banner_url":{"type":"string","format":"uri","description":"A `banner` from `POST /rcs/assets`."},"brand_color":{"type":"string","description":"Hex color for the sender's buttons and accents.","example":"#1A73E8"},"privacy_policy_url":{"type":"string","format":"uri"},"terms_url":{"type":"string","format":"uri"},"phone":{"type":["object","null"],"properties":{"number":{"type":"string","description":"E.164."},"label":{"type":"string","maxLength":25}},"required":["number","label"]},"email":{"type":["object","null"],"properties":{"address":{"type":"string","format":"email"},"label":{"type":"string","maxLength":25}},"required":["address","label"]},"website":{"type":["object","null"],"properties":{"url":{"type":"string","format":"uri"},"label":{"type":"string","maxLength":25}},"required":["url","label"]}}},"CreateRcsSenderRequest":{"type":"object","properties":{"use_case":{"$ref":"#/components/schemas/RcsUseCase"},"profile":{"$ref":"#/components/schemas/RcsSenderProfile"},"alias":{"type":"string","description":"Name to send from with `from`. Defaults to one made from `display_name`."}},"required":["use_case","profile"]},"RcsLaunchDetails":{"type":"object","description":"What carriers review before launching a sender: who it is, what it sends, and how people opt in and out.","properties":{"company_overview":{"type":"string","description":"What the business does."},"agent_overview":{"type":"string","description":"What the sender is for."},"interactions":{"type":"array","minItems":1,"items":{"type":"string","enum":["TRANSACTIONAL_UPDATES","CUSTOMER_SUPPORT","ACCOUNT_ALERTS","TWO_WAY_CONVERSATION","MARKETING_OR_PROMOTIONAL","LOYALTY_OR_REWARD"]}},"message_examples":{"type":"array","minItems":3,"maxItems":10,"items":{"type":"string"},"description":"Messages as recipients will see them."},"opt_in_methods":{"type":"array","minItems":1,"items":{"type":"string","enum":["WEBSITE","MOBILE_APP","SMS","QR_CODE","SALE_POINT"]}},"call_to_action":{"type":"string","description":"The words people see where they opt in."},"call_to_action_url":{"type":"string","format":"uri","description":"Required with `WEBSITE`: where the call to action is."},"call_to_action_media_url":{"type":"string","format":"uri","description":"Required with `WEBSITE` or `MOBILE_APP`: an `opt_in_media` screenshot from `POST /rcs/assets`."},"double_opt_in":{"type":"boolean"},"double_opt_in_message":{"type":"string","description":"Required when `double_opt_in` is true: the message that asks people to confirm."},"opt_in_message":{"type":"string","description":"The first message people get after opting in."},"help_response":{"type":"string","description":"The reply to HELP."},"opt_out_response":{"type":"string","description":"The reply to STOP."},"test_video_url":{"type":"string","format":"uri","description":"A `test_video` from `POST /rcs/assets`, showing the sender in use."},"test_notes":{"type":"string","description":"Anything reviewers need to try the sender."}},"required":["company_overview","agent_overview","interactions","message_examples","opt_in_methods","call_to_action","double_opt_in","opt_in_message","help_response","opt_out_response","test_video_url"]},"RcsTestDevice":{"type":"object","properties":{"test_device_id":{"type":"string"},"phone_number":{"type":"string"},"status":{"type":"string","description":"The invite's state, e.g. `pending` until the tester accepts it and `accepted` after. The sender reaches the phone only once it's `accepted`."}},"required":["test_device_id","phone_number","status"]},"RcsCarrierApproval":{"type":"object","properties":{"carrier":{"type":"string"},"scope":{"type":["string","null"],"description":"What the approval covers, as the carrier states it."},"status":{"type":"string","description":"The carrier's answer, e.g. `pending`, `approved`, or `rejected`."},"submitted_at":{"type":["string","null"],"format":"date-time"},"approved_at":{"type":["string","null"],"format":"date-time"},"rejected_reason":{"type":["string","null"]}},"required":["carrier","status"]},"RcsSender":{"type":"object","properties":{"channel_id":{"type":"string","description":"The sender's `rcs_business` channel. Send from it, or from its `alias`."},"alias":{"type":["string","null"]},"status":{"type":"string","enum":["draft","submitting","submitted","verifying","verified","launching","launched","live","rejected","failed"],"description":"From `verified`, the sender reaches its accepted test devices and its channel is `active`; once `live`, it reaches anyone whose phone gets RCS. `launching` and `launched` are the carriers' review. A `rejected` or `failed` sender can't be resubmitted; contact support."},"use_case":{"$ref":"#/components/schemas/RcsUseCase"},"profile":{"$ref":"#/components/schemas/RcsSenderProfile"},"launch":{"oneOf":[{"$ref":"#/components/schemas/RcsLaunchDetails"},{"type":"null"}],"description":"The launch request, once sent."},"section_statuses":{"type":["object","null"],"description":"Where each part of the review stands: `basics` (Google's verification), `campaign` (the carriers' launch review), and `testing`.","properties":{"basics":{"type":["string","null"]},"campaign":{"type":["string","null"]},"testing":{"type":["string","null"]}}},"test_devices":{"type":"array","items":{"$ref":"#/components/schemas/RcsTestDevice"}},"carrier_approvals":{"type":"array","items":{"$ref":"#/components/schemas/RcsCarrierApproval"}},"deeplink":{"type":["string","null"],"format":"uri","description":"Opens a conversation with the sender in Google Messages, once Google has verified it."},"created_at":{"type":"integer","description":"Epoch ms."},"updated_at":{"type":"integer","description":"Epoch ms."}},"required":["channel_id","alias","status","use_case","profile","launch","section_statuses","test_devices","carrier_approvals","deeplink","created_at","updated_at"]},"RcsChange":{"type":"object","description":"A paid change to a submitted sender or brand, or a removed sender's deletion, which Blooio carries to Google and the carriers.","properties":{"change_id":{"type":"string","description":"`rcschg_...`."},"kind":{"type":"string","enum":["sender_profile","brand_contact","sender_removal"],"description":"`sender_profile` changes a sender's `display_name`, `logo_url`, or `banner_url`; `brand_contact` changes the brand's point of contact; `sender_removal` deletes a removed sender at Google."},"channel_id":{"type":["string","null"],"description":"The sender, or null for a `brand_contact` change."},"status":{"type":"string","enum":["requested","sent","applied","rejected","canceled"],"description":"`requested` until Blooio passes it on, then `sent`. `applied` once the sender or brand shows the change; `rejected` with the reason in `note`. Only a `requested` change can be canceled."},"changes":{"type":"object","additionalProperties":{"type":"string"},"description":"The fields requested, with their new values."},"previous":{"type":"object","additionalProperties":{"type":["string","null"]},"description":"What those fields held when it was requested."},"reviews":{"type":"integer","minimum":0,"description":"The reviews charged for it: one per profile field changed, one for a brand contact, none for a `sender_removal`. Refunded if the change is canceled, or rejected before it was `sent`."},"note":{"type":["string","null"],"description":"Why it was rejected."},"sent_at":{"type":["integer","null"],"description":"Epoch ms."},"created_at":{"type":"integer","description":"Epoch ms."},"updated_at":{"type":"integer","description":"Epoch ms."}},"required":["change_id","kind","channel_id","status","changes","previous","reviews","note","sent_at","created_at","updated_at"]},"VoiceInboundSettings":{"type":"object","description":"Who answers a Blooio Voice number's inbound calls.","properties":{"handler":{"type":"string","enum":["softphone","agent"],"description":"Every inbound call sends the `call.ringing` webhook. `softphone` also rings the organization's dashboards; a teammate there or your code with `POST /calls/{call_id}/answer` can answer, and the first to answer takes the call. `agent` has the Blooio agent that owns the number answer; calls with a withheld caller ID are refused."},"ring_timeout_seconds":{"type":"integer","minimum":5,"maximum":120,"default":30,"description":"How long a call rings before it ends `missed`. Also how long a call a Blooio agent hands off waits for a teammate before the agent takes it back."}}},"CallHandler":{"type":"object","description":"Who has a call's audio, as the call record shows it. `stream` carries its `url`, never its `auth_token`; `phone` is a call transferred to `to`, off Blooio once that number answers.","properties":{"type":{"type":"string","enum":["stream","softphone","agent","phone"]},"url":{"type":"string","description":"`stream` only: the WebSocket URL the audio streams to."},"to":{"type":"string","description":"`phone` only: the number the call was transferred to."}},"required":["type"]},"CallHandlerRequest":{"type":"object","description":"Who takes the call's audio once it's answered. `stream`: Blooio opens a WebSocket to `url` and speaks the Blooio media stream protocol (base64 PCMU at 8 kHz both ways; see the Blooio Voice guide); a socket that closes or sends a frame the protocol doesn't define ends the call with `handler_disconnected`. `agent`: the Blooio agent that owns the call's number talks to the caller. `softphone`: the dashboard user making the request takes it in their browser (dashboard only).","properties":{"type":{"type":"string","enum":["stream","agent","softphone"]},"url":{"type":"string","format":"uri","description":"`stream` only, required: a `wss://` URL."},"auth_token":{"type":"string","maxLength":4000,"description":"`stream` only: sent as `Authorization: Bearer <auth_token>` when Blooio connects to `url`. Kept with the live call only and never returned."}},"required":["type"]},"CallError":{"type":"object","description":"Why a call failed or Blooio ended it: `call_rejected` (the dial was refused), `handler_disconnected` (the handler's socket closed), `call_time_limit` (4 hours), `handoff_unanswered` (nobody answered a call waiting for a teammate, and no agent could take it back), `call_silent` (nobody spoke on an agent's call for two minutes), `agent_unavailable`, `caller_unidentified`, `organization_blocked` (an incoming call turned away because the organization is blocked, for example over an unpaid invoice), or `media_stream_failed`.","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"Call":{"type":"object","properties":{"call_id":{"type":"string","description":"Call id (`call_...`)."},"channel_id":{"type":"string","description":"The Blooio Voice channel (`ch_...`) the call is on."},"direction":{"type":"string","enum":["inbound","outbound"]},"from":{"type":"string","description":"Caller, in E.164 format. A withheld caller ID is the carrier's text instead, such as `anonymous`, with no `contact_id`."},"to":{"type":"string","description":"Callee, in E.164 format."},"contact_id":{"type":["string","null"],"description":"The contact on the other end (`ct_...`)."},"contact":{"oneOf":[{"$ref":"#/components/schemas/ContactSummary"},{"type":"null"}],"description":"The person on the other end, with their name when one is on file. A number already saved as a contact on another channel is that contact. `null` when the caller withheld their number."},"status":{"type":"string","enum":["queued","ringing","in_progress","completed","missed","failed"],"description":"`queued` while the dial is placed, `ringing`, `in_progress` once answered, then `completed`. A call that ends unanswered is `missed`; one whose dial was refused is `failed`."},"handler":{"oneOf":[{"$ref":"#/components/schemas/CallHandler"},{"type":"null"}],"description":"Who has the call's audio; `null` until it's answered, and while a call the agent handed off waits for a teammate."},"answered_by_user_id":{"type":["string","null"],"description":"The dashboard user holding the call on their softphone."},"hangup_cause":{"type":["string","null"],"description":"The carrier's hangup cause, e.g. `normal_clearing`."},"error":{"oneOf":[{"$ref":"#/components/schemas/CallError"},{"type":"null"}]},"created_at":{"type":"integer","description":"Epoch ms."},"answered_at":{"type":["integer","null"],"description":"Epoch ms."},"ended_at":{"type":["integer","null"],"description":"Epoch ms."},"is_recorded":{"type":"boolean","description":"Whether the call is recorded from answer, because the organization had call recording on. Its recording is at `GET /calls/{call_id}/recording` once `call.recording.ready` fires."}},"required":["call_id","channel_id","direction","from","to","contact_id","contact","status","handler","answered_by_user_id","hangup_cause","error","created_at","answered_at","ended_at","is_recorded"]},"CallRecording":{"type":"object","properties":{"call_id":{"type":"string","description":"The recorded call (`call_...`)."},"status":{"type":"string","enum":["ready","failed","deleted"],"description":"`ready` to play or download, `failed` when the call couldn't be recorded, `deleted` once deleted or past the organization's retention period."},"started_at":{"type":["integer","null"],"description":"Epoch ms."},"ended_at":{"type":["integer","null"],"description":"Epoch ms."},"duration_ms":{"type":["integer","null"]},"error":{"oneOf":[{"type":"object","description":"`recording_failed`.","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}]},"download_url":{"type":["string","null"],"format":"uri","description":"MP3, dual channel (one side of the call per channel), valid for 10 minutes. Only `GET` returns it, and only for a `ready` recording."}},"required":["call_id","status","started_at","ended_at","duration_ms","error"]},"PlaceCallRequest":{"type":"object","properties":{"from":{"type":"string","description":"One of the organization's Blooio Voice numbers, in E.164 format."},"to":{"type":"string","description":"The number to call, in E.164 format."},"handler":{"$ref":"#/components/schemas/CallHandlerRequest"}},"required":["from","to","handler"]},"AnswerCallRequest":{"type":"object","properties":{"handler":{"$ref":"#/components/schemas/CallHandlerRequest"}},"required":["handler"]},"TransferCallRequest":{"type":"object","description":"Send exactly one of `to` and `handler`.","properties":{"to":{"type":"string","description":"Transfer the call to this phone number (E.164). It leaves Blooio's handlers once the number answers; if it doesn't, the call waits for a teammate."},"handler":{"$ref":"#/components/schemas/CallHandlerRequest"}}},"CallDtmfRequest":{"type":"object","properties":{"digits":{"type":"string","pattern":"^[0-9A-D*#wW]{1,64}$","description":"Keypad digits to play into the call. `w` pauses half a second, `W` a second.","example":"1234#"}},"required":["digits"]},"CallTranscriptSegment":{"type":"object","properties":{"seq":{"type":"integer","description":"Order within the call."},"speaker":{"type":"string","enum":["contact","agent"]},"text":{"type":"string"},"occurred_at":{"type":"integer","description":"Epoch ms."}},"required":["seq","speaker","text","occurred_at"]}}},"x-blooio-webhook-event-notes":{"message.received":"An inbound message arrived. When the sender attached media that hasn't finished downloading yet, `attachments` lists only what is stored and `pending_attachment_count` says how many are still on their way; a `message.updated` with the same `message_id` follows once they land.","message.updated":"Media for an inbound message finished downloading after its `message.received` went out. Same body as `message.received`, with the same `message_id` and the complete `attachments`; `pending_attachment_count` is present only if some are still on their way.","message.reaction":"A tapback (classic reaction like `love`/`like` or an emoji) was added to or removed from a message. Payload carries `reaction`, `action` (`add`/`remove`), the reacted `message_id`, `original_text`, the `sender` (the person who reacted — in a group, the member who tapped — or your channel for a reaction you sent; `recipient` is the other side), and — crucially for multi-image sends — `part_index`: WHICH part of a multipart/carousel message was reacted to (0-based, counting the message's parts). The enriched payload also includes the message's full ordered `attachments` array and, when the tapback landed on an image, `reacted_attachment`: the exact `{ index, url, media_type, size, caption }` that was reacted to (null when the reaction targeted a text/caption part or a non-multipart message). So a reaction on the 4th photo of a carousel reports `part_index: 3` and a `reacted_attachment` pointing at that specific image — not just \"loved the message\". On iMessage a sticker tapback (\"React with a sticker\") has `reaction: \"sticker\"` and, when added, `sticker`: the `{ url, media_type }` of the sticker it was made with (left out while the file is still transferring). A sticker dragged onto a bubble is not a reaction: it arrives as `message.received` with `message_type: \"sticker\"`. `group` is `{ group_id, name }` in a group chat and `null` in a 1:1 chat. Like the rest of the body, `contact` describes the reacted message: in a group it is the member who wrote that message (`null` when you wrote it), while `sender` is who reacted. On Apple Messages for Business (`channel_type: \"amb\"`) Apple reports no message id or bubble for a reaction, only the text the customer's device shows: a tapback or emoji on a text bubble is matched to a recent message by the text Apple quotes and carries no `part_index` or `reacted_attachment`; a reaction to an image or interactive message, or a sticker, arrives as `message.received` with Apple's text (such as `Loved an image`); removals send nothing.","message.pending":"An outbound message row was accepted but nothing has taken it yet. The v1/v2 and GHL send paths report it while the row waits for a device. A native `/v4` send reports it only for a message waiting behind an Apple Messages for Business invitation or WhatsApp Business template (see `routing.opener`), which moves to `sent` or `failed` once the contact answers; every other `/v4` send inserts straight as `queued`.","safety.state_changed":"Fires when a sending number's warm-up tier or safety action changes. Payload carries `tier`, `previous_tier`, `action`, `previous_action` (one of `none`, `queue`, `slow`, `pause_new`, `reply_only`, `review`), and `reasons`.","safety.number_banned":"Fires when Apple bans a dedicated or shared sending number. Payload carries `channel_id`, `phone_number`, `allocation_type` (`dedicated` or `shared`), and `banned_at`.","number.purchase.completed":"A number purchase finished provisioning. Because purchases are asynchronous (the charge triggers a Stripe invoice whose `invoice.paid` provisions the lines), this is how you learn the order succeeded. A purchase may provision several lines, so the payload reports all of them: `purchase_id`, `status` (`completed`), `lines` (one entry per provisioned line, each `{ phone_number, channel_id }`), and the flat `phone_numbers` (E.164) and `channel_ids` (`ch_` ids) arrays covering every provisioned line. When lines are owned by different API keys, every owning key's subscription receives the event.","number.purchase.action_required":"The saved card needs additional authentication (3DS/SCA) before the purchase can complete. Payload carries `purchase_id`, `status` (`action_required`), and `action_url` — open it to finish authentication. Once completed, provisioning proceeds and a `number.purchase.completed` event follows.","number.purchase.failed":"A number purchase failed terminally; no lines were provisioned. Payload carries `purchase_id`, `status` (`failed`), and `reason`.","number.removed":"A line was removed/unsubscribed (via `DELETE /channels/{channel}` or the dashboard). Payload carries `phone_number`, `channel_id`, `binding_id`, and `reasons` (the churn reason labels).","registration.brand.updated":"The organization's 10DLC brand changed status or identity verification (see `GET /10dlc/brand`). Payload carries `brand_id`, `status` (`pending`, `registered`, or `failed`), `identity_status`, and `failure_reasons`.","registration.campaign.updated":"A 10DLC campaign changed status or rejection reasons (see `GET /10dlc/campaigns/{campaign_id}`). Payload carries `campaign_id`, `brand_id`, `status`, and `failure_reasons`. Once `status` is `mno_provisioned`, the organization's waiting SMS numbers are assigned to the campaign and become sendable.","registration.rcs_brand.updated":"The organization's RCS brand changed status or rejection reason (see `GET /rcs/brand`). Payload carries `brand_id`, `status` (`draft`, `submitting`, `in_review`, `verified`, `rejected`, or `failed`), and `failure_reasons`. Senders can be submitted once it's `verified`.","registration.rcs_sender.updated":"An RCS sender changed status, review sections, or carrier approvals (see `GET /rcs/senders/{channelId}`). Payload carries `channel_id`, `status`, `section_statuses`, and `carrier_approvals`. From `verified` the sender reaches its accepted test devices; once `live`, anyone whose phone gets RCS.","registration.rcs_change.updated":"Blooio sent, applied, or rejected an RCS change request (see `GET /rcs/changes`). Payload is the change request: `change_id`, `kind`, `channel_id`, `status`, `changes`, `previous`, `reviews`, `note`, `sent_at`, `created_at`, and `updated_at`. Once it's `applied`, the sender or brand shows the change.","call.ringing":"An inbound call is ringing on a Blooio Voice number. Payload is the call (see `GET /calls/{call_id}`). Answer it with `POST /calls/{call_id}/answer` before `ring_timeout_seconds` passes; on a `softphone` number the dashboard rings too, and the first to answer takes the call.","call.answered":"A call was answered and its handler (`stream`, `softphone`, or `agent`) is connected. Payload is the call.","call.ended":"A call ended. Payload is the call, with its final `status` (`completed`, `missed`, or `failed`), `hangup_cause`, and `ended_at`.","call.recording.ready":"A recorded call's recording was saved, shortly after the call ended. Payload is the recording without `download_url`: `call_id`, `status` (`ready`), `started_at`, `ended_at`, and `duration_ms`. Fetch `GET /calls/{call_id}/recording` for a download link.","flow.event":"An AI agent's flow reached a Webhook step. Payload carries `event` (the name given to that step), `flow_id`, `flow_run_id`, `conversation_id`, `step` (the step id), and `collected`: everything the flow has collected so far, keyed `step.field`. Scoped to the agent's API key, like `handoff.*`.","chat.closed":"Apple Messages for Business: the customer left or reported the conversation, or declined a business invitation. Payload carries `chat_id`, `channel_type` (`amb`), and `reason` (`customer_closed`). The chat's `state` becomes `closed`; sends to it are refused until the customer messages again.","identity.verified":"Apple Messages for Business: a customer finished an `interactive` `authenticate` (Sign in) request whose `redirectURI` is Blooio's `https://api.blooio.com/oauth/callback`. Payload carries `chat_id`, `channel_id`, `channel_type`, `status` (`success`), `opaque_id`, `business_id`, `verified_at`, and the OAuth `authorization_code` and `state` to exchange at your own token endpoint. A request whose `redirectURI` is your own server sends the code there instead, and emits no event.","payment.received":"Apple Messages for Business: the customer authorized an Apple Pay request. Payload carries `chat_id`, `channel_id`, `channel_type`, the request's `message_id`, and `payment`: `request_id` (Apple's `requestIdentifier` for the request), `status`, the encrypted Apple Pay `token` to settle with your Payment Processing certificate (`null` when Blooio processes the payment, which adds `payment_intent_id`, `amount`, and `currency`), `billing_contact`, `shipping_contact`, `shipping_method`, and `order`.","payment.completed":"Apple Messages for Business: Apple finalized the order for an Apple Pay request. Same shape as `payment.received`, with `payment.status` `completed`, `token` `null`, and the order details in `payment.order`. One successful purchase produces both events.","payment.failed":"Apple Messages for Business: a payment Blooio processes was declined or errored. Same shape as `payment.received`, with `payment.status` `failed` and the reason in `payment.error`.","group.merged":"A new group's first message landed in an iMessage conversation another of your groups already holds with the same people on that number, so the new group was folded into it (see Create a group). `group_id` / `chat_id` are the surviving group and its chat; `source_group_id` / `source_chat_id` are the ids returned when the group was created. Also carries `channel_id`, the `message_id` that opened the conversation (now in the surviving chat), and the full surviving `group` object. Replies in that conversation arrive under the survivor.","group.member_added":"Someone joined the group on a phone, and is now in its members (see List group members). Payload carries `group_id`, `member` (`{ contact_id, identifier, name }`), `added_by` (the address of whoever added them, your number if you did, or `null` when the phone didn't say), and the `group` object. Sent once per change, however many of your numbers are in the group.","group.member_removed":"Someone left or was removed from the group on a phone, and is no longer in its members. Payload carries `group_id`, `member`, `reason` (`left`, `removed`, or `null` when the change was picked up without the phone saying how), `removed_by` (who removed them, when `reason` is `removed`), and the `group` object. Sent once per change.","group.channel_removed":"One of your numbers left the group. Payload carries `group_id`, `chat_id` and `channel_id` (that number's chat and channel), `reason` (`left`), `removed_by`, and the `group` object. The chat's `state` becomes `left`, and sends to the group from that number return 409 `not_in_group` until a message arrives in the group on it again."},"x-blooio-webhook-event-types":["message.received","message.updated","message.queued","message.pending","message.sent","message.delivered","message.failed","message.read","message.reaction","poll.created","poll.received","poll.voted","payment.received","payment.completed","payment.failed","group.name_changed","group.icon_changed","group.merged","group.member_added","group.member_removed","group.channel_removed","contact.shared","contact.merged","contact.opted_out","contact.opted_in","typing.started","typing.stopped","safety.state_changed","safety.number_banned","chat.closed","identity.verified","number.purchase.completed","number.purchase.action_required","number.purchase.failed","number.removed","registration.brand.updated","registration.campaign.updated","registration.rcs_brand.updated","registration.rcs_sender.updated","registration.rcs_change.updated","call.ringing","call.answered","call.ended","call.recording.ready","handoff.created","handoff.customer_reply","handoff.acknowledged","handoff.resolved","flow.event"],"x-blooio-endpoints":["DELETE /v4/10dlc/campaigns/:campaignId","DELETE /v4/api-keys/:apiKey","DELETE /v4/api-keys/:apiKey/channels/:channel","DELETE /v4/calls/:callId/recording","DELETE /v4/channels/:channel","DELETE /v4/chats/:chatId/background","DELETE /v4/chats/:chatId/participants/:identityId","DELETE /v4/chats/:chatId/typing","DELETE /v4/contacts/:contactId","DELETE /v4/contacts/:contactId/addresses/:addressId","DELETE /v4/contacts/:contactId/contact-points/:contactPointId","DELETE /v4/contacts/:contactId/identities/:identityId","DELETE /v4/contacts/:contactId/memory/:factId","DELETE /v4/contacts/:contactId/tags/:tag","DELETE /v4/groups/:groupId","DELETE /v4/groups/:groupId/icon","DELETE /v4/numbers/:number","DELETE /v4/priorities/:priorityId","DELETE /v4/rcs/senders/:channelId","DELETE /v4/rcs/senders/:channelId/test_devices/:testDeviceId","DELETE /v4/templates/:templateId","DELETE /v4/webhooks/:webhookId","GET /v4/10dlc/brand","GET /v4/10dlc/campaigns","GET /v4/10dlc/campaigns/:campaignId","GET /v4/10dlc/options","GET /v4/10dlc/usecases/:usecase/qualification","GET /v4/api-keys","GET /v4/api-keys/:apiKey","GET /v4/api-keys/:apiKey/channels","GET /v4/attachments/:attachmentId","GET /v4/calls","GET /v4/calls/:callId","GET /v4/calls/:callId/recording","GET /v4/calls/:callId/transcript","GET /v4/channels","GET /v4/channels/:channel","GET /v4/channels/:channel/capabilities","GET /v4/channels/:channel/health","GET /v4/channels/:channel/settings","GET /v4/channels/blooio/available","GET /v4/channels/blooio/purchases/:purchaseId","GET /v4/chats","GET /v4/chats/:chatId","GET /v4/chats/:chatId/background","GET /v4/chats/:chatId/focus","GET /v4/chats/:chatId/messages","GET /v4/chats/:chatId/messages/:messageId","GET /v4/chats/:chatId/messages/:messageId/events","GET /v4/chats/:chatId/messages/:messageId/status","GET /v4/chats/:chatId/participants","GET /v4/chats/:chatId/polls/:pollId","GET /v4/contacts","GET /v4/contacts/:contactId","GET /v4/contacts/:contactId/capabilities","GET /v4/contacts/:contactId/identities","GET /v4/contacts/:contactId/memory","GET /v4/contacts/:contactId/profile","GET /v4/contacts/:contactId/tags","GET /v4/contacts/:contactId/timeline","GET /v4/events","GET /v4/events/:eventId","GET /v4/groups","GET /v4/groups/:groupId","GET /v4/groups/:groupId/members","GET /v4/location/contacts","GET /v4/location/contacts/:handle","GET /v4/location/contacts/refresh","GET /v4/me","GET /v4/me/numbers","GET /v4/me/numbers/:number/contact-card","GET /v4/me/priority","GET /v4/numbers","GET /v4/numbers/:number","GET /v4/numbers/available","GET /v4/numbers/purchases/:purchaseId","GET /v4/phone-numbers/lookup","GET /v4/priorities","GET /v4/priorities/:priorityId","GET /v4/rcs/brand","GET /v4/rcs/changes","GET /v4/rcs/senders","GET /v4/rcs/senders/:channelId","GET /v4/rcs/senders/:channelId/test_devices","GET /v4/templates","GET /v4/templates/:templateId","GET /v4/tickets","GET /v4/tickets/:ticketId","GET /v4/tickets/:ticketId/comments","GET /v4/webhooks","GET /v4/webhooks/:webhookId","GET /v4/webhooks/:webhookId/deliveries","GET /v4/webhooks/:webhookId/logs","GET /v4/webhooks/versions","PATCH /v4/10dlc/campaigns/:campaignId","PATCH /v4/channels/:channel/settings","PATCH /v4/chats/:chatId","PATCH /v4/contacts/:contactId","PATCH /v4/contacts/:contactId/addresses/:addressId","PATCH /v4/contacts/:contactId/contact-points/:contactPointId","PATCH /v4/contacts/:contactId/identities/:identityId","PATCH /v4/contacts/:contactId/profile","PATCH /v4/groups/:groupId","PATCH /v4/numbers/:number","PATCH /v4/priorities/:priorityId","PATCH /v4/rcs/senders/:channelId","PATCH /v4/tickets/:ticketId","PATCH /v4/webhooks/:webhookId","POST /v4/10dlc/brand/otp","POST /v4/10dlc/campaigns","POST /v4/10dlc/campaigns/:campaignId/appeal","POST /v4/ai/bloobability/v1/decide","POST /v4/ai/bloobability/v2/decide","POST /v4/api-keys","POST /v4/attachments","POST /v4/calls","POST /v4/calls/:callId/answer","POST /v4/calls/:callId/dtmf","POST /v4/calls/:callId/hangup","POST /v4/calls/:callId/softphone/ticket","POST /v4/calls/:callId/transfer","POST /v4/channels/:channel/messages","POST /v4/channels/blooio/purchases","POST /v4/chats","POST /v4/chats/:chatId/contact-card","POST /v4/chats/:chatId/messages","POST /v4/chats/:chatId/messages/:messageId/notify","POST /v4/chats/:chatId/messages/:messageId/reactions","POST /v4/chats/:chatId/participants","POST /v4/chats/:chatId/polls","POST /v4/chats/:chatId/polls/:pollId/vote","POST /v4/chats/:chatId/read","POST /v4/chats/:chatId/typing","POST /v4/contacts","POST /v4/contacts/:contactId/addresses","POST /v4/contacts/:contactId/contact-points","POST /v4/contacts/:contactId/identities","POST /v4/contacts/:contactId/merge","POST /v4/contacts/:contactId/tags","POST /v4/groups","POST /v4/groups/:groupId/icon","POST /v4/location/contacts/refresh","POST /v4/me/numbers/:number/call-forwarding","POST /v4/me/numbers/:number/contact-card/avatar","POST /v4/messages","POST /v4/numbers","POST /v4/phone-numbers/batch","POST /v4/phone-numbers/lookup","POST /v4/priorities","POST /v4/rcs/assets","POST /v4/rcs/brand/changes","POST /v4/rcs/changes/:changeId/cancel","POST /v4/rcs/senders","POST /v4/rcs/senders/:channelId/changes","POST /v4/rcs/senders/:channelId/launch","POST /v4/rcs/senders/:channelId/submit","POST /v4/rcs/senders/:channelId/test_devices","POST /v4/templates","POST /v4/tickets","POST /v4/tickets/:ticketId/comments","POST /v4/tickets/:ticketId/reply-retry","POST /v4/tickets/:ticketId/resolution","POST /v4/webhooks","POST /v4/webhooks/:webhookId/deliveries/:deliveryId/replay","POST /v4/webhooks/:webhookId/logs/:deliveryId/replay","POST /v4/webhooks/:webhookId/secret/rotate","PUT /v4/10dlc/brand","PUT /v4/10dlc/brand/otp","PUT /v4/api-keys/:apiKey/channels/:channel","PUT /v4/channels/:channel/profile","PUT /v4/chats/:chatId/background","PUT /v4/me/numbers/:number/contact-card","PUT /v4/rcs/brand"]}