{
    "openapi": "3.1.0",
    "info": {
        "title": "Threadwire API",
        "version": "1.0",
        "description": "Send and receive WhatsApp messages from your own system, through a WhatsApp number linked by QR code. Using the API means you agree to our [Terms of Service](\/terms) and [Acceptable Use Policy](\/acceptable-use).\n\nNew here? Start with the [Introduction](\/docs\/guides\/introduction) and the [Quickstart](\/docs\/guides\/quickstart).\n\nAn **instance** is one WhatsApp number linked to Threadwire. Requests name it by its ID: `instance_id` in a body or query, `{id}` in a path.\n\n## Send your first message\n\n**0. Open an account** at [\/app\/register](\/app\/register): a 7-day free trial, no card needed.\n\n**1. Link a number and get your key.** In your panel, click \"Add instance\" and scan the QR code on the phone (WhatsApp \u2192 Settings \u2192 Linked devices). Then make a key under **Developers \u2192 API keys \u2192 New key** (admins only), and copy the **Instance ID** from the instance's page. (Or [through the API](\/docs\/guides\/instances).)\n\n**2. Send yourself a message.** First write \"hi\" to the instance from another phone: its `chat_link` (\"Chat link\" on the Instances page) opens the chat. Then send to that phone. (Only one phone? Use the instance's own number as `to`.)\n\n```sh\ncurl https:\/\/threadwire.net\/api\/v1\/messages \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\"instance_id\": \"YOUR_INSTANCE_ID\", \"to\": \"YOUR_PHONE\", \"text\": \"Hello from Threadwire\"}'\n```\n\n`YOUR_PHONE` is that phone's number in international format, like `201012345678`: country code, no leading 0. The answer comes at once:\n\n```json\n202 {\"data\": {\"id\": \"01K\u2026\", \"status\": \"queued\", \"phone\": \"201012345678\", \"body\": \"Hello from Threadwire\", \"\u2026\": \"\u2026\"}}\n```\n\nYou wrote first, so this is a reply, and it arrives in seconds. **Protection is off until you turn it on:** `PATCH \/v1\/instances\/{id}` with `{\"protection_settings\": {\"enabled\": true}}`. With it on, a first message to a stranger is the slowest, and held at night: see [Waiting, errors and retries](\/docs\/guides\/waiting).\n\nThe `status` moves to `sent`, `delivered` and `read`, or `failed` with the reason in `error`. Check it with `GET \/v1\/messages\/{id}` or by webhook.\n\n**3. Receive replies.** Under **Developers \u2192 Webhooks** (admins only), set your endpoint's URL. Every reply and status change is posted there as JSON:\n\n```json\n{\"id\": \"evt_01K\u2026\", \"type\": \"message.received\", \"created_at\": \"2026-10-01T10:00:00+00:00\",\n \"data\": {\"id\": \"01K\u2026\", \"instance_id\": \"01K\u2026\", \"phone\": \"201012345678\", \"body\": \"Hi!\", \"\u2026\": \"\u2026\"}}\n```\n\nAnswer with any `2xx`. Every event is signed: [Webhooks and events](\/docs\/guides\/webhooks) has a whole endpoint to copy. No public URL? Fetch the same events with `GET \/v1\/events`.\n\nFiles, voice notes, polls and the rest are fields on the same `POST \/v1\/messages`: see [Sending messages](\/docs\/guides\/sending).\n\n## Authentication\n\nSend your API key as a bearer token on every request:\n\n```\nAuthorization: Bearer YOUR_API_KEY\n```\n\nMake one key per system, so each can be revoked alone. A key can be full access, send-and-read or read-only, for one instance, and locked to your IP addresses: see [API keys](\/docs\/guides\/instances#api-keys).\n\n## Answers and errors\n\nAnswers are JSON, with the result under `data`: `200` or `201` when done, `202` when a message is queued. An error has a `message` in plain words and a stable `code` for your program:\n\n```json\n422 {\"message\": \"The number must be in international format with its country code, like 201012345678.\",\n     \"code\": \"validation_failed\", \"errors\": {\"to\": [\"\u2026\"]}}\n```\n\n| Status | `code` | What to do |\n|---|---|---|\n| `401` | `unauthenticated` | Check the `Authorization` header |\n| `403` | `key_not_allowed`, `ip_not_allowed`, `account_suspended`, `plan_limit`, `feature_not_included` | Read `message` |\n| `404` | `instance_not_found`, `message_not_found`, `chat_not_found`, `group_not_found`, `channel_not_found`, `broadcast_not_found`, `otp_not_found`, `status_not_found`, `not_found` | Check the id |\n| `409` | `not_connected`, `link_refused`, `whatsapp_restricted`, `new_chats_paused`, `whatsapp_refused`, `in_progress`, `conflict` | Read `message`; retry after `Retry-After` when present |\n| `422` | `validation_failed`, `wrong_code`, `no_attempts_left` | `errors` names each field |\n| `429` | `rate_limited`, `limit_reached`, `plan_limit`, `backlog_full`, `file_budget_used`, `busy` | Wait for `Retry-After`. 600 requests a minute per account |\n| `502`, `503` | `whatsapp_unavailable`, `unavailable`, `person_unknown` | Retry, after `Retry-After` if present |\n| Other | `bad_request`, `invalid_json`, `server_error`, `not_supported` | |\n\n[The API's error codes](\/docs\/guides\/waiting#the-apis-error-codes) says what each one means.\n\nA message that cannot go is not an error: it is answered `202` and later becomes `failed`, with the reason in `error`.\n\n**Retries are safe** with an `Idempotency-Key` header (like an order id): a retry returns the first message instead of sending a second. See [what to retry](\/docs\/guides\/waiting#what-your-code-should-retry).\n\n## Pagination\n\n| List | Getting the next page |\n|---|---|\n| `GET \/v1\/messages` | A cursor: follow `links.next` until it is null. `limit` up to 100 (50 by default) |\n| `GET \/v1\/chats`, `\/v1\/instances`, `\/v1\/broadcasts` | `page`: follow `links.next` until it is null (50, 15 and 20 a page) |\n| `GET \/v1\/events` | `after`: pass the last answer's `next_after`, at once while `has_more` is true. Oldest first |\n| An instance's `groups` and `contacts`, a chat's `history` | `limit` and `offset`, until a page comes back empty |\n\nChannels and labels come whole; statuses, the newest 100. Messages, chats, instances and broadcasts are newest first.\n\n## A message's values\n\n- `direction`: `in` (they wrote) or `out` (the instance sent it).\n- `status`: `scheduled`, `queued`, `sent`, `delivered`, `read` or `failed` for a message going out; always `received` for one coming in.\n- `type`: `text`, `image`, `video`, `audio`, `document`, `sticker`, `location`, `contact` or `poll`; a message coming in may be an `order` or a `product`.\n\n## The one rule to know\n\nWhatsApp bans numbers that behave like bots, so protection, once on, sends as people do. **Replies go within seconds:** anything to someone who wrote in the last 24 hours. **With protection on, messages to people who never wrote are limited:** spaced out, capped per day, and not sent at night. Either way, let people write first: every instance has a `chat_link` for your site and receipts. See [How sending protects your number](\/docs\/guides\/protection).\n\n## Guides\n\n- [Linking an instance](\/docs\/guides\/instances): by QR code or a code, its settings, keys, plans and limits.\n- [Sending messages](\/docs\/guides\/sending): every kind of message, scheduling, edits, deletions and reactions.\n- [Waiting, errors and retries](\/docs\/guides\/waiting): what holds or fails a message, the pace, and what to retry.\n- [Broadcasts](\/docs\/guides\/broadcasts): one message to many people who wrote to you. Never loop `POST \/v1\/messages` over a list instead.\n- [How sending protects your number](\/docs\/guides\/protection): the limits, warm-up, quiet hours, opt-outs and your settings.\n- [Webhooks and events](\/docs\/guides\/webhooks): every event, retries and polling.\n- [WhatsApp OTP](\/docs\/guides\/otp): confirm a phone number for a sign-up or a sign-in.\n- [Chats, contacts and groups](\/docs\/guides\/chats-and-groups): also history, labels, statuses and channels.\n- [The AI agent](\/docs\/guides\/ai-agent): answers with your own Anthropic, OpenAI or Gemini key.\n- [A menu of choices](\/docs\/guides\/menu): \"1 for prices, 3 to talk to someone\".\n- [Chatwoot](\/docs\/guides\/chatwoot): answer chats from Chatwoot.\n- [Partners](\/docs\/guides\/partners): serve your clients.\n- [Tools and code samples](\/docs\/guides\/tools): the [Postman collection](\/docs\/api.postman.json), a Laravel package, n8n, Make, WooCommerce and AI agents (MCP).\n- [Official API or a linked number?](\/docs\/guides\/official-or-linked): which one you need.\n- [Changelog](\/docs\/guides\/changelog): what changed, and what `\/v1` promises.\n"
    },
    "servers": [
        {
            "url": "https:\/\/threadwire.net\/api"
        }
    ],
    "tags": [
        {
            "name": "Instances"
        },
        {
            "name": "Messages"
        },
        {
            "name": "Chats and contacts"
        },
        {
            "name": "WhatsApp OTP"
        },
        {
            "name": "Labels"
        },
        {
            "name": "Broadcasts"
        },
        {
            "name": "Statuses"
        },
        {
            "name": "Groups"
        },
        {
            "name": "Contact fields"
        },
        {
            "name": "Channels"
        },
        {
            "name": "Events"
        },
        {
            "name": "Webhooks"
        },
        {
            "name": "Clients"
        }
    ],
    "security": [
        {
            "http": []
        }
    ],
    "paths": {
        "\/v1\/instances": {
            "get": {
                "operationId": "instances.index",
                "description": "Newest first, 15 to a page, each with its `status` and its\n`protection` today. See [Linking an instance](\/docs\/guides\/instances).",
                "summary": "List your instances",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "external_ref",
                        "in": "query",
                        "description": "Only the instance with this reference of yours.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `InstanceResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/InstanceResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "instances.store",
                "description": "It starts unlinked: link it with its QR code or a pairing code.\n`external_ref` is your own id for it. `protection_settings` takes the\nsame keys as changing an instance, so `{\"enabled\": true}` turns its\nsending protection on from the start (it is off unless you do); one\npast its safe limit is refused (422) and nothing is added. Answers 201\nwith the instance. See [Linking an instance](\/docs\/guides\/instances).",
                "summary": "Add an instance",
                "tags": [
                    "Instances"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 100
                                    },
                                    "external_ref": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 191
                                    },
                                    "reject_calls": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ],
                                        "description": "Decline WhatsApp calls to it at once."
                                    },
                                    "protection_settings": {
                                        "type": "object",
                                        "description": "Your own settings, by key: `enabled` (true or false: whether this instance follows the sending rules at all; off unless you turn it on), `quiet_hours` (`from` and `to`, hours), `new_people_per_day`, `first_contact_gap` and `break_minutes` (`min` and `max`), `unanswered_follow_ups`, `reopen_after_days`, `not_replies_per_day`, `warmup_mode` (`new` or `established`), `mark_read_before_reply` and `automatic_warmup`. `null` puts one back to the recommended value.",
                                        "examples": [
                                            {
                                                "enabled": true
                                            }
                                        ]
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`InstanceResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/InstanceResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error\n\nAn error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "This API key is for one instance. Adding or removing instances needs an account API key."
                                                    ]
                                                },
                                                "code": {
                                                    "$ref": "#\/components\/schemas\/ApiError"
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "code"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview."
                                                },
                                                "code": {
                                                    "$ref": "#\/components\/schemas\/ApiError"
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "code"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Another instance is being added to this account right now. Try again in a few seconds."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Could not start the WhatsApp session. Please try again."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}": {
            "get": {
                "operationId": "instances.show",
                "description": "Its `status`, and its `protection` today: how many new people it may\nmessage, its warm-up limits, whether new chats are paused, and its\n`safety` score. See [How sending protects your number](\/docs\/guides\/protection).",
                "summary": "Get an instance",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`InstanceResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/InstanceResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "instances.destroy",
                "description": "WhatsApp is logged out on the phone, and the instance's messages and\nfiles are deleted. Answers 204, or 409 while WhatsApp restricts the\ninstance. See [Linking an instance](\/docs\/guides\/instances).",
                "summary": "Remove an instance",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "This API key is for one instance. Adding or removing instances needs an account API key."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "patch": {
                "operationId": "instances.update",
                "description": "Its `name`, `reject_calls` (decline WhatsApp calls at once) and\n`protection_settings` (your own protection, within safe limits). Send\nonly what changes; `null` puts a setting back to the recommended\nvalue, and one past its safe limit is refused (422). The keys and\ntheir limits are in\n[How sending protects your number](\/docs\/guides\/protection#your-own-settings).",
                "summary": "Change an instance's settings",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 100
                                    },
                                    "reject_calls": {
                                        "type": "boolean"
                                    },
                                    "protection_settings": {
                                        "type": "object",
                                        "description": "Your own settings, by key: `enabled` (true or false: whether this instance follows the sending rules at all; off unless you turn it on), `quiet_hours` (`from` and `to`, hours), `new_people_per_day`, `first_contact_gap` and `break_minutes` (`min` and `max`), `unanswered_follow_ups`, `reopen_after_days`, `not_replies_per_day`, `warmup_mode` (`new` or `established`), `mark_read_before_reply` and `automatic_warmup`. `null` puts one back to the recommended value.",
                                        "examples": [
                                            {
                                                "new_people_per_day": 20,
                                                "quiet_hours": {
                                                    "from": 21,
                                                    "to": 9
                                                },
                                                "reopen_after_days": null
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`InstanceResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/InstanceResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/qr": {
            "get": {
                "operationId": "instances.qr",
                "description": "Scan it from WhatsApp \u2192 Linked devices to link the instance: `image`\nto show as it is, or `value`, the text it encodes, to draw your own. It\nchanges every few seconds, so poll this while showing it. Answers 409\nwith the reason while the instance's `link_refused` is set (the phone\nscanned belongs to another instance); `POST \/v1\/instances\/{id}\/logout`\nclears that and starts a new link. See\n[Linking an instance](\/docs\/guides\/instances).",
                "summary": "Get an instance's QR code",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "image": {
                                                    "type": "string"
                                                },
                                                "value": {
                                                    "type": "string",
                                                    "description": "What the code says: draw it yourself, or in a terminal."
                                                }
                                            },
                                            "required": [
                                                "image",
                                                "value"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/calls\/reject": {
            "post": {
                "operationId": "instances.calls.reject",
                "description": "A WhatsApp call ringing on the instance now, from its call.received\nwebhook: send the event's `id` as `call_id` and its `chat_id` as\n`from`. One-to-one calls only. Answers 204. See\n[Linking an instance](\/docs\/guides\/instances).",
                "summary": "Decline a call",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "call_id": {
                                        "type": "string",
                                        "maxLength": 100
                                    },
                                    "from": {
                                        "type": "string",
                                        "description": "The caller, as `chat_id` in the webhook.",
                                        "pattern": "^[0-9]+(:[0-9]+)?@(c\\.us|s\\.whatsapp\\.net|lid)$",
                                        "maxLength": 100
                                    }
                                },
                                "required": [
                                    "call_id",
                                    "from"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "409": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "This instance is not connected."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "WhatsApp did not take the decline; the call may have ended already."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/restart": {
            "post": {
                "operationId": "instances.restart",
                "description": "For one that seems stuck: it reconnects within seconds and stays\nlinked. Answers 202 with the instance. See [Linking an instance](\/docs\/guides\/instances).",
                "summary": "Restart an instance",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "`InstanceResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/InstanceResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/stop": {
            "post": {
                "operationId": "instances.stop",
                "description": "Takes it offline on purpose: nothing is sent or received until it is\nstarted again. It stays linked. Answers 202 with the instance. See\n[Linking an instance](\/docs\/guides\/instances).",
                "summary": "Stop an instance",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "`InstanceResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/InstanceResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/start": {
            "post": {
                "operationId": "instances.start",
                "description": "After a stop or a disconnection: it connects again, or, if WhatsApp\nlogged it out, waits for a new QR code. Answers 202 with the instance.\nSee [Linking an instance](\/docs\/guides\/instances).",
                "summary": "Start an instance",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "`InstanceResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/InstanceResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/logout": {
            "post": {
                "operationId": "instances.logout",
                "description": "Logs the phone out, as removing a linked device in WhatsApp: the\ninstance then waits for a new QR code scan. Its id, settings, keys and\nmessages stay. For an instance whose link was refused (`link_refused`)\nit clears the refusal and starts a new link. Answers 202 with the\ninstance. See [Linking an instance](\/docs\/guides\/instances).",
                "summary": "Unlink WhatsApp",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "`InstanceResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/InstanceResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/pairing-code": {
            "post": {
                "operationId": "instances.pairing-code",
                "description": "The alternative to the QR code: an 8-character code for the `phone`\nbeing linked, which its owner types into WhatsApp \u2192 Linked devices \u2192\nLink with phone number instead. See [Linking an instance](\/docs\/guides\/instances).",
                "summary": "Get a pairing code",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "phone": {
                                        "type": "string",
                                        "pattern": "^\\+?[1-9][0-9]{6,14}$"
                                    }
                                },
                                "required": [
                                    "phone"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                }
                                            },
                                            "required": [
                                                "code"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Too many codes for this instance in the last hour. Try again later, or link with the QR code."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/check": {
            "post": {
                "operationId": "instances.check",
                "description": "Asked through this instance, which must be connected. Answers\n`on_whatsapp`, and `checks_left_today`: checks are limited, as many\nlookups look like scraping to WhatsApp. See\n[Is a phone on WhatsApp?](\/docs\/guides\/sending#is-a-phone-on-whatsapp).",
                "summary": "Check whether a phone number is on WhatsApp",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "phone": {
                                        "type": "string",
                                        "pattern": "^\\+?[1-9][0-9]{6,14}$"
                                    }
                                },
                                "required": [
                                    "phone"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "phone": {
                                                    "type": "string"
                                                },
                                                "on_whatsapp": {
                                                    "type": "string"
                                                },
                                                "checks_left_today": {
                                                    "type": "string",
                                                    "description": "Checks this instance may still make today."
                                                }
                                            },
                                            "required": [
                                                "phone",
                                                "on_whatsapp",
                                                "checks_left_today"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "This instance is not connected, so it cannot check numbers now."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "WhatsApp did not answer the check. Please try again."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/ai-agent": {
            "get": {
                "operationId": "ai-agent.show",
                "description": "Its settings and state. The API key is never returned, only its last 4\ncharacters. See [The AI agent](\/docs\/guides\/ai-agent).",
                "summary": "Get an instance's AI agent",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "enabled": {
                                                    "type": "boolean"
                                                },
                                                "provider": {
                                                    "type": "string"
                                                },
                                                "model": {
                                                    "type": "string"
                                                },
                                                "api_key_set": {
                                                    "type": "boolean"
                                                },
                                                "api_key_last4": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "about": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "tone": {
                                                    "type": "string"
                                                },
                                                "language": {
                                                    "type": "string"
                                                },
                                                "answers": {
                                                    "type": "string"
                                                },
                                                "working_hours": {
                                                    "type": "object",
                                                    "properties": {
                                                        "days": {
                                                            "type": "array",
                                                            "items": {
                                                                "__PHP_Incomplete_Class_Name": "stdClass"
                                                            }
                                                        },
                                                        "from": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "to": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "days",
                                                        "from",
                                                        "to"
                                                    ]
                                                },
                                                "wait_minutes": {
                                                    "type": "integer"
                                                },
                                                "daily_limit": {
                                                    "type": "integer"
                                                },
                                                "replies_today": {
                                                    "type": "integer"
                                                },
                                                "paused": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "reason": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "since": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "reason",
                                                        "since"
                                                    ]
                                                },
                                                "last_error": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "reason": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "reason",
                                                        "at"
                                                    ]
                                                },
                                                "models": {
                                                    "type": "object",
                                                    "additionalProperties": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "enabled",
                                                "provider",
                                                "model",
                                                "api_key_set",
                                                "api_key_last4",
                                                "about",
                                                "tone",
                                                "language",
                                                "answers",
                                                "working_hours",
                                                "wait_minutes",
                                                "daily_limit",
                                                "replies_today",
                                                "paused",
                                                "last_error",
                                                "models"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "patch": {
                "operationId": "ai-agent.update",
                "description": "Send only what changes. `api_key` is write-only. Turning it on needs a\nkey; a key for the other provider, or a model not listed, is refused\n(422). See [The AI agent](\/docs\/guides\/ai-agent).",
                "summary": "Change an instance's AI agent",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "working_hours": {
                                        "type": "object",
                                        "description": "Your working hours, in the instance's time zone: `days` (0 is Sunday), `from` and `to` as HH:MM.",
                                        "properties": {
                                            "days": {
                                                "type": "array",
                                                "items": {
                                                    "type": "integer",
                                                    "minimum": 0,
                                                    "maximum": 6
                                                },
                                                "minItems": 1
                                            },
                                            "from": {
                                                "type": "string"
                                            },
                                            "to": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "enabled": {
                                        "type": "boolean",
                                        "description": "Whether the agent answers. Turning it on needs an API key."
                                    },
                                    "provider": {
                                        "type": "string",
                                        "description": "Whose model answers; its own API key is needed.",
                                        "enum": [
                                            "anthropic",
                                            "openai",
                                            "gemini"
                                        ]
                                    },
                                    "model": {
                                        "type": "string",
                                        "description": "One of the `models` the answer lists for the provider.",
                                        "maxLength": 60
                                    },
                                    "api_key": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Your own Anthropic, OpenAI or Google Gemini API key. Write-only: never returned.",
                                        "pattern": "^\\S+$",
                                        "minLength": 20,
                                        "maxLength": 300
                                    },
                                    "about": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "What the agent is told about your business: what you sell, prices, hours, what to say and not to say.",
                                        "maxLength": 8000
                                    },
                                    "tone": {
                                        "type": "string",
                                        "description": "How it writes.",
                                        "enum": [
                                            "friendly",
                                            "formal"
                                        ]
                                    },
                                    "language": {
                                        "type": "string",
                                        "description": "The language it answers in; `auto` answers in the person's own.",
                                        "enum": [
                                            "auto",
                                            "en",
                                            "ar"
                                        ]
                                    },
                                    "answers": {
                                        "type": "string",
                                        "description": "`always`, only `outside_hours` (see `working_hours`), or `no_reply`: only when your team has not answered within `wait_minutes`.",
                                        "enum": [
                                            "always",
                                            "outside_hours",
                                            "no_reply"
                                        ]
                                    },
                                    "wait_minutes": {
                                        "type": "integer",
                                        "description": "For `no_reply`: the minutes your team has to answer first.",
                                        "minimum": 1,
                                        "maximum": 120
                                    },
                                    "daily_limit": {
                                        "type": "integer",
                                        "description": "The most answers it gives a day.",
                                        "minimum": 1,
                                        "maximum": 2000
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "enabled": {
                                                    "type": "boolean"
                                                },
                                                "provider": {
                                                    "type": "string"
                                                },
                                                "model": {
                                                    "type": "string"
                                                },
                                                "api_key_set": {
                                                    "type": "boolean"
                                                },
                                                "api_key_last4": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "about": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "tone": {
                                                    "type": "string"
                                                },
                                                "language": {
                                                    "type": "string"
                                                },
                                                "answers": {
                                                    "type": "string"
                                                },
                                                "working_hours": {
                                                    "type": "object",
                                                    "properties": {
                                                        "days": {
                                                            "type": "array",
                                                            "items": {
                                                                "__PHP_Incomplete_Class_Name": "stdClass"
                                                            }
                                                        },
                                                        "from": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "to": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "days",
                                                        "from",
                                                        "to"
                                                    ]
                                                },
                                                "wait_minutes": {
                                                    "type": "integer"
                                                },
                                                "daily_limit": {
                                                    "type": "integer"
                                                },
                                                "replies_today": {
                                                    "type": "integer"
                                                },
                                                "paused": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "reason": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "since": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "reason",
                                                        "since"
                                                    ]
                                                },
                                                "last_error": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "reason": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "reason",
                                                        "at"
                                                    ]
                                                },
                                                "models": {
                                                    "type": "object",
                                                    "additionalProperties": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "enabled",
                                                "provider",
                                                "model",
                                                "api_key_set",
                                                "api_key_last4",
                                                "about",
                                                "tone",
                                                "language",
                                                "answers",
                                                "working_hours",
                                                "wait_minutes",
                                                "daily_limit",
                                                "replies_today",
                                                "paused",
                                                "last_error",
                                                "models"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/chatwoot": {
            "get": {
                "operationId": "chatwoot.show",
                "description": "Its settings and state. The access token is never returned, only its\nlast 4 characters. See [Chatwoot](\/docs\/guides\/chatwoot).",
                "summary": "Get an instance's Chatwoot connection",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "connected": {
                                                    "type": "string"
                                                },
                                                "enabled": {
                                                    "type": "boolean"
                                                },
                                                "url": {
                                                    "type": "string"
                                                },
                                                "account_id": {
                                                    "type": "integer"
                                                },
                                                "inbox_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "api_token_set": {
                                                    "type": "boolean"
                                                },
                                                "api_token_last4": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "sign_messages": {
                                                    "type": "boolean"
                                                },
                                                "paused": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "description": "Never the inbox's webhook address: its secret sends messages, and a read key must not.",
                                                    "properties": {
                                                        "reason": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "since": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "reason",
                                                        "since"
                                                    ]
                                                },
                                                "last_error": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "reason": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "reason",
                                                        "at"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "connected",
                                                "enabled",
                                                "url",
                                                "account_id",
                                                "inbox_id",
                                                "api_token_set",
                                                "api_token_last4",
                                                "sign_messages",
                                                "paused",
                                                "last_error"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "patch": {
                "operationId": "chatwoot.update",
                "description": "Send only what changes. A new address, account, inbox or token is\ntried at once: without `inbox_id`, an API inbox is made for the\ninstance, and the inbox's webhook is set for you. What Chatwoot\nrefuses is a 422 with why. See [Chatwoot](\/docs\/guides\/chatwoot).",
                "summary": "Connect or change an instance's Chatwoot",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "enabled": {
                                        "type": "boolean",
                                        "description": "Whether chats are copied to Chatwoot and replies sent from it."
                                    },
                                    "url": {
                                        "type": "string",
                                        "description": "Your Chatwoot's https address, like https:\/\/app.chatwoot.com. A page of it, pasted whole, also gives its account.",
                                        "maxLength": 255
                                    },
                                    "account_id": {
                                        "type": "integer",
                                        "description": "Your Chatwoot account id: the number after \/accounts\/ in its address.",
                                        "minimum": 1
                                    },
                                    "inbox_id": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "description": "An API channel inbox to use. Leave it out, or null, and one is made for the instance.",
                                        "minimum": 1
                                    },
                                    "api_token": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "The access token from a Chatwoot administrator's profile settings. Write-only: never returned.",
                                        "pattern": "^\\S+$",
                                        "minLength": 10,
                                        "maxLength": 200
                                    },
                                    "sign_messages": {
                                        "type": "boolean",
                                        "description": "Puts the agent's name above what they send on WhatsApp."
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "connected": {
                                                    "type": "string"
                                                },
                                                "enabled": {
                                                    "type": "boolean"
                                                },
                                                "url": {
                                                    "type": "string"
                                                },
                                                "account_id": {
                                                    "type": "integer"
                                                },
                                                "inbox_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "api_token_set": {
                                                    "type": "boolean"
                                                },
                                                "api_token_last4": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "sign_messages": {
                                                    "type": "boolean"
                                                },
                                                "paused": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "description": "Never the inbox's webhook address: its secret sends messages, and a read key must not.",
                                                    "properties": {
                                                        "reason": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "since": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "reason",
                                                        "since"
                                                    ]
                                                },
                                                "last_error": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "reason": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "reason",
                                                        "at"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "connected",
                                                "enabled",
                                                "url",
                                                "account_id",
                                                "inbox_id",
                                                "api_token_set",
                                                "api_token_last4",
                                                "sign_messages",
                                                "paused",
                                                "last_error"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "chatwoot.destroy",
                "description": "Nothing more is copied to it or sent from it. The inbox and its\nconversations stay in your Chatwoot. See [Chatwoot](\/docs\/guides\/chatwoot).",
                "summary": "Disconnect an instance's Chatwoot",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/menu": {
            "get": {
                "operationId": "menu.show",
                "description": "The whole menu as one document, the same one `PUT` takes. An instance\nwith no menu yet returns an empty one, turned off. See\n[A menu of choices](\/docs\/guides\/menu).",
                "summary": "Get an instance's menu",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "enabled": {
                                                    "type": "boolean"
                                                },
                                                "greeting": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "digits": {
                                                    "type": "string"
                                                },
                                                "back_label": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "handover_message": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "choices": {
                                                    "type": "array",
                                                    "items": {
                                                        "__PHP_Incomplete_Class_Name": "stdClass"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "enabled",
                                                "greeting",
                                                "digits",
                                                "back_label",
                                                "handover_message",
                                                "choices"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "menu.update",
                "description": "Send the whole menu: it replaces the one before. What would not work\nis refused (422) and nothing changes. See\n[A menu of choices](\/docs\/guides\/menu#the-api).",
                "summary": "Replace an instance's menu",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "choices": {
                                        "type": "array",
                                        "description": "One to nine choices, numbered in this order. Each has a `label` and an `outcome`: `answer` (with `answer`, or `saved_answer_id`), `menu` (with its own `choices`, and a `greeting` if you like) or `person` (with `message`, `assign_to` and `chat_label_id` if you like).",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "label": {
                                                    "type": "string",
                                                    "maxLength": 40
                                                },
                                                "outcome": {
                                                    "type": "string",
                                                    "enum": [
                                                        "answer",
                                                        "menu",
                                                        "person"
                                                    ]
                                                },
                                                "answer": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "maxLength": 1000
                                                },
                                                "saved_answer_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "message": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "maxLength": 300
                                                },
                                                "assign_to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "chat_label_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "greeting": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "maxLength": 300
                                                },
                                                "choices": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string",
                                                                "maxLength": 40
                                                            },
                                                            "outcome": {
                                                                "type": "string",
                                                                "enum": [
                                                                    "answer",
                                                                    "person"
                                                                ]
                                                            },
                                                            "answer": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ],
                                                                "maxLength": 1000
                                                            },
                                                            "saved_answer_id": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "message": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ],
                                                                "maxLength": 300
                                                            },
                                                            "assign_to": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "chat_label_id": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "label",
                                                            "outcome"
                                                        ]
                                                    },
                                                    "maxItems": 9
                                                }
                                            },
                                            "required": [
                                                "label",
                                                "outcome"
                                            ]
                                        },
                                        "minItems": 1,
                                        "maxItems": 9
                                    },
                                    "enabled": {
                                        "type": "boolean",
                                        "description": "Whether the menu answers people who write."
                                    },
                                    "greeting": {
                                        "type": "string",
                                        "description": "The line above the choices, as people receive it.",
                                        "maxLength": 600
                                    },
                                    "digits": {
                                        "type": "string",
                                        "description": "How the choices are numbered: `western` (1 2 3) or `arabic` (\u0661 \u0662 \u0663). People may answer with either.",
                                        "enum": [
                                            "western",
                                            "arabic"
                                        ]
                                    },
                                    "back_label": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "What \"0\" is called inside a sub-menu, like \"Back\". Needed when a choice opens a sub-menu.",
                                        "maxLength": 40
                                    },
                                    "handover_message": {
                                        "type": "string",
                                        "description": "What someone is told when the chat goes to your team.",
                                        "maxLength": 300
                                    }
                                },
                                "required": [
                                    "choices",
                                    "enabled",
                                    "greeting",
                                    "handover_message"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "enabled": {
                                                    "type": "boolean"
                                                },
                                                "greeting": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "digits": {
                                                    "type": "string"
                                                },
                                                "back_label": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "handover_message": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "choices": {
                                                    "type": "array",
                                                    "items": {
                                                        "__PHP_Incomplete_Class_Name": "stdClass"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "enabled",
                                                "greeting",
                                                "digits",
                                                "back_label",
                                                "handover_message",
                                                "choices"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/profile": {
            "get": {
                "operationId": "profile.show",
                "description": "Its `name` and `picture_url` as WhatsApp shows them. See\n[Linking an instance](\/docs\/guides\/instances).",
                "summary": "Get an instance's profile",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "name": {
                                                    "type": "string"
                                                },
                                                "picture_url": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "name",
                                                "picture_url"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "patch": {
                "operationId": "profile.update",
                "description": "Any of `name` (up to 25 characters), `about` (up to 139) and `picture`\n(a JPEG or PNG by `url`, or base64 `data`; null removes it). See\n[Linking an instance](\/docs\/guides\/instances).",
                "summary": "Change an instance's profile",
                "tags": [
                    "Instances"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 25
                                    },
                                    "about": {
                                        "type": "string",
                                        "maxLength": 139
                                    },
                                    "picture": {
                                        "type": "object",
                                        "properties": {
                                            "url": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "format": "uri"
                                            },
                                            "data": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ]
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "picture_url": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "picture_url"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "picture_url": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "picture_url"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/messages": {
            "get": {
                "operationId": "messages.index",
                "description": "Newest first, 50 a page (up to 100 with `limit`); follow `links.next`\nfor older ones. Filter by `instance_id`, the person's `phone` or a\n`chat_id` (a group's too), `direction` (`in` or `out`), `status`, and\n`since` and `until`. `written_at` is WhatsApp's own time for a message\nreceived or typed on the phone. Messages are kept 30 days. See\n[Sending messages](\/docs\/guides\/sending#after-it-is-sent).",
                "summary": "List messages",
                "tags": [
                    "Messages"
                ],
                "parameters": [
                    {
                        "name": "instance_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "phone",
                        "in": "query",
                        "description": "The person's number in international format, like 201012345678.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "pattern": "^\\+?[1-9][0-9]{6,14}$"
                        }
                    },
                    {
                        "name": "chat_id",
                        "in": "query",
                        "description": "Instead of `phone`: one chat, as a message's `chat_id` gives it: a person's (\"\u2026@c.us\", \"\u2026@lid\"), a group's (\"\u2026@g.us\") or a channel's (\"\u2026@newsletter\").",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "pattern": "^([1-9][0-9]{6,14}@(c\\.us|s\\.whatsapp\\.net)|[0-9-]+@(g\\.us|newsletter)|[0-9]+@lid)$",
                            "maxLength": 100
                        }
                    },
                    {
                        "name": "direction",
                        "in": "query",
                        "schema": {
                            "anyOf": [
                                {
                                    "$ref": "#\/components\/schemas\/MessageDirection"
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "One status, like `failed` for those that did not go.\n| |\n|---|\n| `scheduled` <br\/> Waiting for its `send_at`, then queued. |\n| `queued` <br\/>  |\n| `sent` <br\/>  |\n| `delivered` <br\/>  |\n| `read` <br\/>  |\n| `failed` <br\/>  |\n| `received` <br\/>  |",
                        "schema": {
                            "anyOf": [
                                {
                                    "$ref": "#\/components\/schemas\/MessageStatus"
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    },
                    {
                        "name": "since",
                        "in": "query",
                        "description": "Made at or after this time: ISO 8601, like 2026-10-19T00:00:00+03:00.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "until",
                        "in": "query",
                        "description": "Made before this time.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "description": "Where the next page starts: the `cursor` of `links.next`, as it is.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `MessageResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/MessageResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "The \"cursor\" that points to the next set of items."
                                                },
                                                "prev_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "The \"cursor\" that points to the previous set of items."
                                                }
                                            },
                                            "required": [
                                                "path",
                                                "per_page",
                                                "next_cursor",
                                                "prev_cursor"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "messages.store",
                "description": "Send `text`, a file in `media`, a `location`, a `contact` card, a\n`sticker` or a `poll`, to `to` or to a `chat_id`: the one a message\nyou received came with (a person's \"\u2026@c.us\" is taken as that phone),\nor a group's or channel's. In a group, `mentions` mentions people.\nAnswers 202 with status \"queued\" (or \"scheduled\" with `send_at`);\nupdates arrive as message.status webhooks. A retry with an\n`Idempotency-Key` answers 200 with the first message and the header\n`Idempotent-Replayed: true`. See [Sending messages](\/docs\/guides\/sending).",
                "summary": "Send a message",
                "tags": [
                    "Messages"
                ],
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "description": "Any unique string of yours, up to 255 characters, such as your own message id; case counts. A retry with the same key on the same instance returns the first message instead of sending a second, with the header `Idempotent-Replayed: true`. The first request wins, whatever the retry's body.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "instance_id": {
                                        "type": "string"
                                    },
                                    "to": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "The phone in international format, no leading 0, like 201012345678. A \"+\", a leading 00, spaces, dashes and brackets are fine: \"+20 101 234 5678\" is the same number.",
                                        "pattern": "^\\+?[1-9][0-9]{6,14}$"
                                    },
                                    "chat_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Instead of `to`: the chat_id of a message you received (\"201012345678@c.us\" is taken as that phone; \"\u2026@lid\" when it came without one), or a group's (\"\u2026@g.us\") or channel's (\"\u2026@newsletter\").",
                                        "pattern": "^([1-9][0-9]{6,14}@(c\\.us|s\\.whatsapp\\.net)|[0-9-]+@(g\\.us|newsletter)|[0-9]+@lid)$",
                                        "maxLength": 100
                                    },
                                    "text": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 4096
                                    },
                                    "link_preview": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ],
                                        "description": "Whether to show a preview of the first link in the text (on by default)."
                                    },
                                    "media": {
                                        "type": "object",
                                        "properties": {
                                            "url": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "format": "uri",
                                                "description": "The file's address, at most 2,048 characters.",
                                                "maxLength": 2048
                                            },
                                            "data": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ]
                                            },
                                            "mimetype": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "Optional: worked out from the file itself, else from its name or address.",
                                                "maxLength": 100
                                            },
                                            "filename": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The name the file is shown with. A \"\/\" or \"\\\" in it becomes \"-\".",
                                                "maxLength": 255
                                            }
                                        }
                                    },
                                    "reply_to": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "The id of a message in this chat to quote, like a reply in the app."
                                    },
                                    "location": {
                                        "type": "object",
                                        "description": "A place, instead of text or a file.",
                                        "properties": {
                                            "latitude": {
                                                "type": "number",
                                                "minimum": -90,
                                                "maximum": 90
                                            },
                                            "longitude": {
                                                "type": "number",
                                                "minimum": -180,
                                                "maximum": 180
                                            },
                                            "title": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "What the place is, like \"Our office\".",
                                                "maxLength": 255
                                            }
                                        }
                                    },
                                    "contact": {
                                        "type": "object",
                                        "description": "A contact card, instead of text or a file.",
                                        "properties": {
                                            "name": {
                                                "type": "string",
                                                "description": "One line each: a line break would add fields to the card.",
                                                "maxLength": 100
                                            },
                                            "phone": {
                                                "type": "string",
                                                "description": "In international format, like 201012345678.",
                                                "pattern": "^\\+?[1-9][0-9]{6,14}$"
                                            },
                                            "organization": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "maxLength": 100
                                            }
                                        }
                                    },
                                    "sticker": {
                                        "type": "object",
                                        "description": "A sticker, instead of text or a file: a WebP image, by url or as base64 data.",
                                        "properties": {
                                            "url": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "format": "uri",
                                                "maxLength": 2048
                                            },
                                            "data": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ]
                                            }
                                        }
                                    },
                                    "poll": {
                                        "type": "object",
                                        "description": "A poll, instead of text: a question and 2 to 12 answers.",
                                        "properties": {
                                            "name": {
                                                "type": "string",
                                                "maxLength": 255
                                            },
                                            "options": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "maxLength": 100
                                                },
                                                "minItems": 2,
                                                "maxItems": 12,
                                                "uniqueItems": true
                                            },
                                            "multiple_answers": {
                                                "type": [
                                                    "boolean",
                                                    "null"
                                                ],
                                                "description": "Whether a person may choose more than one answer (one by default)."
                                            }
                                        }
                                    },
                                    "mentions": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "description": "In a group, with `text`: the people to mention, by phone (at most 50). Each \"@number\" missing from the text is added at its start.",
                                        "items": {
                                            "type": "string",
                                            "pattern": "^\\+?[1-9][0-9]{6,14}$"
                                        },
                                        "maxItems": 50
                                    },
                                    "send_at": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date-time",
                                        "description": "Send it later: ISO 8601 with its offset, like 2026-10-01T09:00:00+03:00, up to 14 days ahead."
                                    }
                                },
                                "required": [
                                    "instance_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "`MessageResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/MessageResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "`MessageResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/MessageResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/messages\/{message}": {
            "get": {
                "operationId": "messages.show",
                "description": "One you sent or received, with its `status`. A failed message says why\nin `error`. See [Sending messages](\/docs\/guides\/sending).",
                "summary": "Get a message",
                "tags": [
                    "Messages"
                ],
                "parameters": [
                    {
                        "name": "message",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`MessageResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/MessageResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "messages.destroy",
                "description": "A message not sent yet is cancelled: a scheduled one is removed (204),\na queued one becomes `failed` (200). A sent one is deleted for everyone\nin the chat, within 48 hours (202). See [Sending messages](\/docs\/guides\/sending).",
                "summary": "Cancel or delete a message",
                "tags": [
                    "Messages"
                ],
                "parameters": [
                    {
                        "name": "message",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "`MessageResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/MessageResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "`MessageResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/MessageResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "204": {
                        "description": "No content"
                    },
                    "409": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "patch": {
                "operationId": "messages.update",
                "description": "Changes the `text` of a text message the instance sent, within 15\nminutes, as WhatsApp allows. Answers 202; a message.edited webhook\nfollows. See [Sending messages](\/docs\/guides\/sending).",
                "summary": "Edit a message",
                "tags": [
                    "Messages"
                ],
                "parameters": [
                    {
                        "name": "message",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "text": {
                                        "type": "string",
                                        "maxLength": 4096
                                    }
                                },
                                "required": [
                                    "text"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "`MessageResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/MessageResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/messages\/{message}\/forward": {
            "post": {
                "operationId": "messages.forward",
                "description": "Forwards a message of one of the instance's chats into another of its\nchats, marked \"Forwarded\" as in the app: to someone who has written to\nthe instance (`to` or `chat_id`), or a group it is in. One chat a call,\na message to at most 5 chats a day, sent like any message. Answers 202\nwith the new message. See [Sending messages](\/docs\/guides\/sending#forward-a-message).",
                "summary": "Forward a message",
                "tags": [
                    "Messages"
                ],
                "parameters": [
                    {
                        "name": "message",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "description": "Any unique string of yours, up to 255 characters. A retry with the same key on the same instance returns the first forward instead of sending a second, with the header `Idempotent-Replayed: true`.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "to": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "The person, in international format, like 201012345678; someone who has written to the instance.",
                                        "pattern": "^\\+?[1-9][0-9]{6,14}$"
                                    },
                                    "chat_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Instead of `to`: a person's chat_id from a message they sent (\"\u2026@c.us\" or \"\u2026@lid\"), or a group's (\"\u2026@g.us\").",
                                        "pattern": "^([1-9][0-9]{6,14}@(c\\.us|s\\.whatsapp\\.net)|[0-9-]+@g\\.us|[0-9]+@lid)$",
                                        "maxLength": 100
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "`MessageResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/MessageResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "`MessageResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/MessageResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "An error\n\nAn error\n\nAn error\n\nAn error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview."
                                                },
                                                "code": {
                                                    "$ref": "#\/components\/schemas\/ApiError"
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "code"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "An OTP code, or a message that completed one, cannot be forwarded."
                                                    ]
                                                },
                                                "code": {
                                                    "$ref": "#\/components\/schemas\/ApiError"
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "code"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "Only a text, a photo, a video, a voice note, a document or a sticker this instance sent or received on WhatsApp can be forwarded."
                                                    ]
                                                },
                                                "code": {
                                                    "$ref": "#\/components\/schemas\/ApiError"
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "code"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "A message can be forwarded only to someone who has written to this instance, or to a group it is in."
                                                    ]
                                                },
                                                "code": {
                                                    "$ref": "#\/components\/schemas\/ApiError"
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "code"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/messages\/{message}\/reaction": {
            "post": {
                "operationId": "messages.react",
                "description": "Puts an `emoji` on a message someone sent you, as in the app; an empty\none takes the reaction back. Answers 202. See\n[Sending messages](\/docs\/guides\/sending).",
                "summary": "React to a message",
                "tags": [
                    "Messages"
                ],
                "parameters": [
                    {
                        "name": "message",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "emoji": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "One emoji, like \ud83d\udc4d; empty to take the reaction back.",
                                        "maxLength": 32
                                    }
                                },
                                "required": [
                                    "emoji"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "`MessageResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/MessageResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/messages\/{message}\/read": {
            "post": {
                "operationId": "messages.read",
                "description": "Marks the chat of a message someone sent you as read on WhatsApp:\nthey see blue ticks. Answers 202. See [Sending messages](\/docs\/guides\/sending).",
                "summary": "Mark a chat as read",
                "tags": [
                    "Messages"
                ],
                "parameters": [
                    {
                        "name": "message",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "`MessageResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/MessageResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/chats": {
            "get": {
                "operationId": "chats.index",
                "description": "One per person per instance, newest first, with the latest message and\n`waiting_for_reply`. 50 a page; follow `links.next`. See\n[Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "List your chats",
                "tags": [
                    "Chats and contacts"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "instance_id",
                        "in": "query",
                        "description": "Only this instance's chats.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "waiting",
                        "in": "query",
                        "description": "Only chats waiting for your reply.",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "instance_id": {
                                                        "type": "string"
                                                    },
                                                    "chat_id": {
                                                        "type": "string"
                                                    },
                                                    "phone": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "contact_name": {
                                                        "type": "string"
                                                    },
                                                    "waiting_for_reply": {
                                                        "type": "boolean"
                                                    },
                                                    "last_message": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "string"
                                                            },
                                                            "instance_id": {
                                                                "type": "string"
                                                            },
                                                            "direction": {
                                                                "$ref": "#\/components\/schemas\/MessageDirection"
                                                            },
                                                            "origin": {
                                                                "type": "string"
                                                            },
                                                            "chat_id": {
                                                                "type": "string"
                                                            },
                                                            "phone": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "participant": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ],
                                                                "description": "In a group: who wrote it. The chat is the group."
                                                            },
                                                            "contact_name": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "type": {
                                                                "$ref": "#\/components\/schemas\/MessageType"
                                                            },
                                                            "body": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "location": {
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "additionalProperties": {
                                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                                }
                                                            },
                                                            "contact": {
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "additionalProperties": {
                                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                                }
                                                            },
                                                            "poll": {
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "properties": {
                                                                    "name": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "options": {
                                                                        "anyOf": [
                                                                            {
                                                                                "type": "string"
                                                                            },
                                                                            {
                                                                                "type": "array",
                                                                                "items": {
                                                                                    "type": "string"
                                                                                },
                                                                                "minItems": 0,
                                                                                "maxItems": 0
                                                                            }
                                                                        ]
                                                                    },
                                                                    "multiple_answers": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "results": {
                                                                        "type": "array",
                                                                        "items": {
                                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                                        }
                                                                    },
                                                                    "votes": {
                                                                        "type": "array",
                                                                        "items": {
                                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                                        }
                                                                    }
                                                                },
                                                                "required": [
                                                                    "name",
                                                                    "options",
                                                                    "multiple_answers",
                                                                    "results",
                                                                    "votes"
                                                                ]
                                                            },
                                                            "forwarded_from": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ],
                                                                "description": "The message it forwards, when it is a forward."
                                                            },
                                                            "mentions": {
                                                                "type": [
                                                                    "array",
                                                                    "null"
                                                                ],
                                                                "description": "The people a message sent to a group mentions, by phone.",
                                                                "items": {
                                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                                }
                                                            },
                                                            "order": {
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "description": "From the business's WhatsApp catalog: an order sent from the cart, or a shared product.",
                                                                "additionalProperties": {
                                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                                }
                                                            },
                                                            "reply_to": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "reaction": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "reactions": {
                                                                "type": "array",
                                                                "description": "What the people in the chat reacted with, newest last.",
                                                                "items": {
                                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                                }
                                                            },
                                                            "media": {
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "properties": {
                                                                    "url": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "mimetype": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "filename": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    }
                                                                },
                                                                "required": [
                                                                    "url",
                                                                    "mimetype",
                                                                    "filename"
                                                                ]
                                                            },
                                                            "status": {
                                                                "$ref": "#\/components\/schemas\/MessageStatus"
                                                            },
                                                            "error": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "error_code": {
                                                                "anyOf": [
                                                                    {
                                                                        "description": "What `error` says, as a value code can act on; on a queued\nmessage, what it is waiting for. Null on a message that failed\nbefore codes were kept.\n| |\n|---|\n| `instance_not_connected` <br\/>  |\n| `instance_stopped` <br\/>  |\n| `instance_reconnecting` <br\/>  |\n| `number_on_another_instance` <br\/>  |\n| `account_suspended` <br\/>  |\n| `phone_changed` <br\/>  |\n| `opted_out` <br\/>  |\n| `opt_out_unconfirmed` <br\/>  |\n| `not_on_whatsapp` <br\/>  |\n| `no_number` <br\/>  |\n| `quiet_hours` <br\/>  |\n| `pacing` <br\/>  |\n| `earlier_message_waiting` <br\/>  |\n| `per_minute_limit` <br\/>  |\n| `per_person_limit` <br\/>  |\n| `per_group_limit` <br\/>  |\n| `daily_new_people_limit` <br\/>  |\n| `daily_lookup_limit` <br\/>  |\n| `daily_volume_limit` <br\/>  |\n| `daily_group_limit` <br\/>  |\n| `daily_channel_limit` <br\/>  |\n| `unanswered_follow_ups` <br\/>  |\n| `not_answered_yet` <br\/>  |\n| `first_message_type` <br\/>  |\n| `first_message_too_long` <br\/>  |\n| `insecure_link` <br\/>  |\n| `link_only` <br\/>  |\n| `same_first_message` <br\/>  |\n| `new_chats_paused` <br\/>  |\n| `few_replies` <br\/>  |\n| `whatsapp_restricted` <br\/>  |\n| `whatsapp_quota` <br\/>  |\n| `whatsapp_refused` <br\/>  |\n| `whatsapp_unreachable` <br\/>  |\n| `may_have_been_delivered` <br\/>  |\n| `file_unavailable` <br\/>  |\n| `file_missing` <br\/>  |\n| `invalid_sticker` <br\/>  |\n| `file_too_large` <br\/> On a received message, which stays received: its file was too large to keep. |\n| `otp_too_late` <br\/>  |\n| `otp_ended` <br\/>  |\n| `broadcast_stopped` <br\/>  |\n| `warmup_stopped` <br\/>  |\n| `cancelled` <br\/>  |\n| `not_queued` <br\/>  |",
                                                                        "$ref": "#\/components\/schemas\/MessageError"
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "send_at": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "created_at": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "written_at": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ],
                                                                "description": "By WhatsApp's own clock, for a message received or typed on the\nphone: created_at is when we stored it, which is later."
                                                            },
                                                            "sent_at": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "delivered_at": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "read_at": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "edited_at": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "deleted_at": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ],
                                                                "description": "Deleted for everyone on WhatsApp: its text and file are gone."
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "instance_id",
                                                            "direction",
                                                            "origin",
                                                            "chat_id",
                                                            "phone",
                                                            "participant",
                                                            "contact_name",
                                                            "type",
                                                            "body",
                                                            "location",
                                                            "contact",
                                                            "poll",
                                                            "forwarded_from",
                                                            "mentions",
                                                            "order",
                                                            "reply_to",
                                                            "reaction",
                                                            "reactions",
                                                            "media",
                                                            "status",
                                                            "error",
                                                            "error_code",
                                                            "send_at",
                                                            "created_at",
                                                            "written_at",
                                                            "sent_at",
                                                            "delivered_at",
                                                            "read_at",
                                                            "edited_at",
                                                            "deleted_at"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "instance_id",
                                                    "chat_id",
                                                    "phone",
                                                    "contact_name",
                                                    "waiting_for_reply",
                                                    "last_message"
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "next"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/contacts": {
            "get": {
                "operationId": "contacts.index",
                "description": "The WhatsApp contacts on the linked phone, 100 a page (`offset` for\nmore), each with `phone`, `name` and `push_name`. See\n[Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "List an instance's contacts",
                "tags": [
                    "Chats and contacts"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "How many, up to 500.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "How many to skip.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "chat_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "phone": {
                                                        "type": [
                                                            "string",
                                                            "object",
                                                            "null"
                                                        ]
                                                    },
                                                    "name": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "push_name": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "chat_id",
                                                    "phone",
                                                    "name",
                                                    "push_name"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/contacts\/{phone}": {
            "get": {
                "operationId": "contacts.show",
                "description": "Someone the instance knows (a contact on the phone, or someone it has\na chat with): `name`, `push_name` and `picture_url`. Anyone else is\n404. See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Get a contact",
                "tags": [
                    "Chats and contacts"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "phone",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "chat_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "phone": {
                                                    "type": [
                                                        "string",
                                                        "object",
                                                        "null"
                                                    ]
                                                },
                                                "name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "push_name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "picture_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "chat_id",
                                                "phone",
                                                "name",
                                                "push_name",
                                                "picture_url"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/chats\/{phone}\/archive": {
            "post": {
                "operationId": "chats.archive",
                "description": "The WhatsApp engine Threadwire runs cannot archive chats, so this answers `501` with the code `not_supported` at once, and is removed on 22 January 2027 (see the [changelog](\/docs\/guides\/changelog)). Marking a chat unread still works.",
                "summary": "Archive a chat (not available)",
                "deprecated": true,
                "tags": [
                    "Chats and contacts"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "phone",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "501": {
                        "description": "Not available: `code` is `not_supported`.",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/chats\/{phone}\/unarchive": {
            "post": {
                "operationId": "chats.unarchive",
                "description": "The WhatsApp engine Threadwire runs cannot unarchive chats, so this answers `501` with the code `not_supported` at once, and is removed on 22 January 2027 (see the [changelog](\/docs\/guides\/changelog)). Marking a chat unread still works.",
                "summary": "Unarchive a chat (not available)",
                "deprecated": true,
                "tags": [
                    "Chats and contacts"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "phone",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "501": {
                        "description": "Not available: `code` is `not_supported`.",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/chats\/{phone}\/unread": {
            "post": {
                "operationId": "chats.unread",
                "description": "As in the app, so your team sees it again on the phone. Answers 204.\nSee [Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Mark a chat unread",
                "tags": [
                    "Chats and contacts"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "phone",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/chats\/{phone}\/typing": {
            "post": {
                "operationId": "chats.typing",
                "description": "\"typing\u2026\" (or \"recording\u2026\" for a voice note) under the business's name\nin the person's chat, as in the app, while your system prepares an\nanswer: for `seconds` (1 to 20, 5 by default), or until you send the\nmessage or `paused`. Only in a chat the instance already has. Answers\n204. See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups#show-typing).",
                "summary": "Show typing in a chat",
                "tags": [
                    "Chats and contacts"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "phone",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "state": {
                                        "type": "string",
                                        "description": "`typing` (the default), `recording` (as before a voice note) or `paused` (stops either now).",
                                        "examples": [
                                            "typing"
                                        ]
                                    },
                                    "seconds": {
                                        "type": "integer",
                                        "description": "How long it shows, 1 to 20 (5 by default). Sending a message ends it sooner.",
                                        "examples": [
                                            5
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "409": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "This person asked not to be messaged (they wrote \"STOP\" or similar), and \"typing\u2026\" reaches them like a message. Nothing goes to them until they write to you again."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/chats\/{phone}\/history": {
            "get": {
                "operationId": "chats.history",
                "description": "The messages WhatsApp keeps for this one-to-one chat on the linked\nphone, those typed on the phone included. Newest first, `limit` a page\n(`offset` for older ones); files are not included. See\n[Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Get a chat's history",
                "tags": [
                    "Chats and contacts"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "phone",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "How many, 1 to 100 (50 by default).",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "How many of the newest to skip, for older ones.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "message_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "from_me": {
                                                        "type": "boolean"
                                                    },
                                                    "body": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "description": "OTP codes are masked, and a message deleted\nfor everyone has no text."
                                                    },
                                                    "has_media": {
                                                        "type": "boolean"
                                                    },
                                                    "sent_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "message_id",
                                                    "from_me",
                                                    "body",
                                                    "has_media",
                                                    "sent_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Too many chat history pages on this instance in the last minute (at most 30). Try again shortly."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/otps": {
            "post": {
                "operationId": "otps.store",
                "description": "Proves that a person holds a WhatsApp number. With `channel: \"link\"`\n(recommended) they send a code to your instance: answers 201 with the\n`code`, a `link` and a `qr`. With `channel: \"code\"` your instance\nsends `phone` a code to check (202). See [WhatsApp OTP](\/docs\/guides\/otp).",
                "summary": "Start an OTP",
                "tags": [
                    "WhatsApp OTP"
                ],
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "description": "Any unique string of yours, up to 255 characters; case counts. A retry with the same key on the same instance returns the first OTP, without its code, instead of starting a second, with the header `Idempotent-Replayed: true`. The first request wins, whatever the retry's body.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "instance_id": {
                                        "type": "string"
                                    },
                                    "channel": {
                                        "type": "string",
                                        "description": "\"link\": the person sends the code to your instance. \"code\": your instance sends it to them.",
                                        "enum": [
                                            "link",
                                            "code"
                                        ]
                                    },
                                    "phone": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "In international format, like 201012345678. Required for \"code\"; for \"link\", only this phone may complete it.",
                                        "pattern": "^\\+?[1-9][0-9]{6,14}$"
                                    },
                                    "code_length": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "description": "Digits in the code (channel \"code\"), 4 to 8; 6 by default.",
                                        "minimum": 4,
                                        "maximum": 8
                                    },
                                    "expires_in": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "description": "Minutes the code lives, 1 to 30; 10 by default.",
                                        "minimum": 1,
                                        "maximum": 30
                                    },
                                    "reference": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Your own id for it, returned with it and in its webhooks.",
                                        "maxLength": 255
                                    },
                                    "locale": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "The language of the message, the link's text and the confirmation: \"en\" or \"ar\".",
                                        "enum": [
                                            "en",
                                            "ar",
                                            null
                                        ]
                                    },
                                    "brand": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Your app's name, shown in the code's message and the link's text.",
                                        "pattern": "^\\pL[\\pL\\pM &'\u2019.\\-]*$",
                                        "maxLength": 30
                                    }
                                },
                                "required": [
                                    "instance_id",
                                    "channel"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "instance_id": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "channel": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "status": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "phone": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "verified_phone": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "reference": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "locale": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "attempts_left": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "sends": {
                                                    "anyOf": [
                                                        {
                                                            "type": "integer"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "message_id": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "failed_reason": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "expires_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "verified_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "created_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "instance_id",
                                                "channel",
                                                "status",
                                                "phone",
                                                "verified_phone",
                                                "reference",
                                                "locale",
                                                "attempts_left",
                                                "sends",
                                                "message_id",
                                                "failed_reason",
                                                "expires_at",
                                                "verified_at",
                                                "created_at"
                                            ],
                                            "additionalProperties": {
                                                "__PHP_Incomplete_Class_Name": "stdClass"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "instance_id": {
                                                    "type": "string"
                                                },
                                                "channel": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "phone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "verified_phone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "reference": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "locale": {
                                                    "type": "string"
                                                },
                                                "attempts_left": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "sends": {
                                                    "type": "integer"
                                                },
                                                "message_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "failed_reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "expires_at": {
                                                    "type": "string"
                                                },
                                                "verified_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "code": {
                                                    "type": "string"
                                                },
                                                "link": {
                                                    "type": "string"
                                                },
                                                "qr": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "instance_id",
                                                "channel",
                                                "status",
                                                "phone",
                                                "verified_phone",
                                                "reference",
                                                "locale",
                                                "attempts_left",
                                                "sends",
                                                "message_id",
                                                "failed_reason",
                                                "expires_at",
                                                "verified_at",
                                                "created_at",
                                                "code",
                                                "link",
                                                "qr"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Too many OTPs started this minute. Try again shortly."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/otps\/{otp}": {
            "get": {
                "operationId": "otps.show",
                "description": "Its `status` (`pending`, `verified`, `failed`, `expired` or\n`cancelled`), `verified_phone` once verified, your `reference` and\n`attempts_left`. Never the code. See [WhatsApp OTP](\/docs\/guides\/otp).",
                "summary": "Get an OTP",
                "tags": [
                    "WhatsApp OTP"
                ],
                "parameters": [
                    {
                        "name": "otp",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "instance_id": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "channel": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "status": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "phone": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "verified_phone": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "reference": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "locale": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "attempts_left": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "sends": {
                                                    "anyOf": [
                                                        {
                                                            "type": "integer"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "message_id": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "failed_reason": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "expires_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "verified_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "created_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "instance_id",
                                                "channel",
                                                "status",
                                                "phone",
                                                "verified_phone",
                                                "reference",
                                                "locale",
                                                "attempts_left",
                                                "sends",
                                                "message_id",
                                                "failed_reason",
                                                "expires_at",
                                                "verified_at",
                                                "created_at"
                                            ],
                                            "additionalProperties": {
                                                "__PHP_Incomplete_Class_Name": "stdClass"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "otps.destroy",
                "description": "While pending: it becomes `cancelled`, and a code not sent yet is not\nsent. Otherwise 409. See [WhatsApp OTP](\/docs\/guides\/otp).",
                "summary": "Cancel an OTP",
                "tags": [
                    "WhatsApp OTP"
                ],
                "parameters": [
                    {
                        "name": "otp",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "instance_id": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "channel": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "status": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "phone": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "verified_phone": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "reference": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "locale": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "attempts_left": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "sends": {
                                                    "anyOf": [
                                                        {
                                                            "type": "integer"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "message_id": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "failed_reason": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "expires_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "verified_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "created_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "instance_id",
                                                "channel",
                                                "status",
                                                "phone",
                                                "verified_phone",
                                                "reference",
                                                "locale",
                                                "attempts_left",
                                                "sends",
                                                "message_id",
                                                "failed_reason",
                                                "expires_at",
                                                "verified_at",
                                                "created_at"
                                            ],
                                            "additionalProperties": {
                                                "__PHP_Incomplete_Class_Name": "stdClass"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "This OTP is no longer pending."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/otps\/{otp}\/check": {
            "post": {
                "operationId": "otps.check",
                "description": "For `channel: \"code\"`: the `code` the person typed. Right: 200 with\n`status: \"verified\"`. Wrong: 422 with `attempts_left`. See\n[WhatsApp OTP](\/docs\/guides\/otp).",
                "summary": "Check a code",
                "tags": [
                    "WhatsApp OTP"
                ],
                "parameters": [
                    {
                        "name": "otp",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "code": {
                                        "type": "string",
                                        "maxLength": 32
                                    }
                                },
                                "required": [
                                    "code"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "instance_id": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "channel": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "status": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "phone": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "verified_phone": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "reference": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "locale": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "attempts_left": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "sends": {
                                                    "anyOf": [
                                                        {
                                                            "type": "integer"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "message_id": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "failed_reason": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "expires_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "verified_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                },
                                                "created_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        {
                                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "instance_id",
                                                "channel",
                                                "status",
                                                "phone",
                                                "verified_phone",
                                                "reference",
                                                "locale",
                                                "attempts_left",
                                                "sends",
                                                "message_id",
                                                "failed_reason",
                                                "expires_at",
                                                "verified_at",
                                                "created_at"
                                            ],
                                            "additionalProperties": {
                                                "__PHP_Incomplete_Class_Name": "stdClass"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/otps\/{otp}\/resend": {
            "post": {
                "operationId": "otps.resend",
                "description": "For `channel: \"code\"`, while pending: a new code goes, the earlier one\nstops working, and the OTP lives `expires_in` minutes from\nnow. Answers 202. See [WhatsApp OTP](\/docs\/guides\/otp).",
                "summary": "Send a new code",
                "tags": [
                    "WhatsApp OTP"
                ],
                "parameters": [
                    {
                        "name": "otp",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "An error\n\nAn error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "This OTP has sent its 5 codes. Start a new one."
                                                    ]
                                                },
                                                "code": {
                                                    "$ref": "#\/components\/schemas\/ApiError"
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "code"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "The last code is still on its way. Wait for it to go out or fail."
                                                    ]
                                                },
                                                "code": {
                                                    "$ref": "#\/components\/schemas\/ApiError"
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "code"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/broadcasts": {
            "get": {
                "operationId": "broadcasts.index",
                "description": "Newest first, 20 a page, each with its `progress`. Filter by\n`instance_id` or `status`. See [Broadcasts](\/docs\/guides\/broadcasts).",
                "summary": "List broadcasts",
                "tags": [
                    "Broadcasts"
                ],
                "parameters": [
                    {
                        "name": "instance_id",
                        "in": "query",
                        "description": "Only this instance's broadcasts.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Only broadcasts in this status: draft, scheduled, running, paused, completed or cancelled.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `BroadcastResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/BroadcastResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "broadcasts.store",
                "description": "Sends `text` to everyone in an `audience` who opted in: people who\nwrote to the instance (`recent`, or a chat `label`), or a list of\n`recipients` filtered to them. Each gets their own message, one at a\ntime, `interval_seconds` apart, in daytime, with an opt-out line, and\nit pauses itself if the instance is at risk. Answers 201; a retry with\nits `Idempotency-Key` answers 200 with the first broadcast and the\nheader `Idempotent-Replayed: true`. See [Broadcasts](\/docs\/guides\/broadcasts).",
                "summary": "Start a broadcast",
                "tags": [
                    "Broadcasts"
                ],
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "description": "Any unique string of yours, up to 255 characters; case counts. A retry with the same key on the same instance returns the first broadcast instead of starting a second, with the header `Idempotent-Replayed: true`. The first request wins, whatever the retry's body.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "instance_id": {
                                        "type": "string"
                                    },
                                    "name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Your own name for it, shown in your panel.",
                                        "maxLength": 100
                                    },
                                    "text": {
                                        "type": "string",
                                        "description": "The message, with placeholders: {name} (their name), {phone}, and any field of your recipients, like {city}; {name|there} gives words for when it is empty.",
                                        "maxLength": 1000
                                    },
                                    "language": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "The opt-out line's language, added to every message: \"en\" or \"ar\".",
                                        "enum": [
                                            "en",
                                            "ar",
                                            null
                                        ]
                                    },
                                    "audience": {
                                        "type": "string",
                                        "description": "recent: everyone who wrote within `days`; label: the chats with your chat label `label_id`; phones: your `recipients`, filtered to those who wrote (or saved contacts, with include_saved_contacts).",
                                        "enum": [
                                            "recent",
                                            "label",
                                            "phones"
                                        ]
                                    },
                                    "days": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "description": "For recent: who wrote in the last this many days (30 by default; messages are kept 30 days).",
                                        "minimum": 1,
                                        "maximum": 30
                                    },
                                    "label_id": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "description": "For label: the id of one of your chat labels (the inbox's, in your panel)."
                                    },
                                    "recipients": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "description": "For phones: each person's phone in international format, an optional name for {name}, and optional fields for their own placeholders.",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "phone": {
                                                    "type": "string",
                                                    "maxLength": 32
                                                },
                                                "name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "maxLength": 100
                                                },
                                                "fields": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "maxLength": 100
                                                    },
                                                    "maxItems": 10
                                                }
                                            },
                                            "required": [
                                                "phone"
                                            ]
                                        },
                                        "maxItems": 5000
                                    },
                                    "include_saved_contacts": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ],
                                        "description": "For phones: also saved contacts on the phone who never wrote. They count as new chats, with all their limits; the text needs a placeholder."
                                    },
                                    "media": {
                                        "type": "object",
                                        "description": "One image, video or document with the text as its caption, by url or as base64 data.",
                                        "properties": {
                                            "url": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "format": "uri",
                                                "maxLength": 2048
                                            },
                                            "data": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ]
                                            },
                                            "mimetype": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "Optional: worked out from the file itself, else from its name or address, as for a message.",
                                                "maxLength": 100
                                            },
                                            "filename": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "maxLength": 255
                                            }
                                        }
                                    },
                                    "interval_seconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "description": "Seconds between two messages, varied a little; never fewer than the safe minimum.",
                                        "minimum": 20,
                                        "maximum": 600
                                    },
                                    "per_day": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "description": "Most messages it sends a day; the rest wait for the next day.",
                                        "minimum": 1,
                                        "maximum": 1000
                                    },
                                    "start_at": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date-time",
                                        "description": "Start later: ISO 8601 with its offset, up to 14 days ahead."
                                    }
                                },
                                "required": [
                                    "instance_id",
                                    "text",
                                    "audience"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`BroadcastResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/BroadcastResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "`BroadcastResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/BroadcastResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/broadcasts\/{broadcast}": {
            "get": {
                "operationId": "broadcasts.show",
                "description": "Its `status`, the `reason` when paused, and its `progress`: people\nstill to go, passed over, and how their messages went. See\n[Broadcasts](\/docs\/guides\/broadcasts).",
                "summary": "Get a broadcast",
                "tags": [
                    "Broadcasts"
                ],
                "parameters": [
                    {
                        "name": "broadcast",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`BroadcastResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/BroadcastResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "broadcasts.destroy",
                "description": "Nobody else gets it; a message still waiting is cancelled too. What\nwent stays sent. See [Broadcasts](\/docs\/guides\/broadcasts).",
                "summary": "Cancel a broadcast",
                "tags": [
                    "Broadcasts"
                ],
                "parameters": [
                    {
                        "name": "broadcast",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`BroadcastResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/BroadcastResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/broadcasts\/{broadcast}\/pause": {
            "post": {
                "operationId": "broadcasts.pause",
                "description": "Nothing more goes until it is resumed. A message already on its way\nis held back and goes again on resume. See [Broadcasts](\/docs\/guides\/broadcasts).",
                "summary": "Pause a broadcast",
                "tags": [
                    "Broadcasts"
                ],
                "parameters": [
                    {
                        "name": "broadcast",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`BroadcastResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/BroadcastResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Only a scheduled or running broadcast can be paused."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/broadcasts\/{broadcast}\/resume": {
            "post": {
                "operationId": "broadcasts.resume",
                "description": "Only once the reason it paused has cleared: otherwise 409 with what\nstill stops it. See [Broadcasts](\/docs\/guides\/broadcasts).",
                "summary": "Resume a broadcast",
                "tags": [
                    "Broadcasts"
                ],
                "parameters": [
                    {
                        "name": "broadcast",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`BroadcastResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/BroadcastResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/labels": {
            "get": {
                "operationId": "labels.index",
                "description": "Each with its `id`, `name`, `color` (0 to 19, WhatsApp's palette) and\n`color_hex`. Labels need the WhatsApp Business app. See\n[Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "List an instance's labels",
                "tags": [
                    "Labels"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "__PHP_Incomplete_Class_Name": "stdClass"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "labels.store",
                "description": "With a `name` and a `color` (0 to 19). Answers 201 with the label. See\n[Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Create a label",
                "tags": [
                    "Labels"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 100
                                    },
                                    "color": {
                                        "type": "integer",
                                        "description": "WhatsApp's palette, 0 to 19.",
                                        "minimum": 0,
                                        "maximum": 19
                                    }
                                },
                                "required": [
                                    "name",
                                    "color"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "color": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "color_hex": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "color",
                                                "color_hex"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/labels\/{label}": {
            "put": {
                "operationId": "labels.update",
                "description": "Send its `name` and `color`. See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Rename or recolour a label",
                "tags": [
                    "Labels"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "label",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 100
                                    },
                                    "color": {
                                        "type": "integer",
                                        "description": "WhatsApp's palette, 0 to 19.",
                                        "minimum": 0,
                                        "maximum": 19
                                    }
                                },
                                "required": [
                                    "name",
                                    "color"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "color": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "color_hex": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "color",
                                                "color_hex"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "labels.destroy",
                "description": "It comes off every chat. Answers 204. See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Delete a label",
                "tags": [
                    "Labels"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "label",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/labels\/{label}\/chats": {
            "get": {
                "operationId": "labels.chats",
                "description": "Each by its `chat_id`, with its `name`. See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "List chats with a label",
                "tags": [
                    "Labels"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "label",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "__PHP_Incomplete_Class_Name": "stdClass"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/chats\/{phone}\/labels": {
            "get": {
                "operationId": "chats.labels",
                "description": "By the person's phone or the chat's `chat_id`. See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Get a chat's labels",
                "tags": [
                    "Labels"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "phone",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "__PHP_Incomplete_Class_Name": "stdClass"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "chats.labels.set",
                "description": "The whole list, by `id`: labels left out come off the chat, and an\nempty list removes them all. Answers 204. See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Set a chat's labels",
                "tags": [
                    "Labels"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "phone",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "labels": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "maxLength": 50
                                        },
                                        "maxItems": 20,
                                        "uniqueItems": true
                                    }
                                },
                                "required": [
                                    "labels"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/statuses": {
            "get": {
                "operationId": "statuses.index",
                "description": "Newest first, from the last 30 days, at most the latest 100 (not\npaged), each with `views` and the `viewers`' phones. See\n[Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "List an instance's statuses",
                "tags": [
                    "Statuses"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "statuses.store",
                "description": "A `text`, or a file in `image`, `video` or `voice` (by `url` or base64\n`data`). `audience`, a list of phones, limits who sees it; each must\nknow the instance. Answers 202 with status \"queued\". See\n[Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Post a status",
                "tags": [
                    "Statuses"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "text": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 700
                                    },
                                    "background_color": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "pattern": "^#[0-9A-Fa-f]{6}$"
                                    },
                                    "font": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 5
                                    },
                                    "image": {
                                        "type": "object",
                                        "description": "A picture, instead of text: by `url` or as base64 `data`, one of the two.",
                                        "properties": {
                                            "url": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "format": "uri",
                                                "maxLength": 2048
                                            },
                                            "data": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ]
                                            },
                                            "mimetype": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "Its type, like image\/png (image\/jpeg when left out).",
                                                "maxLength": 100
                                            }
                                        }
                                    },
                                    "video": {
                                        "type": "object",
                                        "description": "A video, instead of text: by `url` or as base64 `data`, one of the two.",
                                        "properties": {
                                            "url": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "format": "uri",
                                                "maxLength": 2048
                                            },
                                            "data": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ]
                                            },
                                            "mimetype": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "Its type (video\/mp4 when left out).",
                                                "maxLength": 100
                                            }
                                        }
                                    },
                                    "voice": {
                                        "type": "object",
                                        "description": "A voice note, instead of text: by `url` or as base64 `data`, one of the two.",
                                        "properties": {
                                            "url": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "format": "uri",
                                                "maxLength": 2048
                                            },
                                            "data": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ]
                                            },
                                            "mimetype": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "Its type (audio\/ogg; codecs=opus when left out).",
                                                "maxLength": 100
                                            }
                                        }
                                    },
                                    "audience": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "description": "Only these people see it: phones in international format. Everyone who may, when left out.",
                                        "items": {
                                            "type": "string",
                                            "pattern": "^\\+?[1-9][0-9]{6,14}$"
                                        },
                                        "maxItems": 256
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "instance_id": {
                                                    "type": "string"
                                                },
                                                "kind": {
                                                    "type": "string"
                                                },
                                                "text": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "background_color": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "audience": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "error": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "error_code": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "The same reason as a fixed value, one of a message's error codes; null unless it failed."
                                                },
                                                "views": {
                                                    "type": "integer"
                                                },
                                                "viewers": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "posted_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "instance_id",
                                                "kind",
                                                "text",
                                                "background_color",
                                                "audience",
                                                "status",
                                                "error",
                                                "error_code",
                                                "views",
                                                "viewers",
                                                "posted_at",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "This instance is not connected."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "The file could not be stored just now. Please send it again."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/statuses\/{status}": {
            "delete": {
                "operationId": "statuses.destroy",
                "description": "It disappears for everyone who could see it. Answers 204. See\n[Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Delete a status",
                "tags": [
                    "Statuses"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "409": {
                        "description": "An error\n\nAn error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview."
                                                },
                                                "code": {
                                                    "$ref": "#\/components\/schemas\/ApiError"
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "code"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "This instance is not connected."
                                                    ]
                                                },
                                                "code": {
                                                    "$ref": "#\/components\/schemas\/ApiError"
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "code"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "WhatsApp did not take the deletion. Please try again."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/contact-fields": {
            "get": {
                "operationId": "contact-fields.index",
                "description": "The fields your team keeps about people who write to you, made on the\nChats page: each with its `key`, `name`, `kind` (text, number, date or\nlist) and a list's `options`. See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups#contact-fields).",
                "summary": "List contact fields",
                "tags": [
                    "Contact fields"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "key": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "kind": {
                                                        "type": "string"
                                                    },
                                                    "options": {
                                                        "type": [
                                                            "array",
                                                            "null"
                                                        ],
                                                        "items": {
                                                            "type": "string"
                                                        }
                                                    }
                                                },
                                                "required": [
                                                    "key",
                                                    "name",
                                                    "kind",
                                                    "options"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/chats\/{chat}\/contact-fields": {
            "get": {
                "operationId": "chats.contact-fields.show",
                "description": "What your fields say about someone who wrote to one of your instances,\nby their phone or the `chat_id` from a webhook: every field's key,\nwith null where nothing is kept. Anyone who never wrote is 404. See\n[Chats, contacts and groups](\/docs\/guides\/chats-and-groups#contact-fields).",
                "summary": "Get a person's contact fields",
                "tags": [
                    "Contact fields"
                ],
                "parameters": [
                    {
                        "name": "chat",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "phone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "chat_id": {
                                                    "type": "string"
                                                },
                                                "fields": {
                                                    "type": "string",
                                                    "description": "Every field of the account, as text; null where nothing is kept."
                                                }
                                            },
                                            "required": [
                                                "phone",
                                                "chat_id",
                                                "fields"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "chats.contact-fields.update",
                "description": "Send `fields` as key and value pairs: a key left out stays as it is,\nand null or an empty value clears it. Only for someone who wrote to\none of your instances (anyone else is 404), and only with a\nfull-access key. See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups#contact-fields).",
                "summary": "Set a person's contact fields",
                "tags": [
                    "Contact fields"
                ],
                "parameters": [
                    {
                        "name": "chat",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "fields": {
                                        "type": "object",
                                        "description": "Your fields' keys with the value for each, like {\"city\": \"Giza\", \"renewal\": \"2026-12-01\"}. A date is written YYYY-MM-DD; a list takes one of its options.",
                                        "examples": [
                                            {
                                                "city": "Giza"
                                            }
                                        ]
                                    }
                                },
                                "required": [
                                    "fields"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "phone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "chat_id": {
                                                    "type": "string"
                                                },
                                                "fields": {
                                                    "type": "string",
                                                    "description": "Every field of the account, as text; null where nothing is kept."
                                                }
                                            },
                                            "required": [
                                                "phone",
                                                "chat_id",
                                                "fields"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/groups": {
            "get": {
                "operationId": "groups.index",
                "description": "Each with its `chat_id` (for sending), `subject`, `description` and\n`size` (how many people are in it). See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "List an instance's groups",
                "tags": [
                    "Groups"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 200
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 0
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "__PHP_Incomplete_Class_Name": "stdClass"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "groups.store",
                "description": "With a `subject` and the `participants` (phones) to add, who must know\nthe instance. Answers 201 with the group. See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Create a group",
                "tags": [
                    "Groups"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subject": {
                                        "type": "string",
                                        "maxLength": 100
                                    },
                                    "participants": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "pattern": "^\\+?[1-9][0-9]{6,14}$"
                                        },
                                        "minItems": 1,
                                        "maxItems": 50,
                                        "uniqueItems": true
                                    }
                                },
                                "required": [
                                    "subject",
                                    "participants"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "chat_id": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                },
                                                "subject": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                },
                                                "description": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                },
                                                "size": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "chat_id",
                                                "subject",
                                                "description",
                                                "size"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/groups\/join": {
            "post": {
                "operationId": "groups.join",
                "description": "By its invite link or code, in `invite`. Answers 204. See\n[Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Join a group",
                "tags": [
                    "Groups"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "invite": {
                                        "type": "string",
                                        "maxLength": 200
                                    }
                                },
                                "required": [
                                    "invite"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/groups\/{group}": {
            "get": {
                "operationId": "groups.show",
                "description": "With its `participants`: each one's `id` (a private `\u2026@lid` for some),\n`phone` when WhatsApp shares it, `role` and `admin`, as `group.update`\ngives them. See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Get a group",
                "tags": [
                    "Groups"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "group",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "chat_id": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                },
                                                "subject": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                },
                                                "description": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                },
                                                "size": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "participants": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "string"
                                                            },
                                                            "phone": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "role": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "admin": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "phone",
                                                            "role",
                                                            "admin"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "chat_id",
                                                "subject",
                                                "description",
                                                "size",
                                                "participants"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "patch": {
                "operationId": "groups.update",
                "description": "Any of `subject`, `description`, `messages_admin_only` and\n`info_admin_only`. The instance must be an admin. Answers 204. See\n[Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Change a group",
                "tags": [
                    "Groups"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "group",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subject": {
                                        "type": "string",
                                        "maxLength": 100
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 2048
                                    },
                                    "messages_admin_only": {
                                        "type": "boolean"
                                    },
                                    "info_admin_only": {
                                        "type": "boolean"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/groups\/{group}\/participants": {
            "post": {
                "operationId": "groups.participants",
                "description": "`action` (`add`, `remove`, `promote` or `demote`) with the\n`participants`: phones, or the `id` a group lists (a private `\u2026@lid`\ntoo, except to add). Only people who know the instance can be added,\nand the instance must be an admin. Answers 204. See\n[Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Add, remove, promote or demote people",
                "tags": [
                    "Groups"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "group",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "action": {
                                        "type": "string",
                                        "enum": [
                                            "add",
                                            "remove",
                                            "promote",
                                            "demote"
                                        ]
                                    },
                                    "participants": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "pattern": "^(\\+?[1-9][0-9]{6,14}|[1-9][0-9]{6,14}@(c\\.us|s\\.whatsapp\\.net)|[0-9]{6,25}@lid)$"
                                        },
                                        "minItems": 1,
                                        "maxItems": 50,
                                        "uniqueItems": true
                                    }
                                },
                                "required": [
                                    "action",
                                    "participants"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/groups\/{group}\/invite": {
            "get": {
                "operationId": "groups.invite",
                "description": "The way to bring in people who never wrote to the instance: they join\nwhen they choose to. See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Get a group's invite link",
                "tags": [
                    "Groups"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "group",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "invite_link": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "invite_link"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/groups\/{group}\/invite\/revoke": {
            "post": {
                "operationId": "groups.invite.revoke",
                "description": "Answers a new invite link; the old one stops working. See\n[Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Reset a group's invite link",
                "tags": [
                    "Groups"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "group",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "invite_link": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                }
                                            },
                                            "required": [
                                                "invite_link"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/groups\/{group}\/leave": {
            "post": {
                "operationId": "groups.leave",
                "description": "Answers 204. See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Leave a group",
                "tags": [
                    "Groups"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "group",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/channels": {
            "get": {
                "operationId": "channels.index",
                "description": "Each with its `chat_id` (for posting), `name`, `description`,\n`followers`, `invite_link` and `role`; filter by `role` (owner, admin\nor subscriber). See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "List an instance's channels",
                "tags": [
                    "Channels"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "role",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "owner",
                                "admin",
                                "subscriber",
                                null
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "chat_id": {
                                                        "__PHP_Incomplete_Class_Name": "stdClass"
                                                    },
                                                    "name": {
                                                        "__PHP_Incomplete_Class_Name": "stdClass"
                                                    },
                                                    "description": {
                                                        "__PHP_Incomplete_Class_Name": "stdClass"
                                                    },
                                                    "followers": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "invite_link": {
                                                        "__PHP_Incomplete_Class_Name": "stdClass"
                                                    },
                                                    "role": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "chat_id",
                                                    "name",
                                                    "description",
                                                    "followers",
                                                    "invite_link",
                                                    "role"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "channels.store",
                "description": "One the instance runs, with a `name` and a `description`. Answers 201\nwith the channel. See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Create a channel",
                "tags": [
                    "Channels"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 100
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 2048
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "chat_id": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                },
                                                "name": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                },
                                                "description": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                },
                                                "followers": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "invite_link": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                },
                                                "role": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "chat_id",
                                                "name",
                                                "description",
                                                "followers",
                                                "invite_link",
                                                "role"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/channels\/{channel}": {
            "get": {
                "operationId": "channels.show",
                "description": "By its `chat_id` or invite code. See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Get a channel",
                "tags": [
                    "Channels"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "channel",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "chat_id": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                },
                                                "name": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                },
                                                "description": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                },
                                                "followers": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "invite_link": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                },
                                                "role": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "chat_id",
                                                "name",
                                                "description",
                                                "followers",
                                                "invite_link",
                                                "role"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "channels.destroy",
                "description": "One the instance owns. Answers 204. See [Chats, contacts and groups](\/docs\/guides\/chats-and-groups).",
                "summary": "Delete a channel",
                "tags": [
                    "Channels"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "channel",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/events": {
            "get": {
                "operationId": "events.index",
                "description": "The same events your webhook gets, oldest first, kept 30 days. Pass\nthe `id` of the last one you handled as `after`; each answer has\n`next_after`, to pass next time, and `has_more`. See\n[Webhooks and events](\/docs\/guides\/webhooks).",
                "summary": "Poll for events",
                "tags": [
                    "Events"
                ],
                "parameters": [
                    {
                        "name": "types[]",
                        "in": "query",
                        "description": "Only these event types, as in `types[]=message.received&types[]=message.status`.",
                        "schema": {
                            "type": "array",
                            "enum": [
                                "message.received",
                                "message.sent_from_phone",
                                "message.status",
                                "message.edited",
                                "message.deleted",
                                "message.poll_vote",
                                "message.reaction",
                                "group.message",
                                "group.update",
                                "call.received",
                                "call.rejected",
                                "instance.status",
                                "otp.completed",
                                "otp.failed",
                                "broadcast.paused",
                                "broadcast.completed"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "message.received",
                                    "message.sent_from_phone",
                                    "message.status",
                                    "message.edited",
                                    "message.deleted",
                                    "message.poll_vote",
                                    "message.reaction",
                                    "group.message",
                                    "group.update",
                                    "call.received",
                                    "call.rejected",
                                    "instance.status",
                                    "otp.completed",
                                    "otp.failed",
                                    "broadcast.paused",
                                    "broadcast.completed"
                                ]
                            }
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "description": "The id of the last event you handled (evt_\u2026): only later ones come back.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "How many, 1 to 100 (50 by default).",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "instance_id",
                        "in": "query",
                        "description": "Only this instance's events.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "additionalProperties": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                }
                                            }
                                        },
                                        "next_after": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "has_more": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "next_after",
                                        "has_more"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/webhook": {
            "get": {
                "operationId": "webhook.show",
                "description": "Its `url`, the `events` sent, the name of its `auth_header`, and\nwhether it is `paused` and why. Never the signing secret. See\n[Webhooks and events](\/docs\/guides\/webhooks#by-api).",
                "summary": "Get the account's webhook",
                "tags": [
                    "Webhooks"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Null: nothing is posted; an instance without its own uses the account's."
                                                },
                                                "events": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "description": "The account's choice: it applies to every endpoint of the account.",
                                                    "items": {
                                                        "__PHP_Incomplete_Class_Name": "stdClass"
                                                    }
                                                },
                                                "auth_header": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "paused": {
                                                    "type": "boolean"
                                                },
                                                "paused_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "paused_reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "failing_since": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Since when it has accepted nothing, before a pause."
                                                },
                                                "events_kept": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "url",
                                                "events",
                                                "auth_header",
                                                "paused",
                                                "paused_at",
                                                "paused_reason",
                                                "failing_since",
                                                "events_kept"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "patch": {
                "operationId": "webhook.update",
                "description": "Send only what changes: `url` (null stops sending), `events` and\n`auth_header` (null removes it). A `url` on another host removes the\nheader. The answer carries a signing `secret` only when this request\nmade the webhook's first one. At most 6 changes a minute. See\n[Webhooks and events](\/docs\/guides\/webhooks#by-api).",
                "summary": "Change the account's webhook",
                "tags": [
                    "Webhooks"
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "description": "Where events are posted: an https address on the public internet, at most 255 characters. `null` stops sending them."
                                    },
                                    "events": {
                                        "description": "The events to send and to keep for `GET \/v1\/events`, for the whole account. `null` puts back the default: every event except the group ones."
                                    },
                                    "auth_header": {
                                        "description": "A header of yours sent with every event to this `url`, for an endpoint behind a gateway that checks one: its `name` and `value`. `null` removes it. The value is kept encrypted and never returned; leave it out to keep the one set."
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "__PHP_Incomplete_Class_Name": "stdClass"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/webhook\/secret": {
            "post": {
                "operationId": "webhook.secret",
                "description": "Answers with the new `secret`, this once. Events are signed with it at\nonce, and with the old one too until `previous_valid_until`; until\nthen a second replacement answers 409. A retry with the same\n`Idempotency-Key` answers as the first did, without the secret. See\n[Webhooks and events](\/docs\/guides\/webhooks#by-api).",
                "summary": "Replace the account's signing secret",
                "tags": [
                    "Webhooks"
                ],
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "description": "Any unique string of yours. A retry with the same key, while the old secret still signs, answers as the first request did, without the secret.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/webhook\/test": {
            "post": {
                "operationId": "webhook.test",
                "description": "A `webhook.test` event to the account's `url`, signed like any other.\nAnswers 202; 429 within a minute of the last one, and 409 while there\nis no `url` or the webhook is paused. See\n[Webhooks and events](\/docs\/guides\/webhooks#by-api).",
                "summary": "Send a test event",
                "tags": [
                    "Webhooks"
                ],
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Null: nothing is posted; an instance without its own uses the account's."
                                                },
                                                "events": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "description": "The account's choice: it applies to every endpoint of the account.",
                                                    "items": {
                                                        "__PHP_Incomplete_Class_Name": "stdClass"
                                                    }
                                                },
                                                "auth_header": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "paused": {
                                                    "type": "boolean"
                                                },
                                                "paused_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "paused_reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "failing_since": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Since when it has accepted nothing, before a pause."
                                                },
                                                "events_kept": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "url",
                                                "events",
                                                "auth_header",
                                                "paused",
                                                "paused_at",
                                                "paused_reason",
                                                "failing_since",
                                                "events_kept"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/webhook\/try": {
            "post": {
                "operationId": "webhook.try",
                "description": "One try of the account's paused webhook, without waiting for the\nhourly one: if it answers, the events kept go out, oldest first.\nAnswers 202; 429 within a minute of the last try, 409 when it is not\npaused. See [Webhooks and events](\/docs\/guides\/webhooks#by-api).",
                "summary": "Try a paused webhook now",
                "tags": [
                    "Webhooks"
                ],
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Null: nothing is posted; an instance without its own uses the account's."
                                                },
                                                "events": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "description": "The account's choice: it applies to every endpoint of the account.",
                                                    "items": {
                                                        "__PHP_Incomplete_Class_Name": "stdClass"
                                                    }
                                                },
                                                "auth_header": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "paused": {
                                                    "type": "boolean"
                                                },
                                                "paused_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "paused_reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "failing_since": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Since when it has accepted nothing, before a pause."
                                                },
                                                "events_kept": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "url",
                                                "events",
                                                "auth_header",
                                                "paused",
                                                "paused_at",
                                                "paused_reason",
                                                "failing_since",
                                                "events_kept"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/webhook": {
            "get": {
                "operationId": "instances.webhook.show",
                "description": "As the account's; a null `url` means its events go to the account's\nwebhook. A key made for this one instance may read it too. See\n[Webhooks and events](\/docs\/guides\/webhooks#one-url-per-instance).",
                "summary": "Get an instance's own webhook",
                "tags": [
                    "Webhooks"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Null: nothing is posted; an instance without its own uses the account's."
                                                },
                                                "events": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "description": "The account's choice: it applies to every endpoint of the account.",
                                                    "items": {
                                                        "__PHP_Incomplete_Class_Name": "stdClass"
                                                    }
                                                },
                                                "auth_header": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "paused": {
                                                    "type": "boolean"
                                                },
                                                "paused_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "paused_reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "failing_since": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Since when it has accepted nothing, before a pause."
                                                },
                                                "events_kept": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "url",
                                                "events",
                                                "auth_header",
                                                "paused",
                                                "paused_at",
                                                "paused_reason",
                                                "failing_since",
                                                "events_kept"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "patch": {
                "operationId": "instances.webhook.update",
                "description": "Its `url` (its events then go there, not to the account's; null hands\nthem back) and its own `auth_header`. The answer carries its own\nsigning `secret` only when this request made its first one. `events`\nare the account's to choose. Needs an account key. See\n[Webhooks and events](\/docs\/guides\/webhooks#one-url-per-instance).",
                "summary": "Change an instance's own webhook",
                "tags": [
                    "Webhooks"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "description": "Where this instance's events are posted instead of the account's webhook: an https address on the public internet. `null` sends them to the account's again."
                                    },
                                    "events": {
                                        "description": "Not here: the events are chosen on the account's webhook, for every instance."
                                    },
                                    "auth_header": {
                                        "description": "A header of yours sent with every event to this `url`: its `name` and `value`. `null` removes it. The account's header is never sent here."
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "__PHP_Incomplete_Class_Name": "stdClass"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/webhook\/secret": {
            "post": {
                "operationId": "instances.webhook.secret",
                "description": "As the account's, for the instance's own `url`. Needs an account key.\nSee [Webhooks and events](\/docs\/guides\/webhooks#by-api).",
                "summary": "Replace an instance's own signing secret",
                "tags": [
                    "Webhooks"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "description": "Any unique string of yours. A retry with the same key, while the old secret still signs, answers as the first request did, without the secret.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/webhook\/test": {
            "post": {
                "operationId": "instances.webhook.test",
                "description": "As the account's, to the instance's own `url`. See\n[Webhooks and events](\/docs\/guides\/webhooks#by-api).",
                "summary": "Send a test event to an instance's own webhook",
                "tags": [
                    "Webhooks"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Null: nothing is posted; an instance without its own uses the account's."
                                                },
                                                "events": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "description": "The account's choice: it applies to every endpoint of the account.",
                                                    "items": {
                                                        "__PHP_Incomplete_Class_Name": "stdClass"
                                                    }
                                                },
                                                "auth_header": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "paused": {
                                                    "type": "boolean"
                                                },
                                                "paused_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "paused_reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "failing_since": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Since when it has accepted nothing, before a pause."
                                                },
                                                "events_kept": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "url",
                                                "events",
                                                "auth_header",
                                                "paused",
                                                "paused_at",
                                                "paused_reason",
                                                "failing_since",
                                                "events_kept"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/instances\/{instance}\/webhook\/try": {
            "post": {
                "operationId": "instances.webhook.try",
                "description": "As the account's, for the instance's own `url`. See\n[Webhooks and events](\/docs\/guides\/webhooks#by-api).",
                "summary": "Try an instance's paused webhook now",
                "tags": [
                    "Webhooks"
                ],
                "parameters": [
                    {
                        "name": "instance",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Null: nothing is posted; an instance without its own uses the account's."
                                                },
                                                "events": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "description": "The account's choice: it applies to every endpoint of the account.",
                                                    "items": {
                                                        "__PHP_Incomplete_Class_Name": "stdClass"
                                                    }
                                                },
                                                "auth_header": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "paused": {
                                                    "type": "boolean"
                                                },
                                                "paused_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "paused_reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "failing_since": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Since when it has accepted nothing, before a pause."
                                                },
                                                "events_kept": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "url",
                                                "events",
                                                "auth_header",
                                                "paused",
                                                "paused_at",
                                                "paused_reason",
                                                "failing_since",
                                                "events_kept"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/clients": {
            "get": {
                "operationId": "clients.index",
                "description": "Newest first, 15 to a page. For partners only. See\n[Partners](\/docs\/guides\/partners).",
                "summary": "List your clients",
                "tags": [
                    "Clients"
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `ClientResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/ClientResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "clients.store",
                "description": "A business you serve, as an account of its own. Then make it a key\n(`POST \/v1\/clients\/{id}\/keys`) and add its instances with that key.\nAnswers 201 with the client. See [Partners](\/docs\/guides\/partners).",
                "summary": "Add a client",
                "tags": [
                    "Clients"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`ClientResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ClientResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/clients\/{client}": {
            "get": {
                "operationId": "clients.show",
                "description": "See [Partners](\/docs\/guides\/partners).",
                "summary": "Get a client",
                "tags": [
                    "Clients"
                ],
                "parameters": [
                    {
                        "name": "client",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`ClientResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ClientResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "clients.update",
                "description": "See [Partners](\/docs\/guides\/partners).",
                "summary": "Rename a client",
                "tags": [
                    "Clients"
                ],
                "parameters": [
                    {
                        "name": "client",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`ClientResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ClientResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "clients.destroy",
                "description": "Deletes it with its keys, messages and history, for good. Only once\nit has no instances: remove those first with its key\n(`DELETE \/v1\/instances\/{id}`), which logs each out of WhatsApp.\nAnswers 204. See [Partners](\/docs\/guides\/partners).",
                "summary": "Remove a client",
                "tags": [
                    "Clients"
                ],
                "parameters": [
                    {
                        "name": "client",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "409": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "An instance is being added for one of your clients right now. Try again in a few seconds."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/clients\/{client}\/keys": {
            "get": {
                "operationId": "clients.keys.index",
                "description": "Their names and access, never the keys themselves. See\n[Partners](\/docs\/guides\/partners).",
                "summary": "List a client's API keys",
                "tags": [
                    "Clients"
                ],
                "parameters": [
                    {
                        "name": "client",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "access": {
                                                        "type": [
                                                            "integer",
                                                            "object",
                                                            "string"
                                                        ]
                                                    },
                                                    "instance_id": {
                                                        "__PHP_Incomplete_Class_Name": "stdClass"
                                                    },
                                                    "last_used_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "name",
                                                    "access",
                                                    "instance_id",
                                                    "last_used_at",
                                                    "created_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "clients.keys.store",
                "description": "`access` is `full` (the default), `send` (send and read) or `read`.\nWith `instance_id`, the key works only on that instance of the\nclient. The answer holds the key in `token`, once: it is not shown\nagain. Answers 201. See [Partners](\/docs\/guides\/partners).",
                "summary": "Make a key for a client",
                "tags": [
                    "Clients"
                ],
                "parameters": [
                    {
                        "name": "client",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "access": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "full",
                                            "send",
                                            "read",
                                            null
                                        ]
                                    },
                                    "instance_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "access": {
                                                    "type": [
                                                        "integer",
                                                        "object",
                                                        "string"
                                                    ]
                                                },
                                                "instance_id": {
                                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                                },
                                                "last_used_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "token": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "access",
                                                "instance_id",
                                                "last_used_at",
                                                "created_at",
                                                "token"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "This client has 10 keys. Revoke one it no longer uses first."
                                            ]
                                        },
                                        "code": {
                                            "$ref": "#\/components\/schemas\/ApiError"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/clients\/{client}\/keys\/{key}": {
            "delete": {
                "operationId": "clients.keys.destroy",
                "description": "It stops working at once. Answers 204. See\n[Partners](\/docs\/guides\/partners).",
                "summary": "Revoke a client's API key",
                "tags": [
                    "Clients"
                ],
                "parameters": [
                    {
                        "name": "client",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "key",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "http": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "ApiError": {
                "type": "string",
                "description": "What went wrong, as a value your code can act on beside the words in `message`. [The API's error codes](\/docs\/guides\/waiting#the-apis-error-codes) says what to do about each.\n| |\n|---|\n| `unauthenticated` <br\/> No API key was sent, or it was revoked. |\n| `key_not_allowed` <br\/> The key was made for less: it is read-only or send-only, or for one instance. |\n| `ip_not_allowed` <br\/> The key is locked to IP addresses, and the request came from another. |\n| `account_suspended` <br\/> The account is paused or suspended; `message` says why. |\n| `plan_limit` <br\/> The plan's instances, messages, conversations or API requests are used up. |\n| `feature_not_included` <br\/> Your plan, or its free trial, does not include this feature; `message` names it. |\n| `instance_not_found` <br\/> No instance with this id on your account. |\n| `message_not_found` <br\/> No message with this id on your account. |\n| `chat_not_found` <br\/> The instance has no chat with this person, or does not know them. |\n| `group_not_found` <br\/> No group with this id. |\n| `channel_not_found` <br\/> No channel with this id. |\n| `broadcast_not_found` <br\/> No broadcast with this id on your account. |\n| `otp_not_found` <br\/> No OTP with this id on your account. |\n| `status_not_found` <br\/> No status with this id on the instance. |\n| `not_found` <br\/> No such address, or nothing else with this id. |\n| `not_connected` <br\/> The instance is not connected to WhatsApp: stopped, disconnected or not linked yet. |\n| `link_refused` <br\/> The phone scanned belongs to another instance. Unlink to start again. |\n| `whatsapp_restricted` <br\/> WhatsApp is restricting the number, and this would make it worse. Wait until it lifts. |\n| `new_chats_paused` <br\/> New chats are paused on the instance, so it cannot reach new people now. |\n| `whatsapp_refused` <br\/> WhatsApp refused the request itself; `message` says what it needs. |\n| `in_progress` <br\/> Something else is under way on the instance or the account. Try again in a few seconds. |\n| `conflict` <br\/> Not possible in the state this is in, such as cancelling a message that has gone. |\n| `validation_failed` <br\/> Something in the request is wrong; `errors` names each field. |\n| `wrong_code` <br\/> The OTP code is not right; `attempts_left` says how many tries remain. |\n| `no_attempts_left` <br\/> The OTP has no attempts left. Start a new one. |\n| `rate_limited` <br\/> Too many requests from the account in a minute. |\n| `limit_reached` <br\/> One endpoint's own limit for the instance, key or phone, by the minute, hour or day; `message` says which. |\n| `backlog_full` <br\/> The instance already has too many messages waiting or scheduled. Send more as they go out. |\n| `file_budget_used` <br\/> The account's inline files for the day are used. Send files by `url`, or wait for `Retry-After`. |\n| `busy` <br\/> The instance is answering other requests that read from WhatsApp. Try again in a few seconds. |\n| `whatsapp_unavailable` <br\/> WhatsApp did not answer. Try again. |\n| `unavailable` <br\/> We could not take the request just now. Try again. |\n| `not_supported` <br\/> The WhatsApp engine Threadwire runs cannot do this, so trying again will not help. |\n| `person_unknown` <br\/> WhatsApp could not tell us the number behind a private `chat_id` just now, so nothing was sent. Try again. |\n| `server_error` <br\/> Something failed on our side. Try again, and tell us if it stays. |\n| `bad_request` <br\/> The request could not be read, such as a method the address does not take. |\n| `invalid_json` <br\/> The body was sent as JSON and is not valid JSON, so nothing was read from it. Fix the body and send it again. |",
                "enum": [
                    "unauthenticated",
                    "key_not_allowed",
                    "ip_not_allowed",
                    "account_suspended",
                    "plan_limit",
                    "feature_not_included",
                    "instance_not_found",
                    "message_not_found",
                    "chat_not_found",
                    "group_not_found",
                    "channel_not_found",
                    "broadcast_not_found",
                    "otp_not_found",
                    "status_not_found",
                    "not_found",
                    "not_connected",
                    "link_refused",
                    "whatsapp_restricted",
                    "new_chats_paused",
                    "whatsapp_refused",
                    "in_progress",
                    "conflict",
                    "validation_failed",
                    "wrong_code",
                    "no_attempts_left",
                    "rate_limited",
                    "limit_reached",
                    "backlog_full",
                    "file_budget_used",
                    "busy",
                    "whatsapp_unavailable",
                    "unavailable",
                    "not_supported",
                    "person_unknown",
                    "server_error",
                    "bad_request",
                    "invalid_json"
                ],
                "title": "ApiError"
            },
            "BroadcastResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "instance_id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "description": "draft, scheduled, running, paused, completed or cancelled."
                    },
                    "reason": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Why it is paused (or was cancelled): a code and plain words.",
                        "properties": {
                            "code": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "text": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "code",
                            "text"
                        ]
                    },
                    "text": {
                        "type": "string"
                    },
                    "language": {
                        "type": "string"
                    },
                    "audience": {
                        "type": "string"
                    },
                    "include_saved_contacts": {
                        "type": "boolean"
                    },
                    "narrowed_to": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "The label, or the contact field and its value, its people were narrowed to in the panel; null when it was not narrowed.",
                        "properties": {
                            "label": {
                                "type": "string"
                            },
                            "field": {
                                "type": "string"
                            },
                            "value": {
                                "type": "string"
                            }
                        }
                    },
                    "media": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "A file at an address sent with no type has a null mimetype until its first turn fetches it.",
                        "properties": {
                            "mimetype": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "filename": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "mimetype",
                            "filename"
                        ]
                    },
                    "interval_seconds": {
                        "type": "integer"
                    },
                    "per_day": {
                        "type": "integer"
                    },
                    "progress": {
                        "type": "object",
                        "description": "Read for several columns of a row: once per object.",
                        "properties": {
                            "recipients": {
                                "type": "integer"
                            },
                            "pending": {
                                "type": "integer"
                            },
                            "skipped": {
                                "type": "object",
                                "additionalProperties": {
                                    "type": "string"
                                }
                            },
                            "queued": {
                                "type": "integer"
                            },
                            "sent": {
                                "type": "integer"
                            },
                            "delivered": {
                                "type": "integer"
                            },
                            "read": {
                                "type": "integer"
                            },
                            "failed": {
                                "type": "integer"
                            },
                            "replied": {
                                "type": "integer"
                            },
                            "opted_out": {
                                "type": "integer"
                            }
                        },
                        "required": [
                            "recipients",
                            "pending",
                            "skipped",
                            "queued",
                            "sent",
                            "delivered",
                            "read",
                            "failed",
                            "replied",
                            "opted_out"
                        ]
                    },
                    "left_out": {
                        "type": "string",
                        "description": "How many were left out when it was made, by why."
                    },
                    "warnings": {
                        "type": "array",
                        "items": {
                            "__PHP_Incomplete_Class_Name": "stdClass"
                        }
                    },
                    "next_message_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "When it makes its next message, while running."
                    },
                    "start_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "started_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "paused_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "completed_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "cancelled_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "instance_id",
                    "name",
                    "status",
                    "reason",
                    "text",
                    "language",
                    "audience",
                    "include_saved_contacts",
                    "narrowed_to",
                    "media",
                    "interval_seconds",
                    "per_day",
                    "progress",
                    "left_out",
                    "warnings",
                    "next_message_at",
                    "start_at",
                    "started_at",
                    "paused_at",
                    "completed_at",
                    "cancelled_at",
                    "created_at"
                ],
                "title": "BroadcastResource"
            },
            "ClientResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "description": "active or suspended: suspended with your account, or by us.",
                        "enum": [
                            "suspended",
                            "active"
                        ]
                    },
                    "instances": {
                        "type": "integer",
                        "description": "Its instances, linked or not: they count against your plan's instances."
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "name",
                    "status",
                    "instances",
                    "created_at"
                ],
                "title": "ClientResource"
            },
            "InstanceResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "external_ref": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "reject_calls": {
                        "type": "boolean",
                        "description": "WhatsApp calls to this number are declined at once."
                    },
                    "status": {
                        "$ref": "#\/components\/schemas\/InstanceStatus"
                    },
                    "stopped": {
                        "type": "boolean",
                        "description": "Stopped on purpose (POST ...\/stop) until started again (POST ...\/start)."
                    },
                    "paused_with_account": {
                        "type": "boolean",
                        "description": "Paused by us with a suspended account, not by them: it starts\nagain by itself once the account is active."
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "link_refused": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Why the phone last scanned was not linked (it is already\nlinked to another instance), in plain words; null otherwise."
                    },
                    "chat_link": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Opens a chat with this number (null until linked). Add\n?text=... for a greeting. People who write first are replies,\nnever limited as new contacts."
                    },
                    "connected_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "protection": {
                        "type": "object",
                        "description": "Why a message to someone new may wait or be refused today.",
                        "properties": {
                            "enabled": {
                                "type": "boolean",
                                "description": "Whether this instance follows the optional sending rules\n(its customer's choice; `protection_settings.enabled`).\nOff, the limits below are null: there are none of ours."
                            },
                            "warming_up": {
                                "type": "boolean"
                            },
                            "days_linked": {
                                "type": "integer"
                            },
                            "first_contacts_today": {
                                "type": "integer"
                            },
                            "timezone": {
                                "type": "string",
                                "description": "The zone its quiet hours and \"today\" run in (Instance::timezone())."
                            },
                            "first_contacts_limit": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "not_replies_today": {
                                "type": "integer",
                                "description": "Warm-up's cap on messages that are not replies (VolumeWarmup):\nnull once it no longer applies. Replies are never counted.",
                                "minimum": 0
                            },
                            "not_replies_limit": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "new_chats": {
                                "type": "object",
                                "description": "WhatsApp's own limit on new chats, and whether we paused them.",
                                "properties": {
                                    "paused": {
                                        "type": "boolean"
                                    },
                                    "reason": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "until": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "whatsapp_status": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "quota_used": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ]
                                    },
                                    "quota_total": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ]
                                    },
                                    "quota_resets_at": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "paused",
                                    "reason",
                                    "until",
                                    "whatsapp_status",
                                    "quota_used",
                                    "quota_total",
                                    "quota_resets_at"
                                ]
                            },
                            "health": {
                                "type": "object",
                                "description": "How the people it messaged first in the past week answered:\n\"low\" halves new contacts, \"poor\" pauses them.",
                                "properties": {
                                    "status": {
                                        "type": "string"
                                    },
                                    "first_contacts_this_week": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ]
                                    },
                                    "replied": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "status",
                                    "first_contacts_this_week",
                                    "replied"
                                ]
                            },
                            "settings": {
                                "type": "object",
                                "description": "The customer's own settings, within safe limits: each\nvalue as it applies now, and\nwhich differ from the recommended ones. Change them with\nPATCH \/v1\/instances\/{id}, `protection_settings`.",
                                "properties": {
                                    "enabled": {
                                        "type": "boolean"
                                    },
                                    "quiet_hours": {
                                        "anyOf": [
                                            {
                                                "type": "object",
                                                "properties": {
                                                    "from": {
                                                        "type": "integer"
                                                    },
                                                    "to": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "from",
                                                    "to"
                                                ]
                                            },
                                            {
                                                "type": "object",
                                                "properties": {
                                                    "from": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "to": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "from",
                                                    "to"
                                                ]
                                            }
                                        ]
                                    },
                                    "new_people_per_day": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ]
                                    },
                                    "first_contact_gap": {
                                        "type": "object",
                                        "properties": {
                                            "min": {
                                                "type": "integer"
                                            },
                                            "max": {
                                                "type": "integer"
                                            }
                                        },
                                        "required": [
                                            "min",
                                            "max"
                                        ]
                                    },
                                    "break_minutes": {
                                        "type": "object",
                                        "properties": {
                                            "min": {
                                                "type": "integer"
                                            },
                                            "max": {
                                                "type": "integer"
                                            }
                                        },
                                        "required": [
                                            "min",
                                            "max"
                                        ]
                                    },
                                    "unanswered_follow_ups": {
                                        "type": "integer"
                                    },
                                    "reopen_after_days": {
                                        "type": "integer"
                                    },
                                    "not_replies_per_day": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ]
                                    },
                                    "warmup_mode": {
                                        "type": "string",
                                        "enum": [
                                            "established",
                                            "new"
                                        ]
                                    },
                                    "mark_read_before_reply": {
                                        "type": "boolean"
                                    },
                                    "automatic_warmup": {
                                        "type": "boolean"
                                    },
                                    "customised": {
                                        "type": "array",
                                        "items": {
                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                        }
                                    }
                                },
                                "required": [
                                    "enabled",
                                    "quiet_hours",
                                    "new_people_per_day",
                                    "first_contact_gap",
                                    "break_minutes",
                                    "unanswered_follow_ups",
                                    "reopen_after_days",
                                    "not_replies_per_day",
                                    "warmup_mode",
                                    "mark_read_before_reply",
                                    "automatic_warmup",
                                    "customised"
                                ]
                            },
                            "profile": {
                                "type": "object",
                                "properties": {
                                    "has_picture": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "has_name": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "advice": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "has_picture",
                                    "has_name",
                                    "advice"
                                ]
                            },
                            "safety": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "description": "How safe it looks to WhatsApp, 100 down (SafetyMeter), with\nwhat lowers it and the next step; null until linked. It\nwarns, never blocks: the rules above do that.",
                                "properties": {
                                    "score": {
                                        "type": "string"
                                    },
                                    "level": {
                                        "type": "string"
                                    },
                                    "reasons": {
                                        "type": "array",
                                        "items": {
                                            "__PHP_Incomplete_Class_Name": "stdClass"
                                        }
                                    },
                                    "advice": {
                                        "type": "string"
                                    },
                                    "updated_at": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "score",
                                    "level",
                                    "reasons",
                                    "advice",
                                    "updated_at"
                                ]
                            }
                        },
                        "required": [
                            "enabled",
                            "warming_up",
                            "days_linked",
                            "first_contacts_today",
                            "timezone",
                            "first_contacts_limit",
                            "not_replies_today",
                            "not_replies_limit",
                            "new_chats",
                            "health",
                            "settings",
                            "profile",
                            "safety"
                        ]
                    }
                },
                "required": [
                    "id",
                    "name",
                    "external_ref",
                    "reject_calls",
                    "status",
                    "stopped",
                    "paused_with_account",
                    "phone",
                    "link_refused",
                    "chat_link",
                    "connected_at",
                    "created_at",
                    "protection"
                ],
                "title": "InstanceResource"
            },
            "InstanceStatus": {
                "type": "string",
                "enum": [
                    "starting",
                    "scan_qr",
                    "working",
                    "failed",
                    "stopped"
                ],
                "title": "InstanceStatus"
            },
            "MessageDirection": {
                "type": "string",
                "description": "Which way a message went.\n| |\n|---|\n| `in` <br\/> They wrote. |\n| `out` <br\/> The instance sent it: through the API, the panel, an automation, or the phone itself. |",
                "enum": [
                    "in",
                    "out"
                ],
                "title": "MessageDirection"
            },
            "MessageError": {
                "type": "string",
                "description": "Why a message failed, or what a queued one is waiting for, as a value your code can act on beside the words in `error`. [A message's error codes](\/docs\/guides\/waiting#a-messages-error-codes) says what each means.\n| |\n|---|\n| `instance_not_connected` <br\/>  |\n| `instance_stopped` <br\/>  |\n| `instance_reconnecting` <br\/>  |\n| `number_on_another_instance` <br\/>  |\n| `account_suspended` <br\/>  |\n| `phone_changed` <br\/>  |\n| `opted_out` <br\/>  |\n| `opt_out_unconfirmed` <br\/>  |\n| `not_on_whatsapp` <br\/>  |\n| `no_number` <br\/>  |\n| `quiet_hours` <br\/>  |\n| `pacing` <br\/>  |\n| `earlier_message_waiting` <br\/>  |\n| `per_minute_limit` <br\/>  |\n| `per_person_limit` <br\/>  |\n| `per_group_limit` <br\/>  |\n| `daily_new_people_limit` <br\/>  |\n| `daily_lookup_limit` <br\/>  |\n| `daily_volume_limit` <br\/>  |\n| `daily_group_limit` <br\/>  |\n| `daily_channel_limit` <br\/>  |\n| `unanswered_follow_ups` <br\/>  |\n| `not_answered_yet` <br\/>  |\n| `first_message_type` <br\/>  |\n| `first_message_too_long` <br\/>  |\n| `insecure_link` <br\/>  |\n| `link_only` <br\/>  |\n| `same_first_message` <br\/>  |\n| `new_chats_paused` <br\/>  |\n| `few_replies` <br\/>  |\n| `whatsapp_restricted` <br\/>  |\n| `whatsapp_quota` <br\/>  |\n| `whatsapp_refused` <br\/>  |\n| `whatsapp_unreachable` <br\/>  |\n| `may_have_been_delivered` <br\/>  |\n| `file_unavailable` <br\/>  |\n| `file_missing` <br\/>  |\n| `invalid_sticker` <br\/>  |\n| `file_too_large` <br\/> On a received message, which stays received: its file was too large to keep. |\n| `otp_too_late` <br\/>  |\n| `otp_ended` <br\/>  |\n| `broadcast_stopped` <br\/>  |\n| `warmup_stopped` <br\/>  |\n| `cancelled` <br\/>  |\n| `not_queued` <br\/>  |",
                "enum": [
                    "instance_not_connected",
                    "instance_stopped",
                    "instance_reconnecting",
                    "number_on_another_instance",
                    "account_suspended",
                    "phone_changed",
                    "opted_out",
                    "opt_out_unconfirmed",
                    "not_on_whatsapp",
                    "no_number",
                    "quiet_hours",
                    "pacing",
                    "earlier_message_waiting",
                    "per_minute_limit",
                    "per_person_limit",
                    "per_group_limit",
                    "daily_new_people_limit",
                    "daily_lookup_limit",
                    "daily_volume_limit",
                    "daily_group_limit",
                    "daily_channel_limit",
                    "unanswered_follow_ups",
                    "not_answered_yet",
                    "first_message_type",
                    "first_message_too_long",
                    "insecure_link",
                    "link_only",
                    "same_first_message",
                    "new_chats_paused",
                    "few_replies",
                    "whatsapp_restricted",
                    "whatsapp_quota",
                    "whatsapp_refused",
                    "whatsapp_unreachable",
                    "may_have_been_delivered",
                    "file_unavailable",
                    "file_missing",
                    "invalid_sticker",
                    "file_too_large",
                    "otp_too_late",
                    "otp_ended",
                    "broadcast_stopped",
                    "warmup_stopped",
                    "cancelled",
                    "not_queued"
                ],
                "title": "MessageError"
            },
            "MessageResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "instance_id": {
                        "type": "string"
                    },
                    "direction": {
                        "$ref": "#\/components\/schemas\/MessageDirection"
                    },
                    "origin": {
                        "type": "string"
                    },
                    "chat_id": {
                        "type": "string"
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "participant": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "In a group: who wrote it. The chat is the group."
                    },
                    "contact_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "type": {
                        "$ref": "#\/components\/schemas\/MessageType"
                    },
                    "body": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "location": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "__PHP_Incomplete_Class_Name": "stdClass"
                        }
                    },
                    "contact": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "__PHP_Incomplete_Class_Name": "stdClass"
                        }
                    },
                    "poll": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "options": {
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "minItems": 0,
                                        "maxItems": 0
                                    }
                                ]
                            },
                            "multiple_answers": {
                                "type": "boolean"
                            },
                            "results": {
                                "type": "array",
                                "items": {
                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                }
                            },
                            "votes": {
                                "type": "array",
                                "items": {
                                    "__PHP_Incomplete_Class_Name": "stdClass"
                                }
                            }
                        },
                        "required": [
                            "name",
                            "options",
                            "multiple_answers",
                            "results",
                            "votes"
                        ]
                    },
                    "forwarded_from": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The message it forwards, when it is a forward."
                    },
                    "mentions": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "The people a message sent to a group mentions, by phone.",
                        "items": {
                            "__PHP_Incomplete_Class_Name": "stdClass"
                        }
                    },
                    "order": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "From the business's WhatsApp catalog: an order sent from the cart, or a shared product.",
                        "additionalProperties": {
                            "__PHP_Incomplete_Class_Name": "stdClass"
                        }
                    },
                    "reply_to": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "reaction": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "reactions": {
                        "type": "array",
                        "description": "What the people in the chat reacted with, newest last.",
                        "items": {
                            "__PHP_Incomplete_Class_Name": "stdClass"
                        }
                    },
                    "media": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "url": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "mimetype": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "filename": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "url",
                            "mimetype",
                            "filename"
                        ]
                    },
                    "status": {
                        "$ref": "#\/components\/schemas\/MessageStatus"
                    },
                    "error": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "error_code": {
                        "anyOf": [
                            {
                                "description": "What `error` says, as a value code can act on; on a queued\nmessage, what it is waiting for. Null on a message that failed\nbefore codes were kept.\n| |\n|---|\n| `instance_not_connected` <br\/>  |\n| `instance_stopped` <br\/>  |\n| `instance_reconnecting` <br\/>  |\n| `number_on_another_instance` <br\/>  |\n| `account_suspended` <br\/>  |\n| `phone_changed` <br\/>  |\n| `opted_out` <br\/>  |\n| `opt_out_unconfirmed` <br\/>  |\n| `not_on_whatsapp` <br\/>  |\n| `no_number` <br\/>  |\n| `quiet_hours` <br\/>  |\n| `pacing` <br\/>  |\n| `earlier_message_waiting` <br\/>  |\n| `per_minute_limit` <br\/>  |\n| `per_person_limit` <br\/>  |\n| `per_group_limit` <br\/>  |\n| `daily_new_people_limit` <br\/>  |\n| `daily_lookup_limit` <br\/>  |\n| `daily_volume_limit` <br\/>  |\n| `daily_group_limit` <br\/>  |\n| `daily_channel_limit` <br\/>  |\n| `unanswered_follow_ups` <br\/>  |\n| `not_answered_yet` <br\/>  |\n| `first_message_type` <br\/>  |\n| `first_message_too_long` <br\/>  |\n| `insecure_link` <br\/>  |\n| `link_only` <br\/>  |\n| `same_first_message` <br\/>  |\n| `new_chats_paused` <br\/>  |\n| `few_replies` <br\/>  |\n| `whatsapp_restricted` <br\/>  |\n| `whatsapp_quota` <br\/>  |\n| `whatsapp_refused` <br\/>  |\n| `whatsapp_unreachable` <br\/>  |\n| `may_have_been_delivered` <br\/>  |\n| `file_unavailable` <br\/>  |\n| `file_missing` <br\/>  |\n| `invalid_sticker` <br\/>  |\n| `file_too_large` <br\/> On a received message, which stays received: its file was too large to keep. |\n| `otp_too_late` <br\/>  |\n| `otp_ended` <br\/>  |\n| `broadcast_stopped` <br\/>  |\n| `warmup_stopped` <br\/>  |\n| `cancelled` <br\/>  |\n| `not_queued` <br\/>  |",
                                "$ref": "#\/components\/schemas\/MessageError"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "send_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "written_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "By WhatsApp's own clock, for a message received or typed on the\nphone: created_at is when we stored it, which is later."
                    },
                    "sent_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "delivered_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "read_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "edited_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "deleted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Deleted for everyone on WhatsApp: its text and file are gone."
                    }
                },
                "required": [
                    "id",
                    "instance_id",
                    "direction",
                    "origin",
                    "chat_id",
                    "phone",
                    "participant",
                    "contact_name",
                    "type",
                    "body",
                    "location",
                    "contact",
                    "poll",
                    "forwarded_from",
                    "mentions",
                    "order",
                    "reply_to",
                    "reaction",
                    "reactions",
                    "media",
                    "status",
                    "error",
                    "error_code",
                    "send_at",
                    "created_at",
                    "written_at",
                    "sent_at",
                    "delivered_at",
                    "read_at",
                    "edited_at",
                    "deleted_at"
                ],
                "title": "MessageResource"
            },
            "MessageStatus": {
                "type": "string",
                "description": "| |\n|---|\n| `scheduled` <br\/> Waiting for its `send_at`, then queued. |\n| `queued` <br\/>  |\n| `sent` <br\/>  |\n| `delivered` <br\/>  |\n| `read` <br\/>  |\n| `failed` <br\/>  |\n| `received` <br\/>  |",
                "enum": [
                    "scheduled",
                    "queued",
                    "sent",
                    "delivered",
                    "read",
                    "failed",
                    "received"
                ],
                "title": "MessageStatus"
            },
            "MessageType": {
                "type": "string",
                "description": "What a message is.\n| |\n|---|\n| `text` <br\/>  |\n| `image` <br\/>  |\n| `video` <br\/>  |\n| `audio` <br\/>  |\n| `document` <br\/>  |\n| `sticker` <br\/>  |\n| `location` <br\/>  |\n| `contact` <br\/>  |\n| `poll` <br\/>  |\n| `order` <br\/> Not sent through the API: an order from your WhatsApp catalog's cart, received, or sent from the phone. |\n| `product` <br\/> Not sent through the API: a product shared from your WhatsApp catalog, received, or sent from the phone. |",
                "enum": [
                    "text",
                    "image",
                    "video",
                    "audio",
                    "document",
                    "sticker",
                    "location",
                    "contact",
                    "poll",
                    "order",
                    "product"
                ],
                "title": "MessageType"
            }
        },
        "responses": {
            "AuthenticationException": {
                "description": "Unauthenticated",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                },
                                "code": {
                                    "$ref": "#\/components\/schemas\/ApiError"
                                }
                            },
                            "required": [
                                "message",
                                "code"
                            ]
                        }
                    }
                }
            },
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "code": {
                                    "$ref": "#\/components\/schemas\/ApiError"
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors",
                                "code"
                            ]
                        }
                    }
                }
            },
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                },
                                "code": {
                                    "$ref": "#\/components\/schemas\/ApiError"
                                }
                            },
                            "required": [
                                "message",
                                "code"
                            ]
                        }
                    }
                }
            }
        }
    }
}